/* Checkout Page Specific Styles */

.checkout-body {
  background: #f9fafb;
}

.checkout-header {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.checkout-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.secure-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #10b981;
  font-size: 0.9rem;
  font-weight: 600;
}

.secure-badge svg {
  color: #10b981;
}

.checkout-main {
  padding: 3rem 0 5rem;
}

.checkout-container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  align-items: start;
}

/* Progress Steps */
.progress-steps {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
}

.step.active {
  color: var(--blue);
  font-weight: 600;
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e5e7eb;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
}

.step.active .step-number {
  background: var(--blue);
  color: white;
}

.step-divider {
  flex: 1;
  height: 2px;
  background: #e5e7eb;
}

.step-label {
  font-size: 0.9rem;
}

/* Form Section */
.checkout-form-section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.checkout-form-section h1 {
  font-size: 1.65rem;
  margin-bottom: 1.5rem;
  color: var(--ink-strong);
}

/* Ticket Type Selector */
.ticket-type-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding: 0.5rem;
  background: #f9fafb;
  border-radius: 12px;
}

.ticket-option {
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.2s;
  border: 2px solid transparent;
  background: white;
}

.ticket-option:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 207, 246, 0.15);
}

.ticket-option.active {
  border-color: var(--blue);
  background: rgba(108, 207, 246, 0.08);
  box-shadow: 0 0 0 3px rgba(108, 207, 246, 0.1);
}

.ticket-option-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
}

.ticket-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.ticket-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ticket-info strong {
  font-size: 0.95rem;
  color: var(--ink-strong);
  line-height: 1.3;
  text-align: center;
}

.form-section {
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 2px solid #f3f4f6;
  scroll-margin-top: 120px;
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 1rem;
  padding-bottom: 0;
}

.form-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--ink-strong);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-checkout {
  width: 100%;
  padding: 1.1rem 1.5rem;
  font-size: 1.05rem;
  margin-top: 1rem;
}

.security-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 1rem;
  background: #f0fdf4;
  border-radius: 8px;
  color: #166534;
  font-size: 0.9rem;
  line-height: 1.5;
}

.security-note svg {
  flex-shrink: 0;
  color: #10b981;
}

/* Order Summary */
.order-summary {
  position: sticky;
  top: 100px;
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.order-summary h2 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}

.summary-item {
  display: flex;
  gap: 1rem;
  align-items: start;
}

.summary-icon {
  font-size: 2rem;
  line-height: 1;
}

.summary-details h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.summary-details p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.summary-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 1.5rem 0;
}

.summary-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.feature-item svg {
  flex-shrink: 0;
  color: var(--blue);
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.1rem;
}

.total-price {
  font-size: 2rem;
  font-weight: 900;
  color: var(--coral);
}

.trust-badges {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.trust-item svg {
  color: #10b981;
  flex-shrink: 0;
}

/* Form Styling */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--ink-strong);
  font-size: 0.95rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s;
  background: white;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(108, 207, 246, 0.1);
}

/* Ensure date inputs have consistent height */
.form-group input[type="date"] {
  height: 3.2rem;
  min-height: 3.2rem;
  line-height: normal;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
}

.form-group small {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* Radio Group Styling */
.radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

.radio-option {
  position: relative;
  cursor: pointer;
  display: block;
}

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

.radio-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  transition: all 0.2s;
  background: white;
}

.radio-option input[type="radio"]:checked + .radio-label {
  border-color: var(--blue);
  border-width: 3px;
  background: linear-gradient(135deg, rgba(108, 207, 246, 0.08) 0%, rgba(108, 207, 246, 0.15) 100%);
  box-shadow: 0 0 0 3px rgba(108, 207, 246, 0.15), 0 4px 12px rgba(79, 172, 219, 0.2);
  transform: translateY(-1px);
}

.radio-option input[type="radio"]:checked + .radio-label::after {
  content: '✓';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  background: var(--blue);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
}

.radio-label strong {
  font-size: 1.05rem;
  color: var(--ink-strong);
  margin-bottom: 0.3rem;
}

.radio-label small {
  color: var(--coral);
  font-size: 1rem;
  font-weight: 700;
}

/* Premium tier visual indicator */
.radio-option.premium-tier .radio-label {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
}

.radio-option.premium-tier .radio-label small {
  color: #f59e0b;
}

/* Responsive */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .ticket-type-selector {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    padding: 0.4rem;
    margin-bottom: 1.25rem;
  }

  .ticket-option-content {
    padding: 0.6rem 0.4rem;
    gap: 0.3rem;
  }

  .ticket-icon {
    font-size: 1.25rem;
  }

  .ticket-info strong {
    font-size: 0.75rem;
    line-height: 1.2;
  }
}

