/* ============================================
   TEST WRAPPER — User Testing Layer
   Distinct from Venue UI. Clean, minimal, warm.
   ============================================ */

/* --- Landing Page (pre-phone) --- */
.test-landing {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FDF8F4;
  font-family: var(--font-family);
}

.test-landing__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  max-width: 400px;
  padding: 40px 32px;
  text-align: center;
}

.test-landing__logos {
  display: flex;
  align-items: center;
  gap: 16px;
}

.test-landing__venue-logo {
  height: 48px;
  object-fit: contain;
}

.test-landing__divider {
  width: 1px;
  height: 36px;
  background: rgba(101, 77, 78, 0.15);
}

.test-landing__bobby-logo {
  height: 36px;
  object-fit: contain;
}

.test-landing__welcome {
  font-weight: 600;
  font-size: 20px;
  color: var(--brown);
  line-height: 1.4;
}

.test-landing__subtitle {
  font-weight: 400;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.test-landing__begin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 44px;
  border: none;
  border-radius: var(--radius-button);
  background: linear-gradient(162deg, #77DBD2 11%, #69BFCC 79%);
  box-shadow: 0 1.5px 2px rgba(88, 173, 185, 0.3), 0 1.5px 2px rgba(101, 77, 78, 0.1), inset 0 -2px 0 rgba(88, 173, 185, 0.8);
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
  cursor: pointer;
  transition: transform 100ms ease-out;
}

.test-landing__begin:hover { transform: scale(1.03); }
.test-landing__begin:active { transform: scale(0.97); }


/* --- Demographics (pre-phone) --- */
.test-demographics {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  background: #FDF8F4;
  font-family: var(--font-family);
}

.test-demographics--active {
  display: flex;
}

.test-demographics__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 380px;
  width: 100%;
  padding: 40px 32px;
}

.test-demographics__title {
  font-weight: 700;
  font-size: 22px;
  color: var(--brown);
  text-align: center;
  margin-bottom: 4px;
}

.test-demographics__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.test-demographics__label {
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.test-demographics__input,
.test-demographics__select {
  height: 44px;
  padding: 0 16px;
  border: 1.5px solid rgba(101, 77, 78, 0.15);
  border-radius: 14px;
  background: var(--white);
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--brown);
  outline: none;
  transition: border-color 200ms ease;
}

.test-demographics__input:focus,
.test-demographics__select:focus {
  border-color: var(--aqua);
}

.test-demographics__select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23A3898C' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* Mobile games: 3 buttons */
.test-demographics__buttons {
  display: flex;
  gap: 8px;
}

.test-demographics__btn {
  flex: 1;
  height: 40px;
  border: 1.5px solid rgba(101, 77, 78, 0.15);
  border-radius: 14px;
  background: var(--white);
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: all 150ms ease;
}

.test-demographics__btn--active {
  border-color: var(--aqua);
  background: rgba(132, 201, 201, 0.1);
  color: var(--brown);
}

.test-demographics__btn:hover {
  border-color: var(--aqua);
}

.test-demographics__continue {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  margin-top: 8px;
  border: none;
  border-radius: var(--radius-button);
  background: linear-gradient(162deg, #77DBD2 11%, #69BFCC 79%);
  box-shadow: 0 1.5px 2px rgba(88, 173, 185, 0.3), 0 1.5px 2px rgba(101, 77, 78, 0.1), inset 0 -2px 0 rgba(88, 173, 185, 0.8);
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
  cursor: pointer;
  transition: transform 100ms ease-out;
}

.test-demographics__continue:hover { transform: scale(1.02); }
.test-demographics__continue:active { transform: scale(0.97); }


/* --- Companion Scenario Card (Desktop: sidebar) --- */
.companion-card {
  position: fixed;
  right: calc(50% + 230px);
  top: 50%;
  transform: translateY(-50%);
  width: 260px;
  z-index: 50;
  display: none;
  transition: opacity 300ms ease, transform 300ms ease;
}

.companion-card--active {
  display: block;
  animation: companionSlideIn 400ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes companionSlideIn {
  0% { opacity: 0; transform: translateY(-50%) translateX(-20px); }
  100% { opacity: 1; transform: translateY(-50%) translateX(0); }
}

.companion-card__inner {
  background: var(--white);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(101, 77, 78, 0.08), 0 1px 3px rgba(101, 77, 78, 0.06);
  border: 1px solid rgba(101, 77, 78, 0.06);
}

.companion-card__step {
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--aqua);
  margin-bottom: 8px;
}

.companion-card__text {
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  color: var(--brown);
}

.companion-card__text em {
  font-style: italic;
  color: var(--coral);
}

/* Progress dots at bottom */
.companion-card__progress {
  display: flex;
  gap: 6px;
  margin-top: 16px;
  justify-content: center;
}

.companion-card__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(101, 77, 78, 0.12);
  transition: all 200ms ease;
}

.companion-card__dot--active {
  width: 20px;
  border-radius: 3px;
  background: var(--aqua);
}


/* Music toggle in companion card */
.companion-card__music {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 12px;
  background: rgba(101, 77, 78, 0.04);
  border-radius: 12px;
  cursor: pointer;
  transition: background 150ms ease;
}

.companion-card__music:hover {
  background: rgba(101, 77, 78, 0.08);
}

.companion-card__music-icon {
  flex-shrink: 0;
  transition: opacity 150ms ease;
}

.companion-card__music-icon path {
  transition: opacity 150ms ease;
}

.companion-card__music-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

