/**
 * CACTS Pune - 10-Platform Dynamic Client-Side Social Syndication Engine
 * Filename: css/social-share.css
 * Description: High-performance glassmorphic UI styling for social syndication modal & planner controls.
 */

:root {
  --social-bg-overlay: rgba(11, 15, 25, 0.85);
  --social-container-bg: #0f172a;
  --social-card-bg: rgba(30, 41, 59, 0.7);
  --social-card-border: rgba(255, 255, 255, 0.1);
  --social-primary: #3b82f6;
  --social-primary-glow: rgba(59, 130, 246, 0.4);
  --social-text-main: #f8fafc;
  --social-text-muted: #94a3b8;
  --social-success: #10b981;
  --social-warning: #f59e0b;
  --social-danger: #ef4444;
}

/* Modal Base & Overlay */
.social-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--social-bg-overlay);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  box-sizing: border-box;
}

.social-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.social-modal-container {
  width: 92%;
  max-width: 1100px;
  max-height: 92vh;
  background: var(--social-container-bg);
  border: 1px solid var(--social-card-border);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 30px rgba(59, 130, 246, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--social-text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Header Section */
.social-modal-header {
  padding: 1.2rem 1.5rem;
  background: rgba(30, 41, 59, 0.6);
  border-bottom: 1px solid var(--social-card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.social-modal-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
}

.social-recognition-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  background: rgba(16, 185, 129, 0.15);
  color: var(--social-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
}

.social-modal-close {
  background: transparent;
  border: none;
  color: var(--social-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.social-modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* Body Content */
.social-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.social-step-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.social-step-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--social-text-muted);
  margin: 0;
}

/* STEP 1: Platform Selection Bar */
.social-platforms-bar {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.social-platform-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.8rem;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--social-card-border);
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}

.social-platform-pill:hover {
  background: rgba(51, 65, 85, 0.7);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.social-platform-pill.selected {
  border-color: var(--social-primary);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(37, 99, 235, 0.25));
  box-shadow: 0 0 15px var(--social-primary-glow);
}

.social-pill-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.social-pill-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.social-pill-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.social-pill-format {
  font-size: 0.7rem;
  color: var(--social-text-muted);
}

.social-rec-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
}

/* STEP 2 & 3 Two Column Layout */
.social-main-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .social-main-grid {
    grid-template-columns: 1fr;
  }
}

/* Left Column: Canvas Media Panel */
.social-canvas-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--social-card-border);
  border-radius: 12px;
  padding: 1.25rem;
}

.social-format-tabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
}

.social-format-tab {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--social-card-border);
  color: var(--social-text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.social-format-tab.active {
  background: var(--social-primary);
  color: #ffffff;
  border-color: var(--social-primary);
}

.social-preview-container {
  width: 100%;
  min-height: 240px;
  background: #020617;
  border: 1px solid var(--social-card-border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  overflow: hidden;
  transition: background 0.3s ease;
}

.social-preview-container.light-feed {
  background: #f1f5f9;
}

.social-preview-canvas {
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.social-media-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.social-toggle-btn {
  background: rgba(51, 65, 85, 0.5);
  border: 1px solid var(--social-card-border);
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.social-toggle-btn:hover {
  background: rgba(51, 65, 85, 0.8);
  color: #ffffff;
}

.social-download-group {
  display: flex;
  gap: 0.5rem;
}

.social-btn-small {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s;
}

.social-btn-small:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.social-btn-download {
  background: #10b981;
  color: #ffffff;
}

.social-btn-copy-img {
  background: #3b82f6;
  color: #ffffff;
}

/* Right Column: Caption, Hashtags & Execution Panel */
.social-execution-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--social-card-border);
  border-radius: 12px;
  padding: 1.25rem;
}

.social-caption-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-caption-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.social-caption-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
}

.social-caption-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.social-char-counter {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--social-success);
}

.social-char-counter.warning {
  color: var(--social-warning);
}

.social-char-counter.danger {
  color: var(--social-danger);
}

.social-caption-textarea {
  width: 100%;
  height: 95px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--social-card-border);
  border-radius: 8px;
  color: #f8fafc;
  padding: 0.75rem;
  font-family: inherit;
  font-size: 0.85rem;
  resize: vertical;
  box-sizing: border-box;
}

.social-caption-textarea:focus {
  outline: none;
  border-color: var(--social-primary);
  box-shadow: 0 0 8px var(--social-primary-glow);
}

/* Dedicated Text & Hashtag Copy Actions Toolbar */
.social-caption-actions-bar {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.2rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.social-btn-copy-text {
  background: #0284c7;
  color: #ffffff;
}

.social-btn-copy-full {
  background: #0d9488;
  color: #ffffff;
}

.social-btn-copy-tags {
  background: #475569;
  color: #ffffff;
}

.social-hashtag-box {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.social-hashtag-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--social-text-muted);
}

.social-hashtag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.social-hashtag-pill {
  background: rgba(51, 65, 85, 0.6);
  border: 1px solid var(--social-card-border);
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.social-hashtag-pill:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
}

/* Primary Execution Button */
.social-primary-action-btn {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transition: all 0.2s ease;
}

.social-primary-action-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
  transform: translateY(-1px);
}

/* Toast Notifications */
.social-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #1e293b;
  border: 1px solid var(--social-primary);
  color: #ffffff;
  padding: 0.85rem 1.4rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  z-index: 100000;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.social-toast.show {
  opacity: 1;
  transform: translateY(0);
}
