/* Seth Brand Ask - styles for the "Ask a Tech Question" page.
   Extends consolidated.css and theme.css. */

/* --- Hero --- */
.ask-hero {
  padding: 3rem 0 2rem;
  background:
    radial-gradient(circle at top left, rgba(74, 222, 128, 0.06), transparent 30%),
    linear-gradient(180deg, var(--bg-darker, #05080b) 0%, var(--bg-dark, #070b0f) 100%);
}

.ask-hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 400;
  line-height: 1.2;
  margin: 0.5rem 0 1rem;
  color: var(--text-primary, #f0f0f0);
}

.ask-hero-sub {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-secondary, #a0a8b0);
  max-width: 620px;
  margin-bottom: 2rem;
}

/* --- Form --- */
.ask-form {
  max-width: 720px;
}

.ask-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary, #a0a8b0);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ask-input {
  width: 100%;
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text-primary, #f0f0f0);
  font-family: 'Jost', sans-serif;
  font-size: 1.05rem;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.2s, background 0.2s;
}

.ask-input:focus {
  outline: none;
  border-color: rgba(74, 222, 128, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.ask-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.ask-form-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
}

.ask-char-count {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted, #6a7280);
}

.ask-char-near-limit {
  color: #f59e0b;
}

.ask-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.8rem;
  background: var(--accent, #4ade80);
  color: #05080b;
  border: none;
  border-radius: 6px;
  font-family: 'Jost', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.ask-submit-btn:hover {
  opacity: 0.9;
}

.ask-submit-btn:active {
  transform: scale(0.98);
}

.ask-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ask-submit-spinner .ri-spin {
  animation: ri-spin 1s linear infinite;
}

@keyframes ri-spin {
  to { transform: rotate(360deg); }
}

/* --- Example chips --- */
.ask-example-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  max-width: 720px;
}

.ask-example-chip {
  padding: 0.4rem 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: var(--text-secondary, #a0a8b0);
  font-family: 'Jost', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.ask-example-chip:hover {
  border-color: rgba(74, 222, 128, 0.4);
  color: var(--text-primary, #f0f0f0);
}

/* --- Results --- */
.ask-results-section {
  padding: 2rem 0 4rem;
}

.ask-results {
  max-width: 820px;
  margin: 0 auto;
}

.ask-answer-header {
  margin-bottom: 1.5rem;
}

.ask-drill-label {
  font-size: 0.85rem;
  color: var(--accent, #4ade80);
  margin-bottom: 0.25rem;
}

.ask-question-echo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-primary, #f0f0f0);
  line-height: 1.3;
}

.ask-direct-answer {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-primary, #e0e0e0);
  margin-bottom: 2rem;
  padding: 1.2rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--accent, #4ade80);
  border-radius: 0 6px 6px 0;
}

.ask-direct-answer p {
  margin: 0.5rem 0;
}

.ask-direct-answer p:first-child {
  margin-top: 0;
}

.ask-direct-answer p:last-child {
  margin-bottom: 0;
}

/* --- Top recommendation card --- */
.ask-top-rec {
  position: relative;
  padding: 1.5rem;
  background: rgba(74, 222, 128, 0.06);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 10px;
  margin-bottom: 2rem;
}

.ask-card-badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  background: var(--accent, #4ade80);
  color: #05080b;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.ask-card-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-primary, #f0f0f0);
  margin: 0 0 0.5rem;
}

.ask-card-pitch {
  font-size: 1rem;
  color: var(--text-secondary, #a0a8b0);
  margin: 0 0 0.75rem;
}

.ask-card-why {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary, #e0e0e0);
  margin: 0;
}

/* --- Alternatives --- */
.ask-section-title {
  font-family: 'Jost', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary, #f0f0f0);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ask-alt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.ask-alt-card {
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.ask-alt-card .ask-card-name {
  font-size: 1.1rem;
}

.ask-card-best-for {
  font-size: 0.9rem;
  color: var(--text-secondary, #a0a8b0);
  margin: 0.5rem 0 0;
}

.ask-card-best-for span {
  color: var(--text-muted, #6a7280);
}

/* --- Comparison table --- */
.ask-comparison-wrap {
  margin-bottom: 2rem;
  overflow-x: auto;
}

.ask-comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ask-comparison-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary, #a0a8b0);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ask-comparison-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-primary, #e0e0e0);
  vertical-align: top;
}

.ask-comparison-table tr:last-child td {
  border-bottom: none;
}

.ask-table-top-row {
  background: rgba(74, 222, 128, 0.04);
}

.ask-table-name {
  font-weight: 500;
}

.ask-table-price {
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  white-space: nowrap;
}

.ask-table-verdict {
  font-style: italic;
  color: var(--text-secondary, #a0a8b0);
  max-width: 200px;
}

/* --- Verdict --- */
.ask-verdict {
  padding: 1.2rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.ask-verdict p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary, #e0e0e0);
  margin: 0.5rem 0 0;
}

/* --- Follow-ups --- */
.ask-follow-ups {
  margin-bottom: 1.5rem;
}

.ask-follow-ups-label {
  font-size: 0.9rem;
  color: var(--text-secondary, #a0a8b0);
  margin-bottom: 0.75rem;
}

.ask-follow-up-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ask-follow-up-chip {
  padding: 0.5rem 1rem;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 6px;
  color: var(--accent, #4ade80);
  font-family: 'Jost', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

.ask-follow-up-chip:hover {
  background: rgba(74, 222, 128, 0.15);
}

/* --- Tier indicator --- */
.ask-tier-indicator {
  font-size: 0.85rem;
  color: var(--text-muted, #6a7280);
  text-align: right;
  margin-top: 0.5rem;
}

/* --- Drill-down separator --- */
.ask-drill-separator {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 2.5rem 0;
}

/* --- Error banner --- */
.ask-error-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 0;
  background: rgba(239, 68, 68, 0.95);
  color: #fff;
  font-size: 0.95rem;
  z-index: 1000;
  text-align: center;
}

/* --- Modals --- */
.ask-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 1rem;
}

.ask-modal-overlay[hidden] {
  display: none;
}

.ask-modal {
  position: relative;
  max-width: 460px;
  width: 100%;
  padding: 2rem;
  background: var(--bg-dark, #0d1117);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.ask-modal h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-primary, #f0f0f0);
  margin: 0 0 0.75rem;
}

.ask-modal-sub {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary, #a0a8b0);
  margin-bottom: 1.5rem;
}

.ask-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted, #6a7280);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.ask-modal-close:hover {
  color: var(--text-primary, #f0f0f0);
}

.ask-email-gate-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ask-email-input {
  padding: 0.8rem 1rem;
}

.ask-turnstile-wrap {
  min-height: 65px;
}

.ask-cta-btn {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  padding: 0.8rem 1.8rem;
  margin-top: 0.5rem;
}

.ask-modal-note {
  font-size: 0.85rem;
  color: var(--text-muted, #6a7280);
  margin-top: 1rem;
  text-align: center;
}

.ask-modal-note a {
  color: var(--accent, #4ade80);
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .ask-hero {
    padding: 2rem 0 1.5rem;
  }

  .ask-form-meta {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .ask-submit-btn {
    align-self: flex-end;
  }

  .ask-alt-grid {
    grid-template-columns: 1fr;
  }

  .ask-comparison-table {
    font-size: 0.8rem;
  }

  .ask-comparison-table th,
  .ask-comparison-table td {
    padding: 0.5rem 0.6rem;
  }

  .ask-table-verdict {
    max-width: 120px;
  }
}
