/* ==========================================================================
   Instagram Comment & Conversation Generator Studio - PicDriver
   Modern High-Performance Design System
   ========================================================================== */

/* Main Layout Grid */
.comment-gen-container {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 28px;
  max-width: 1440px;
  margin: 0 auto 60px;
  padding: 0 24px;
}

@media (max-width: 1024px) {
  .comment-gen-container {
    grid-template-columns: 1fr;
    padding: 0 16px;
    gap: 20px;
  }
}

/* Left: Configuration Sticky Sidebar */
.config-sidebar {
  position: sticky;
  top: calc(var(--header-height, 72px) + 20px);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(236, 72, 153, 0.3) transparent;
}

.config-sidebar::-webkit-scrollbar {
  width: 5px;
}

.config-sidebar::-webkit-scrollbar-thumb {
  background: rgba(236, 72, 153, 0.3);
  border-radius: 4px;
}

@media (max-width: 1024px) {
  .config-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
}

.config-section {
  background: var(--bg-card, rgba(15, 23, 42, 0.75));
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-md, 14px);
  padding: 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.config-section:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.section-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

/* Inputs & Form Controls */
.text-input-styled {
  width: 100%;
  padding: 11px 14px;
  background: #131d31;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  border-radius: var(--radius-sm, 8px);
  color: var(--text-primary, #ffffff);
  font-size: 0.86rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.text-input-styled:focus {
  border-color: #ec4899;
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.35);
}

/* Category & Niche Pill Selector */
.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface, #131d31);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  color: var(--text-secondary, #94a3b8);
  padding: 8px 14px;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.choice-pill:hover {
  border-color: #ec4899;
  color: #ffffff;
  transform: translateY(-1px);
}

.choice-pill.active {
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  border-color: #ec4899;
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(236, 72, 153, 0.4);
}

/* Length Filter Segmented Bar */
.segmented-control {
  display: flex;
  background: #131d31;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm, 8px);
  padding: 3px;
  gap: 4px;
}

.segmented-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary, #94a3b8);
  padding: 9px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.segmented-btn.active {
  background: rgba(236, 72, 153, 0.22);
  color: #ec4899;
  font-weight: 700;
  box-shadow: inset 0 0 8px rgba(236, 72, 153, 0.2);
}

/* Big Action Button */
.btn-generate {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm, 10px);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(236, 72, 153, 0.6);
}

.btn-generate:active {
  transform: translateY(0);
}

/* Right: Results Feed Column */
.results-feed-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Live Authentic Instagram Mockup Bubble */
.instagram-comment-mockup-card {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md, 14px);
  padding: 18px 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.instagram-comment-mockup-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.mockup-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.mockup-author-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mockup-avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ec4899, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.4);
}