/* Responsive */
@media (max-width: 900px) {
  /* Remove sticky header on mobile */
  .checkout-header {
    position: relative;
  }

  .checkout-main {
    padding: 1.5rem 0 160px 0; /* Large bottom padding for sticky summary */
  }

  .checkout-container {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Hide desktop summary, show mobile sticky version instead */
  .order-summary {
    /* Force fixed positioning */
    position: fixed !important;
    top: auto !important;        /* Cancel desktop top: 100px */
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;

    /* Styling */
    background: white;
    border-radius: 16px 16px 0 0;
    padding: 1rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
    border-top: 2px solid var(--blue);
    max-height: 140px;

    /* Ensure it's above everything */
    z-index: 9999 !important;

    /* Create new stacking context */
    isolation: isolate;
  }

  .order-summary h2 {
    display: none !important;
  }

  /* Hide all detailed summary content on mobile */
  .order-summary .summary-item,
  .order-summary .summary-icon,
  .order-summary .summary-details,
  .order-summary .summary-divider,
  .order-summary .summary-features,
  .order-summary .feature-item,
  .order-summary .trust-badges,
  .order-summary .trust-item {
    display: none !important;
  }

  /* Show only compact total with button */
  .summary-total {
    flex-direction: row;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin: 0;
  }

  .total-price {
    font-size: 1.5rem;
    text-align: left;
    flex-shrink: 0;
  }

  .btn-checkout {
    flex: 1;
    margin: 0;
    padding: 0.9rem 1.25rem;
    font-size: 1rem;
  }

  .progress-steps {
    padding: 1rem;
  }

  .step-label {
    display: none;
  }

  .checkout-form-section {
    padding: 1.5rem;
  }
}
/* Tier Selection Styles */
.tier-section {
  background: linear-gradient(135deg, #f0f9ff 0%, #fef3f2 100%);
  border: 2px solid #e0f2fe;
}

.tier-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.tier-option {
  cursor: pointer;
  position: relative;
}

.tier-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tier-card {
  background: white;
  border: 3px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.75rem;
  transition: all 0.25s ease;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.tier-card.premium {
  border-color: #ff8a65;
}

.tier-option input[type="radio"]:checked + .tier-card {
  border-color: var(--blue);
  border-width: 4px;
  background: linear-gradient(135deg, rgba(108, 207, 246, 0.05) 0%, rgba(108, 207, 246, 0.1) 100%);
  box-shadow: 0 8px 24px rgba(79, 172, 219, 0.3), 0 0 0 4px rgba(108, 207, 246, 0.1);
  transform: translateY(-2px);
}

.tier-option input[type="radio"]:checked + .tier-card::before {
  content: '✓';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 28px;
  height: 28px;
  background: var(--blue);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
  z-index: 10;
}

.tier-option input[type="radio"]:checked + .tier-card.premium {
  border-color: var(--coral);
  border-width: 4px;
  background: linear-gradient(135deg, rgba(255, 138, 101, 0.05) 0%, rgba(255, 138, 101, 0.1) 100%);
  box-shadow: 0 8px 24px rgba(255, 138, 101, 0.35), 0 0 0 4px rgba(255, 138, 101, 0.1);
}

.tier-option input[type="radio"]:checked + .tier-card.premium::before {
  background: var(--coral);
}

.tier-badge {
  position: absolute;
  top: -12px;
  right: 1.5rem;
  background: var(--coral);
  color: white;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(255, 138, 101, 0.3);
}

.tier-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.tier-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink-strong);
}

.tier-price {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.5px;
}

.tier-card.premium .tier-price {
  color: var(--coral);
}

.tier-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
}

.tier-features li {
  font-size: 0.95rem;
  color: var(--ink);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.5;
}

.tier-features li::before {
  content: '✓';
  font-weight: 700;
  color: #10b981;
  flex-shrink: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .tier-options {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .tier-card {
    padding: 1.25rem;
  }

  .tier-header {
    margin-bottom: 0.5rem;
  }

  .tier-header h3 {
    font-size: 1.05rem;
  }

  .tier-price {
    font-size: 1.4rem;
  }

  .tier-features {
    gap: 0.35rem;
  }

  .tier-features li {
    font-size: 0.85rem;
    padding-left: 1.5rem;
  }

  .tier-features li::before {
    font-size: 1rem;
  }

  /* Adjust checkmark and add padding to tier-header on mobile */
  .tier-option input[type="radio"]:checked + .tier-card::before {
    width: 22px;
    height: 22px;
    font-size: 0.75rem;
  }

  /* For premium card, move checkmark down to avoid "Recommended" badge */
  .tier-option input[type="radio"]:checked + .tier-card.premium::before {
    top: 2rem;
  }

  /* Add right padding to tier-header to prevent price overlap with checkmark */
  .tier-header {
    padding-right: 2rem;
  }
}

/* Airport Autocomplete Styles */
.autocomplete-wrapper {
  position: relative;
  width: 100%;
}

.autocomplete-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background: white;
  border: 2px solid var(--blue);
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  z-index: 100;
  display: none;
  margin-top: -2px;
}

.autocomplete-results.active {
  display: block;
}

.autocomplete-item {
  padding: 0.9rem 1rem;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background: rgba(108, 207, 246, 0.1);
}

.autocomplete-item.selected {
  background: rgba(108, 207, 246, 0.15);
}

.autocomplete-item-name {
  font-weight: 600;
  color: var(--ink-strong);
  font-size: 0.95rem;
}

.autocomplete-item-details {
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.autocomplete-item-code {
  color: var(--blue);
  font-weight: 600;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.8rem;
  background: rgba(108, 207, 246, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.autocomplete-loading {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.autocomplete-no-results {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.autocomplete-wrapper input[type="text"]:focus + input[type="hidden"] + .autocomplete-results {
  border-color: var(--blue);
}
