/* CSS Brand System for Europan Customer Survey */

:root {
  --brand-color: #342E4B;
  --brand-color-rgb: 52, 46, 75;
  --bg-color: #E6E6E6;
  --card-bg: #FFFFFF;
  
  /* Text colors */
  --text-dark: #201B30;
  --text-medium: #4A4462;
  --text-light: #7E7799;
  
  /* UI/Feedback colors */
  --accent-color: #DDAF56; /* Warm gold to pair with the dark brand color */
  --accent-color-hover: #C59A44;
  --gray-light: #F4F3F6;
  --gray-medium: #E2DFE7;
  
  /* Layout tokens */
  --border-radius-lg: 24px;
  --border-radius-md: 16px;
  --border-radius-sm: 8px;
  --shadow-premium: 0 12px 40px rgba(52, 46, 75, 0.08);
  --shadow-button: 0 4px 12px rgba(52, 46, 75, 0.15);
  
  /* Transition durations */
  --transition-smooth: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-fast: 0.2s ease;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  min-height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Wrapper to isolate the mobile view */
.survey-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100dvh;
  background-color: var(--bg-color);
}

/* Mobile Frame (Centered in Desktop) */
.mobile-container {
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  background-color: var(--card-bg);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: none;
  transition: var(--transition-smooth);
}

/* Media query to stylize on Desktop */
@media (min-width: 500px) {
  .mobile-container {
    height: 90vh;
    max-height: 850px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 25px 60px rgba(52, 46, 75, 0.12);
    border: 8px solid var(--brand-color);
  }
}

/* Header inside survey slides */
.app-header {
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid var(--gray-light);
  padding: 10px;
  z-index: 10;
  background-color: var(--card-bg);
}

.header-logo {
  height: 35px;
  object-fit: contain;
}

/* Progress Tracker */
.progress-bar-container {
  width: 100%;
  height: 5px;
  background-color: var(--gray-light);
  position: relative;
  z-index: 11;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background-color: var(--brand-color);
  transition: width 0.4s ease;
}

/* Slides management */
.slides-wrapper {
  flex: 1;
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 24px;
  overflow-y: auto;
}

.slide.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

/* Welcome Screen */
.welcome-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  height: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.welcome-logo {
  max-width: 180px;
  margin-bottom: 30px;
  object-fit: contain;
  animation: fadeInDown 0.6s ease;
}

.welcome-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--brand-color);
  line-height: 1.25;
  margin-bottom: 15px;
}

.welcome-subtitle {
  font-size: 15px;
  color: var(--text-medium);
  line-height: 1.5;
  margin-bottom: 30px;
  font-weight: 300;
}

.promo-box {
  background-color: var(--gray-light);
  border-left: 4px solid var(--accent-color);
  border-radius: var(--border-radius-sm);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  text-align: left;
  margin-bottom: 35px;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.promo-icon {
  font-size: 24px;
  margin-right: 15px;
}

.promo-text {
  font-size: 14px;
  color: var(--brand-color);
  line-height: 1.4;
}

/* Question Slides General styling */
.question-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
}

.question-number {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 5px;
}

.question-category {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.question-text {
  font-size: 22px;
  font-weight: 600;
  color: var(--brand-color);
  line-height: 1.35;
  margin-bottom: 30px;
}

/* Buttons Styling */
.btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--border-radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  outline: none;
  width: 100%;
}

.btn-primary {
  background-color: var(--brand-color);
  color: #FFFFFF;
  box-shadow: var(--shadow-button);
}

.btn-primary:hover {
  background-color: #231F33;
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--gray-light);
  color: var(--brand-color);
}

