/*
 * theme.css: visual refresh layered on top of styles.css.
 * Loaded AFTER styles.css. To roll back, delete the <link> to this file in index.html.
 * CSS only: no markup, script or content changes.
 */

:root {
  /* BRIDDHI logo palette: plum, magenta, teal. Variable names keep "orange" because styles.css uses them. */
  --orange: #8A2866;
  --orange-soft: #F6E4EF;
  --orange-faded: #D9A9C4;
  --orange-deep: #6B1D4F;
  --orange-bright: #B83888;
  --teal: #2F7A88;
  --green: #2F7A88;
  --bg: #F6F2F5;
  --shadow-sm: 0 1px 2px rgba(31, 26, 23, 0.05);
  --shadow-md: 0 1px 2px rgba(31, 26, 23, 0.05), 0 10px 28px rgba(31, 26, 23, 0.08);
  --shadow-btn: 0 6px 16px rgba(138, 40, 102, 0.32);
}

body {
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Soft entrance when a screen appears (disabled automatically by reduced-motion rule in styles.css) */
@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.view { animation: viewIn 350ms ease-out; }

/* ===== Header band: depth instead of a flat block ===== */
.header-band {
  position: relative;
  overflow: hidden;
  background-color: var(--orange);
  background-image: linear-gradient(145deg, var(--orange-bright) 0%, var(--orange) 45%, var(--orange-deep) 100%);
  border-radius: 0 0 28px 28px;
  border-bottom: 5px solid var(--teal);
  box-shadow: 0 10px 30px rgba(107, 29, 79, 0.22);
}

.header-band::before,
.header-band::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.08);
}
.header-band::before { width: 220px; height: 220px; top: -90px; right: -70px; }
.header-band::after  { width: 140px; height: 140px; bottom: -60px; left: -40px; }

.header-band > * { position: relative; z-index: 1; }

#view-landing .header-band,
#view-question .header-band { padding: 1.75rem 1.25rem 2.1rem; }

#view-landing .header-band h1 { font-size: 1.85rem; letter-spacing: -0.01em; }

/* ===== Cards ===== */
#view-landing .card,
#view-question .card,
#view-form .card,
#view-results .card:not(.workshop-card) {
  border: 1px solid rgba(230, 224, 219, 0.8);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
}

#view-landing .container,
#view-question .container,
#view-form .container,
#view-results .container {
  margin-top: -0.9rem;
  position: relative;
  z-index: 2;
}

/* ===== Buttons ===== */
.btn { border-radius: 14px; }

.btn-primary {
  padding: 0.95rem 1.5rem;
  box-shadow: var(--shadow-btn);
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}
.btn-primary:hover:not(:disabled) {
  background-color: var(--orange-deep);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(138, 40, 102, 0.38);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); box-shadow: var(--shadow-btn); }
.btn:disabled { box-shadow: none; }

.btn-secondary { border-width: 1.5px; background-color: white; }
.btn-secondary:hover:not(:disabled) { background-color: var(--orange-soft); }

/* ===== Landing: module list ===== */
#view-landing .category-card {
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}
#view-landing .category-card:hover {
  transform: translateY(-2px);
  border-color: var(--orange-faded);
  box-shadow: 0 8px 20px rgba(31, 26, 23, 0.08);
}
#view-landing .num-badge {
  background-image: linear-gradient(145deg, var(--orange-bright), var(--orange-deep));
  background-color: var(--orange);
  color: white;
  box-shadow: 0 4px 10px rgba(138, 40, 102, 0.28);
}

/* ===== Question screen ===== */
#view-question .progress-bar-container::before { background-color: rgba(255, 255, 255, 0.28); }
#view-question .progress-bar-fill,
#view-question .progress-bar-container::before { height: 10px; }

#view-question .card > p:first-child {
  font-size: 1.18rem;
  line-height: 1.4;
  letter-spacing: -0.005em;
}

#view-question .category-pill,
#view-question .question-row .pill {
  color: var(--orange-deep);
}

#view-question .option-button {
  position: relative;
  padding: 0.95rem 2.75rem 0.95rem 1.1rem;
  border-width: 1.5px;
  border-radius: 16px;
  transition: transform 120ms ease, border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
#view-question .option-button:hover {
  background-color: #FFF8F4;
  transform: translateX(2px);
}
#view-question .option-button.selected {
  background-color: var(--orange-soft);
  box-shadow: 0 0 0 1px var(--orange), 0 6px 16px rgba(138, 40, 102, 0.16);
}
#view-question .option-button.selected::after {
  content: "\2713";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background-color: var(--orange);
  color: white;
  font-size: 0.8rem;
  font-weight: 800;
}

/* ===== Registration form ===== */
#view-form .field input[type="text"],
#view-form .field input[type="email"],
#view-form .field input[type="tel"],
#view-form .field select {
  border-width: 1.5px;
  border-radius: 14px;
  background-color: #FFFDFC;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
#view-form .field input:focus,
#view-form .field select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(138, 40, 102, 0.16);
}

