/* ==========================================================================
   DigiAi Dhairya - Creator Tools Unified Stylesheet
   Module: Standalone Creator Utilities (Viral Hook Generator, etc.)
   ========================================================================== */

.creator-tool-wrap {
  padding-top: 1.5rem;
  padding-bottom: 4rem;
}

/* Tool Hero Header */
.creator-tool-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 2rem auto;
}

.creator-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-cyan, #06b6d4);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  margin-bottom: 1rem;
}

.creator-tool-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary, #f8fafc);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.creator-tool-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
}

/* Engine Disclosure Banner */
.tool-engine-notice {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  font-size: 0.88rem;
  color: var(--text-secondary, #94a3b8);
  margin: 1.5rem auto 0 auto;
  max-width: 740px;
  text-align: left;
}

.tool-engine-notice i {
  color: var(--brand-electric, #3b82f6);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.tool-engine-notice strong {
  color: var(--text-primary, #f8fafc);
}

/* Main Interactive Card */
.creator-tool-card {
  background: var(--color-bg-surface-elevated, #111a2e);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.12));
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  margin-bottom: 3.5rem;
  position: relative;
  overflow: hidden;
}

.creator-tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
}

/* Form Styles */
.hook-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.hook-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary, #f8fafc);
  margin-bottom: 0.5rem;
}

.form-label i {
  color: var(--brand-electric, #3b82f6);
  margin-right: 0.35rem;
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--color-bg-input, rgba(15, 23, 42, 0.8));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  color: var(--text-primary, #f8fafc);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--border-focus, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  background: rgba(15, 23, 42, 0.95);
}

.form-input::placeholder {
  color: var(--text-muted, #64748b);
}

/* Suggested Topic Pills */
.topic-pills-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.topic-pill-label {
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
  font-weight: 500;
}

.topic-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  transition: all 0.15s ease;
}

.topic-pill:hover {
  background: rgba(59, 130, 246, 0.15);
  color: var(--text-primary, #f8fafc);
  border-color: rgba(59, 130, 246, 0.3);
}

/* Button Row */
.form-actions-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.btn-generate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.95rem 1.85rem;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

.btn-generate:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.btn-generate:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.4rem;
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.15));
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reset:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary, #f8fafc);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Error State */
.input-error-msg {
  color: #ef4444;
  font-size: 0.82rem;
  margin-top: 0.35rem;
  display: none;
}

.input-error-msg.visible {
  display: block;
}

/* Generated Hooks Results Section */
.hook-results-wrap {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  display: none;
}

.hook-results-wrap.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.results-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.results-header-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.results-header-title h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary, #f8fafc);
  margin: 0;
}

.results-count-pill {
  background: rgba(59, 130, 246, 0.15);
  color: var(--brand-electric, #3b82f6);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-tool-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--color-bg-surface, #0c1220);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.15));
  color: var(--text-primary, #f8fafc);
  transition: all 0.2s ease;
}

.btn-tool-action:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
}

.btn-tool-action i {
  color: var(--brand-cyan, #06b6d4);
}

/* Hooks Grid */
.hooks-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.standalone-hook-card {
  background: var(--color-bg-surface, #0c1220);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  transition: all 0.2s ease;
}

.standalone-hook-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.standalone-hook-card-content {
  flex: 1;
}

.hook-badges-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.hook-formula-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.15);
  color: var(--brand-violet, #8b5cf6);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.hook-platform-tag {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted, #64748b);
}

.standalone-hook-text {
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--text-primary, #f8fafc);
  margin: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-copy-hook {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1.15rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary, #f8fafc);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  min-width: 90px;
}

.btn-copy-hook:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
}

.btn-copy-hook.copied {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10b981;
}

/* Delivery Tips Box */
.retention-delivery-box {
  margin-top: 1.5rem;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.retention-delivery-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #10b981;
  margin-bottom: 0.5rem;
}

.retention-delivery-tips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.5;
  margin: 0;
  padding: 0;
  list-style: none;
}

.retention-delivery-tips li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.retention-delivery-tips li i {
  color: #10b981;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

/* Educational Content Sections */
.creator-content-section {
  margin-bottom: 3.5rem;
}

.creator-content-section h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-primary, #f8fafc);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.creator-content-section p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary, #94a3b8);
  margin-bottom: 1.25rem;
}

/* Framework Cards Grid */
.framework-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.framework-card {
  background: var(--color-bg-surface-elevated, #111a2e);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  padding: 1.75rem;
  transition: all 0.25s ease;
}

.framework-card:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.framework-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--brand-electric, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.framework-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary, #f8fafc);
  margin-bottom: 0.5rem;
}

.framework-card p {
  font-size: 0.9rem;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.framework-example {
  background: var(--color-bg-base, #070a12);
  border-left: 3px solid var(--brand-electric, #3b82f6);
  padding: 0.65rem 0.85rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.82rem;
  color: #cbd5e1;
  font-style: italic;
}

/* Platform Table */
.platform-guide-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  background: var(--color-bg-surface-elevated, #111a2e);
}

.platform-guide-table th,
.platform-guide-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  font-size: 0.9rem;
}

.platform-guide-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary, #f8fafc);
  font-weight: 600;
}

.platform-guide-table td {
  color: var(--text-secondary, #94a3b8);
}

/* FAQ Accordion */
.creator-faq-wrap {
  margin-top: 1.5rem;
}

.creator-faq-item {
  background: var(--color-bg-surface-elevated, #111a2e);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.creator-faq-question {
  padding: 1.25rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary, #f8fafc);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.2s ease;
  user-select: none;
}

.creator-faq-question:hover {
  color: var(--brand-electric, #3b82f6);
}

.creator-faq-question i {
  color: var(--brand-electric, #3b82f6);
  font-size: 0.85rem;
  transition: transform 0.3s ease;
}

.creator-faq-item.open .creator-faq-question i {
  transform: rotate(180deg);
}

.creator-faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary, #94a3b8);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 1rem;
}

.creator-faq-item.open .creator-faq-answer {
  display: block;
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .creator-tool-card {
    padding: 1.5rem;
    border-radius: 16px;
  }

  .creator-tool-title {
    font-size: 1.75rem;
  }

  .standalone-hook-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .btn-copy-hook {
    width: 100%;
  }

  .results-header-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .results-actions {
    width: 100%;
    justify-content: space-between;
  }

  .platform-guide-table {
    display: block;
    overflow-x: auto;
  }
}