.btn-secondary:hover {
  background-color: var(--gray-medium);
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-dynamic {
  background-color: var(--brand-color);
  color: #FFFFFF;
}

/* Navigation layout */
.nav-buttons {
  display: flex;
  gap: 12px;
  margin-top: 35px;
}

.nav-buttons .btn {
  flex: 1;
}

/* Form inputs: Radios */
.options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-card {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-radius: var(--border-radius-md);
  border: 2px solid var(--gray-light);
  background-color: var(--gray-light);
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.option-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.option-label {
  font-size: 16px;
  font-weight: 500;
  color: var(--brand-color);
}

.option-card:hover {
  border-color: var(--brand-color);
  background-color: #FFFFFF;
}

.option-card input[type="radio"]:checked + .option-label {
  font-weight: 600;
}

.option-card:has(input[type="radio"]:checked) {
  border-color: var(--brand-color);
  background-color: rgba(52, 46, 75, 0.05);
}

/* Form inputs: 1 to 5 Rating scale */
.rating-scale {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.rating-btn {
  flex: 1;
  aspect-ratio: 1;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  border-radius: 50%;
  border: 2px solid var(--gray-light);
  background-color: var(--gray-light);
  color: var(--brand-color);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  justify-content: center;
  align-items: center;
  outline: none;
}

.rating-btn:hover {
  border-color: var(--brand-color);
  background-color: #FFFFFF;
  transform: scale(1.08);
}

.rating-btn:active {
  transform: scale(0.95);
}

.rating-btn.selected {
  background-color: var(--brand-color);
  border-color: var(--brand-color);
  color: #FFFFFF;
}

.rating-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
  padding: 0 4px;
}

/* Form inputs: 0 to 10 NPS scale */
.nps-scale {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

@media (max-width: 380px) {
  .nps-scale {
    grid-template-columns: repeat(4, 1fr);
  }
}

.nps-btn {
  aspect-ratio: 1;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border-radius: 50%;
  border: 2px solid var(--gray-light);
  background-color: var(--gray-light);
  color: var(--brand-color);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  justify-content: center;
  align-items: center;
  outline: none;
}

.nps-btn:hover {
  border-color: var(--brand-color);
  background-color: #FFFFFF;
  transform: scale(1.08);
}

.nps-btn.selected {
  background-color: var(--brand-color);
  border-color: var(--brand-color);
  color: #FFFFFF;
}

/* Form inputs: Comments and textareas */
.input-container {
  width: 100%;
}

.text-input {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  padding: 16px;
  border-radius: var(--border-radius-md);
  border: 2px solid var(--gray-medium);
  outline: none;
  resize: none;
  color: var(--text-dark);
  transition: var(--transition-fast);
}

.text-input:focus {
  border-color: var(--brand-color);
  box-shadow: 0 0 0 3px rgba(52, 46, 75, 0.1);
}

/* Contact Details Slide */
.info-block {
  background-color: rgba(52, 46, 75, 0.04);
  border-radius: var(--border-radius-md);
  padding: 18px;
  margin-bottom: 25px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-medium);
  border-left: 4px solid var(--brand-color);
}

.info-block p:first-of-type {
  margin-bottom: 10px;
}

.info-block strong {
  color: var(--brand-color);
  font-weight: 600;
}

.contact-fields {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-color);
}

.text-input-field {
  font-family: inherit;
  font-size: 15px;
  padding: 14px 16px;
  border-radius: var(--border-radius-md);
  border: 2px solid var(--gray-medium);
  outline: none;
  width: 100%;
  transition: var(--transition-fast);
}

.text-input-field:focus {
  border-color: var(--brand-color);
  box-shadow: 0 0 0 3px rgba(52, 46, 75, 0.1);
}

/* Loading state */
.loading-overlay {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 30px;
}

.spinner {
  width: 45px;
  height: 45px;
  border: 4px solid var(--gray-light);
  border-top: 4px solid var(--brand-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loading-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--brand-color);
}

.success-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

/* TICKET CARD DESIGN */
.ticket-card {
  width: 100%;
  max-width: 320px;
  background-color: #FFFFFF;
  border: 2px solid var(--brand-color);
  border-radius: var(--border-radius-md);
  box-shadow: 0 10px 30px rgba(52, 46, 75, 0.08);
  margin: 25px 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ticket-top {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--gray-light);
}

.ticket-logo {
  height: 35px;
  margin-bottom: 12px;
  object-fit: contain;
}

.ticket-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--brand-color);
}

/* Ticket tear line styling */
.ticket-divider {
  height: 20px;
  position: relative;
  display: flex;
  align-items: center;
  background-color: #FFFFFF;
}

.divider-circle {
  width: 20px;
  height: 20px;
  background-color: var(--card-bg);
  border: 2px solid var(--brand-color);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

/* Cuts the ticket cards on both sides */
.divider-circle.left {
  left: -11px;
}

.divider-circle.right {
  right: -11px;
}

.divider-line {
  flex: 1;
  border-top: 2px dashed var(--gray-medium);
  margin: 0 12px;
}

.ticket-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ticket-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.info-lbl {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.info-val {
  font-size: 24px;
  font-weight: 700;
  color: var(--brand-color);
  letter-spacing: 1px;
}

.info-val-sm {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-color);
}

.ticket-qr-container {
  padding: 12px;
  background-color: #FFFFFF;
  border: 1px solid var(--gray-medium);
  border-radius: var(--border-radius-sm);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.ticket-qr {
  width: 130px;
  height: 130px;
  object-fit: contain;
}

.ticket-footer-info {
  width: 100%;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--gray-light);
  padding-top: 15px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.footer-col:first-child {
  border-right: 1px solid var(--gray-light);
}

/* Action Container */
.action-container {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
}

.microtext {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 10px;
  text-align: center;
}

.native-save-tip {
  font-size: 11px;
  color: var(--brand-color);
  opacity: 0.8;
  margin-top: 18px;
  text-align: center;
  font-style: italic;
  line-height: 1.4;
  padding: 0 10px;
}

/* Compact Final Screen Layout to prevent vertical scrolling */
.final-screen {
  padding-top: 5px;
  padding-bottom: 5px;
}

.final-screen .welcome-title {
  font-size: 22px !important;
  margin-bottom: 6px !important;
}

.final-screen .welcome-subtitle {
  font-size: 14px !important;
  margin-bottom: 10px !important;
}

.final-ticket-image {
  width: 100%;
  max-width: 270px; /* Sized to fit vertically without scrolling on mobile */
  height: auto;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-premium);
  margin: 10px 0 15px 0;
  border: 2px solid var(--brand-color);
  cursor: pointer;
  transition: transform var(--transition-fast);
  background-color: #FFFFFF;
}

.final-ticket-image:hover {
  transform: scale(1.02);
}

.final-screen .action-container {
  margin-top: 5px;
}

.final-screen .microtext {
  margin-top: 5px;
}

.final-screen .native-save-tip {
  margin-top: 12px;
}

/* Animations keyframes */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