/* ===== Results ===== */
#view-results .ring { width: 176px; height: 176px; }
#view-results .ring-progress { stroke-linecap: round; }
#view-results .ring-text { font-size: 2.8rem; letter-spacing: -0.02em; }
#view-results .band-label { font-size: 1.3rem; }
#view-results .bar { height: 10px; }
#view-results .bar-fill { transition: width 600ms ease-out; }
#view-results .pill-developing { color: var(--orange-deep); }

#view-results .workshop-card {
  background-image: linear-gradient(145deg, var(--orange-bright) 0%, var(--orange) 50%, var(--orange-deep) 100%);
  border: none;
  border-radius: 20px;
  box-shadow: 0 14px 32px rgba(107, 29, 79, 0.28);
}
#view-results .workshop-card .btn {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}
#view-results .workshop-card .btn:hover:not(:disabled) {
  background-color: var(--orange-soft);
}

/* ===== Print: drop decoration, keep content ===== */
@media print {
  .header-band { border-radius: 0; box-shadow: none; }
  .header-band::before,
  .header-band::after { display: none; }
  .view { animation: none; }
  #view-results .container { margin-top: 0; }
}

/* ===== Logo in the landing and results headers ===== */
.brand-logo {
  display: block;
  width: 112px;
  height: auto;
  margin: 0 auto 1rem;
  padding: 6px;
  background-color: white;
  border: 2px solid #2B0F22;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

#view-results .brand-logo { width: 84px; margin-bottom: 0.85rem; }

@media print {
  .brand-logo { box-shadow: none; }
}

/* ===== Presenter strip in the landing header ===== */
/* Transparent: only the white text and his cutout photo show. Text sits at the bottom left of the photo. */
#view-landing .header-band:has(.presenter-strip) { padding-bottom: 0; }

.presenter-strip {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.75rem;
  max-width: 560px;
  margin: 1.25rem auto 0;
  text-align: left;
}

.presenter-text {
  flex: 1 1 0;
  min-width: 0;
  align-self: flex-end;
  padding-bottom: 1.5rem;
}

.presenter-name {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
  color: white;
}

.presenter-title {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.88);
}

.presenter-creds {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
}

.presenter-creds li {
  position: relative;
  padding-left: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.94);
}

.presenter-creds li + li { margin-top: 0.2rem; }


.presenter-photo {
  flex: none;
  display: block;
  width: 52%;
  max-width: 250px;
  height: auto;
  align-self: flex-end;
  margin-left: -4%;
  /* soften the photo's right edge, which is cut off in the original file */
  -webkit-mask-image: linear-gradient(to right, #000 75%, transparent 100%);
  mask-image: linear-gradient(to right, #000 75%, transparent 100%);
}

/* Wide screens: photo full header height at the right edge, credentials at its bottom left (as in the approved mockup) */
@media (min-width: 1240px) {
  #view-landing .header-band:has(.presenter-strip) { padding-bottom: 2.1rem; }

  .presenter-strip {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 360px;
    height: 100%;
    max-width: none;
    margin: 0;
    display: block;
  }

  .presenter-photo {
    position: absolute;
    right: 0;
    bottom: 0;
    margin-left: 0;
    width: auto;
    max-width: none;
    height: 100%;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .presenter-text {
    position: absolute;
    left: 0;
    bottom: 0.9rem;
    width: 290px;
    padding: 0;
    z-index: 2;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  }

  .presenter-name { font-size: 0.8rem; font-weight: 600; }
  .presenter-title { margin-top: 0; font-size: 0.78rem; font-weight: 500; line-height: 1.3; }
  .presenter-creds { margin-top: 0.4rem; }
  .presenter-creds li { font-size: 0.78rem; line-height: 1.35; }
  .presenter-creds li + li { margin-top: 0; }
}

@media print {
  .presenter-photo { display: none; }
}

/* ===== Assessment timer and "session ended" page ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.timer-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.7rem;
}

.timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background-color: white;
  color: var(--orange-deep);
  font-size: 0.85rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transition: background-color 200ms ease, color 200ms ease;
}

.timer-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.timer-pill.timer-low {
  background-color: var(--danger);
  color: white;
  animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* Session ended page (same look as the landing header and card) */
#view-ended .header-band { padding: 1.75rem 1.25rem 2.1rem; text-align: center; }
#view-ended .header-band h1 { margin: 0; font-size: 1.7rem; line-height: 1.2; font-weight: 800; color: white; }

#view-ended .container {
  padding: 1.25rem 1rem 3rem;
  margin-top: -0.9rem;
  position: relative;
  z-index: 2;
}

#view-ended .card {
  background-color: var(--card);
  border: 1px solid rgba(230, 224, 219, 0.8);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  padding: 1.5rem 1.25rem;
}

#view-ended .card p {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  line-height: 1.55;
  text-align: center;
  color: var(--muted);
}

@media print {
  .timer-row { display: none; }
}

/* PHONE_STATUS_V1: country-code picker, hint line and "Others" write-in */
#view-form .field .phone-other,
#view-form .field .status-other { margin-top: 0.5rem; }
#view-form .field #phone { margin-top: 0.5rem; }
#view-form .field-hint {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #6B5E66;
  text-align: left;
}
#view-form .phone-other[hidden] { display: none !important; }
#view-form .status-other[hidden] { display: none !important; }