/* --- Mobile: Pull-down widget --- */
@media (max-width: 768px) {
  .companion-card {
    position: fixed;
    left: 50%;
    top: 0;
    transform: translateX(-50%) translateY(-100%);
    width: calc(100% - 32px);
    max-width: 400px;
    z-index: 100;
  }

  .companion-card--active {
    animation: none;
    transform: translateX(-50%) translateY(-100%);
  }

  .companion-card--expanded {
    transform: translateX(-50%) translateY(12px);
  }

  .companion-card__tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 110px;
    height: 30px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 12px rgba(101, 77, 78, 0.1);
    font-family: var(--font-family);
    font-size: 10px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    transition: background 150ms ease;
  }

  .companion-card__tab:active {
    background: #F6EEE6;
  }

  .companion-card__tab svg {
    flex-shrink: 0;
  }
}

@media (min-width: 769px) {
  .companion-card__tab {
    display: none;
  }
}


/* --- Time Splash (transition between sections) --- */
.time-splash {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  background: radial-gradient(ellipse at center, #FFF7F0 0%, #F7E5D9 60%, #EDD4C7 100%);
  font-family: var(--font-family);
  text-align: center;
  padding: 40px;
}

.time-splash--active {
  display: flex;
}

.time-splash__day {
  font-weight: 700;
  font-size: 42px;
  color: var(--coral);
  opacity: 0.6;
}

.time-splash__title {
  font-weight: 700;
  font-size: 22px;
  color: var(--brown);
}

.time-splash__desc {
  font-weight: 400;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  max-width: 280px;
}

.time-splash__continue {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 40px;
  margin-top: 12px;
  border: none;
  border-radius: var(--radius-button);
  background: linear-gradient(168deg, #FFC226 20%, #F59E4D 99%);
  box-shadow: 0 1.5px 2px rgba(242, 160, 59, 0.3), 0 1.5px 2px rgba(101, 77, 78, 0.1), inset 0 -2px 0 rgba(225, 127, 54, 0.3);
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 12px;
  color: var(--white);
  cursor: pointer;
  transition: transform 100ms ease-out;
}

.time-splash__continue:hover { transform: scale(1.02); }
.time-splash__continue:active { transform: scale(0.97); }


/* --- Fork Screen --- */
.test-fork {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  background: radial-gradient(ellipse at center, #FFF7F0 0%, #F7E5D9 60%, #EDD4C7 100%);
  font-family: var(--font-family);
  text-align: center;
  padding: 40px;
}

.test-fork--active {
  display: flex;
}

.test-fork__title {
  font-weight: 700;
  font-size: 20px;
  color: var(--brown);
  line-height: 1.3;
}

.test-fork__desc {
  font-weight: 400;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.test-fork__options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 280px;
}

.test-fork__option {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border: none;
  border-radius: 16px;
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform 100ms ease-out;
}

.test-fork__option:hover { transform: scale(1.02); }
.test-fork__option:active { transform: scale(0.97); }

.test-fork__option--complete {
  background: linear-gradient(162deg, #77DBD2 11%, #69BFCC 79%);
  box-shadow: 0 1.5px 2px rgba(88, 173, 185, 0.3), inset 0 -2px 0 rgba(88, 173, 185, 0.8);
  color: var(--white);
}

.test-fork__option--short {
  background: var(--white);
  border: 1.5px solid rgba(101, 77, 78, 0.15);
  color: var(--brown);
}


/* --- Thank You Screen --- */
.test-thankyou {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  background: #FDF8F4;
  font-family: var(--font-family);
}

.test-thankyou--active {
  display: flex;
}

.test-thankyou__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  max-width: 400px;
  padding: 40px 32px;
  text-align: center;
  animation: celebTextIn 600ms ease-out both;
}

.test-thankyou__message {
  font-weight: 500;
  font-size: 18px;
  color: var(--brown);
  line-height: 1.5;
}

.test-thankyou__submessage {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.test-thankyou__feedback {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 340px;
  animation: celebTextIn 500ms ease-out 400ms both;
}

.test-thankyou__feedback-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--brown);
  text-align: left;
}

.test-thankyou__feedback-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid rgba(101, 77, 78, 0.12);
  border-radius: 14px;
  background: var(--white);
  font-family: var(--font-family);
  font-size: 13px;
  color: var(--brown);
  resize: none;
  outline: none;
  transition: border-color 200ms ease;
  line-height: 1.5;
}

.test-thankyou__feedback-input:focus {
  border-color: var(--aqua);
}

.test-thankyou__feedback-input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.test-thankyou__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border: none;
  border-radius: var(--radius-button);
  background: linear-gradient(162deg, #77DBD2 11%, #69BFCC 79%);
  box-shadow: 0 1.5px 2px rgba(88, 173, 185, 0.3), 0 1.5px 2px rgba(101, 77, 78, 0.1), inset 0 -2px 0 rgba(88, 173, 185, 0.8);
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 13px;
  color: var(--white);
  cursor: pointer;
  transition: transform 100ms ease-out;
}

.test-thankyou__submit:hover { transform: scale(1.02); }
.test-thankyou__submit:active { transform: scale(0.97); }

.test-thankyou__submit--done {
  background: rgba(101, 77, 78, 0.08);
  box-shadow: none;
  color: var(--muted);
  pointer-events: none;
}

.test-thankyou__close-msg {
  font-weight: 500;
  font-size: 13px;
  color: var(--coral);
  text-align: center;
  line-height: 1.6;
  margin-top: 16px;
  animation: celebTextIn 600ms ease-out both;
}


/* --- Tap Logger Gear --- */
/* Gear icon removed — data goes to Supabase */