.mockup-author-details {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mockup-handle {
  font-weight: 700;
  font-size: 0.9rem;
  color: #ffffff;
}

.mockup-badge-pill {
  background: rgba(236, 72, 153, 0.15);
  color: #ec4899;
  border: 1px solid rgba(236, 72, 153, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.mockup-time-ago {
  font-size: 0.74rem;
  color: var(--text-muted, #64748b);
  font-family: var(--font-mono, monospace);
}

.mockup-comment-body {
  font-size: 0.96rem;
  line-height: 1.55;
  color: #f8fafc;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border-left: 3px solid #ec4899;
  min-height: 48px;
}

.mockup-actions-row {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.8rem;
  color: var(--text-muted, #64748b);
  font-weight: 600;
}

.mockup-action-link {
  cursor: pointer;
  transition: color 0.15s ease;
}

.mockup-action-link:hover {
  color: #ec4899;
}

.mockup-likes-count {
  margin-left: auto;
  color: #e2e8f0;
  cursor: pointer;
}

/* Feed Header & Action Bar */
.feed-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card, rgba(15, 23, 42, 0.75));
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-md, 14px);
  padding: 14px 20px;
  gap: 14px;
  flex-wrap: wrap;
}

.feed-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
  display: flex;
  align-items: center;
  gap: 10px;
}

.feed-counter-badge {
  background: rgba(236, 72, 153, 0.15);
  color: #ec4899;
  border: 1px solid rgba(236, 72, 153, 0.3);
  padding: 3px 10px;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.76rem;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
}

.feed-search-input {
  max-width: 240px;
  padding: 7px 12px;
  font-size: 0.82rem;
  background: #131d31;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #ffffff;
  outline: none;
  transition: border-color 0.2s ease;
}

.feed-search-input:focus {
  border-color: #ec4899;
}

.comments-list-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Individual Comment Card */
.comment-card {
  position: relative;
  background: var(--bg-card, rgba(15, 23, 42, 0.75));
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-md, 12px);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-card:hover {
  border-color: rgba(236, 72, 153, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(236, 72, 153, 0.15);
  background: rgba(19, 29, 49, 0.85);
}

.comment-card.is-question {
  border-left: 3px solid #38bdf8;
}

.comment-card.active-preview {
  border-color: #ec4899;
  background: rgba(236, 72, 153, 0.08);
}

.comment-card-content {
  flex: 1;
}

.comment-text {
  font-size: 0.94rem;
  color: var(--text-primary, #ffffff);
  line-height: 1.52;
  margin-bottom: 8px;
}

.comment-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.74rem;
  color: var(--text-muted, #64748b);
  font-family: var(--font-mono, monospace);
}

.comment-tag {
  color: #ec4899;
  font-weight: 700;
}

.question-hook-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.comment-actions-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.comment-copy-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary, #94a3b8);
  padding: 8px 16px;
  border-radius: var(--radius-sm, 8px);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  user-select: none;
}

.comment-copy-btn:hover {
  background: #ec4899;
  border-color: #ec4899;
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(236, 72, 153, 0.4);
}

.comment-copy-btn.copied {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.4);
}

/* Toast Pill */
.toast-pill {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid #ec4899;
  color: #ffffff;
  padding: 11px 26px;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100000;
}

.toast-pill.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-pill.success {
  border-color: #10b981;
  background: rgba(6, 78, 59, 0.95);
}

/* Educational SEO Guide Section */
.seo-guide-container {
  max-width: 1200px;
  margin: 60px auto 40px;
  padding: 0 24px;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.7;
}

.seo-guide-container h2 {
  color: var(--text-primary, #ffffff);
  font-size: 1.65rem;
  font-weight: 800;
  margin: 36px 0 16px;
  border-left: 4px solid #ec4899;
  padding-left: 14px;
  letter-spacing: -0.02em;
}

.seo-guide-container h3 {
  color: var(--text-primary, #ffffff);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 24px 0 12px;
}

.seo-guide-container p {
  margin-bottom: 16px;
}

.seo-guide-container ul,
.seo-guide-container ol {
  margin: 12px 0 20px 24px;
}

.seo-guide-container li {
  margin-bottom: 8px;
}

.faq-accordion {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card, rgba(15, 23, 42, 0.75));
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-md, 12px);
  padding: 16px 20px;
  transition: border-color 0.2s ease;
}

.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.faq-question {
  color: var(--text-primary, #ffffff);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-indicator {
  font-size: 1.2rem;
  color: #ec4899;
  font-weight: 800;
}

.faq-answer {
  margin-top: 12px;
  font-size: 0.92rem;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.65;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
}

/* Fluid Media & Responsiveness */
canvas,
img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .comment-gen-container {
    padding: 0 12px;
    gap: 16px;
  }

  .feed-header-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .feed-search-input {
    max-width: 100%;
  }

  .comment-card {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px;
  }

  .comment-actions-box {
    justify-content: flex-end;
    margin-top: 6px;
  }

  .comment-copy-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .pill-grid {
    gap: 6px;
  }

  .choice-pill {
    padding: 6px 12px;
    font-size: 0.76rem;
  }
}
