/**
 * NeuroVeda AI — Quiz Integration Styles
 *
 * Styles for AI recommendation cards injected into the Dosha Quiz results screen.
 * Uses the NeuroVeda brand palette: teal #0c3d45, maroon #7a1e3a, gold #c9a84c
 */

/* ── Container ── */
.nv-ai-recs {
  margin-top: 28px;
  animation: nvAiFadeIn 0.4s ease-out;
}

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

/* ── Loading State ── */
.nv-ai-loading {
  text-align: center;
  padding: 40px 20px;
}

.nv-ai-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e8e4de;
  border-top-color: #0c3d45;
  border-radius: 50%;
  animation: nvAiSpin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes nvAiSpin {
  to { transform: rotate(360deg); }
}

.nv-ai-loading-text {
  font-size: 15px;
  font-weight: 500;
  color: #0c3d45;
  margin: 0 0 4px;
}

.nv-ai-loading-sub {
  font-size: 13px;
  color: #6b6b6b;
  margin: 0;
}

/* ── Header ── */
.nv-ai-header {
  margin-bottom: 20px;
}

.nv-ai-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #c9a84c;
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.25);
  margin-bottom: 10px;
}

.nv-ai-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 500;
  color: #0c3d45;
  margin: 0 0 8px;
  letter-spacing: 0.01em;
}

.nv-ai-guidance {
  font-size: 14px;
  line-height: 1.6;
  color: #6b6b6b;
  margin: 0;
  padding: 12px 16px;
  background: rgba(12, 61, 69, 0.03);
  border-left: 3px solid #0c3d45;
  border-radius: 0 8px 8px 0;
}

/* ── Cards Grid ── */
.nv-ai-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Single Card ── */
.nv-ai-card {
  background: #ffffff;
  border: 1px solid #e8e4de;
  border-radius: 14px;
  padding: 18px 20px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  animation: nvAiCardIn 0.35s ease-out both;
}

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

.nv-ai-card:hover {
  border-color: #0c3d45;
  box-shadow: 0 4px 16px rgba(12, 61, 69, 0.08);
}

/* ── Card Header ── */
.nv-ai-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.nv-ai-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0c3d45, #14565f);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
}

.nv-ai-card-title {
  flex: 1;
}

.nv-ai-card-title h4 {
  font-size: 16px;
  font-weight: 600;
  color: #2a2a2a;
  margin: 0 0 2px;
  line-height: 1.3;
}

.nv-ai-duration {
  font-size: 12px;
  color: #999;
  font-weight: 400;
}

/* ── Brainwave Tags ── */
.nv-ai-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.nv-ai-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  text-transform: capitalize;
  border: 1px solid;
}

/* ── Explanation ── */
.nv-ai-explanation {
  font-size: 14px;
  line-height: 1.6;
  color: #4a4a4a;
  margin: 0 0 8px;
}

/* ── Why This Session (expandable) ── */
.nv-ai-why {
  margin-top: 8px;
  border-top: 1px solid #f0ede8;
  padding-top: 8px;
}

.nv-ai-why summary {
  font-size: 13px;
  font-weight: 500;
  color: #0c3d45;
  cursor: pointer;
  padding: 4px 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nv-ai-why summary::before {
  content: '▸';
  font-size: 11px;
  transition: transform 0.2s;
}

.nv-ai-why[open] summary::before {
  transform: rotate(90deg);
}

.nv-ai-why summary::-webkit-details-marker {
  display: none;
}

.nv-ai-why p {
  font-size: 13px;
  line-height: 1.6;
  color: #6b6b6b;
  margin: 8px 0 0;
  padding-left: 17px;
}

/* ── Email Capture Gate ── */
.nv-ai-gate {
  text-align: center;
  padding: 32px 24px;
  animation: nvAiFadeIn 0.3s ease-out;
}

.nv-ai-gate-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.nv-ai-gate-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  color: #0c3d45;
  margin: 0 0 8px;
}

.nv-ai-gate-sub {
  font-size: 14px;
  color: #6b6b6b;
  line-height: 1.5;
  margin: 0 0 20px;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

.nv-ai-gate-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
  margin: 0 auto;
}

.nv-ai-gate-input {
  padding: 12px 16px;
  border: 1.5px solid #e8e4de;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.nv-ai-gate-input:focus {
  border-color: #0c3d45;
}

.nv-ai-gate-btn {
  padding: 14px 24px;
  background: linear-gradient(135deg, #0c3d45, #14565f);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s;
}

.nv-ai-gate-btn:hover {
  opacity: 0.9;
}

.nv-ai-gate-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.nv-ai-gate-skip {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  color: #999;
  text-decoration: none;
  transition: color 0.2s;
}

.nv-ai-gate-skip:hover {
  color: #666;
}

/* ── Email Notice (after results) ── */
.nv-ai-email-notice {
  text-align: center;
  font-size: 13px;
  color: #6b6b6b;
  margin-top: 20px;
  padding: 12px;
  background: rgba(12, 61, 69, 0.03);
  border-radius: 8px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .nv-ai-card {
    padding: 14px 16px;
  }

  .nv-ai-title {
    font-size: 20px;
  }

  .nv-ai-explanation {
    font-size: 13px;
  }

  .nv-ai-guidance {
    font-size: 13px;
    padding: 10px 12px;
  }
}
