/* ============================================
   Custom Styles — Yemenia PSS
   Brand: Yemenia Airways
   Version: 2.0 (Rebrand)
   ============================================ */

/* ==========================================
   Design Tokens
   ========================================== */

:root {
  /* Brand Colors */
  --color-primary: #11224c;
  --color-primary-dark: #00185c;
  --color-primary-light: #2a4177;
  --color-red: #d40000;
  --color-red-hover: #b00000;
  --color-light-bg: #f7faff;
  --color-body-text: #6e6e6e;
  --color-heading-text: #11224c;
  --color-border: #e7eaf3;
  --color-muted: #8c98a4;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Poppins', system-ui, -apple-system, sans-serif;

  /* Border Radius */
  --radius-pill: 6.1875rem;

  /* Shadows */
  --shadow-hover: 0 7px 14px rgba(50,50,93,0.1), 0 3px 6px rgba(0,0,0,0.08);

  /* Tailwind CSS Variable Overrides */
  --c-gray-200: 228 228 231;
  --c-gray-500: 113 113 122;
  --c-gray-50: 250 250 250;
  --c-indigo-700: 17 34 76;
  --c-white: 255 255 255;
}

/* ==========================================
   Utility Classes
   ========================================== */

.bg-primary {
  background-color: var(--color-primary);
}

.text-primary {
  color: var(--color-primary);
}

/* ==========================================
   Section Spacing
   ========================================== */

.space-1 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.space-2 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.space-3 {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

/* ==========================================
   Transition Utility
   ========================================== */

.transition-3d-hover {
  transition: all 0.2s ease-in-out;
}

.transition-3d-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* ==========================================
   Button System
   ========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  padding: 0.625rem 1.25rem;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  white-space: nowrap;
}

.btn-pill {
  border-radius: var(--radius-pill);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-icon {
  padding: 0.5rem;
  border-radius: 50%;
}
#appContent{
  padding-top: 100px;
}
.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.btn-danger {
  background-color: var(--color-red);
  color: #ffffff;
  border-color: var(--color-red);
}

.btn-danger:hover {
  background-color: var(--color-red-hover);
  border-color: var(--color-red-hover);
}

.btn-light {
  background-color: #ffffff;
  color: var(--color-primary);
  border-color: var(--color-border);
}

.btn-light:hover {
  background-color: var(--color-light-bg);
  border-color: var(--color-primary);
}

.btn-soft-secondary {
  background-color: rgba(17, 34, 76, 0.08);
  color: var(--color-primary);
  border-color: transparent;
}

.btn-soft-secondary:hover {
  background-color: rgba(17, 34, 76, 0.15);
}

/* ==========================================
   Navigation Overrides
   ========================================== */

.c-navigationMain {
  background-color: unset;
  font-family: var(--font-body);
  color: var(--color-primary);
}

/* Horizontal layout for top-level nav */
.c-navigationMain__list[data-level="1"] {
  display: flex;
  flex-direction: row;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.c-navigationMain__listItem {
  display: block;
  list-style: none;
}

/* Top-level nav links/buttons */
.c-navigationMain__listLink[data-level="1"],
.c-navigationMain__listButton[data-level="1"] {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border-radius: 0.25rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
  border: none;
  background: none;
  white-space: nowrap;
}

.c-navigationMain__listLink[data-level="1"]:hover,
.c-navigationMain__listButton[data-level="1"]:hover {
  background-color: rgba(17, 34, 76, 0.06);
  color: var(--color-primary);
}

.c-navigationMain__listLink[data-level="1"].is-active,
.c-navigationMain__listButton[data-level="1"].is-active {
  color: var(--color-primary);
  font-weight: 600;
}

/* Deep-level nav items */
.c-navigationMain__listLink:not([data-level="1"]),
.c-navigationMain__listButton:not([data-level="1"]) {
  font-weight: normal;
  color: var(--color-primary);
  font-family: var(--font-body);
}

/* ==========================================
   Table Theme
   ========================================== */

.themetable th {
  background-color: var(--color-primary);
  color: #ffffff;
  white-space: nowrap;
  padding: 0.75rem 1rem;
}

.themebg {
  background-color: var(--color-primary);
}

table td {
  white-space: nowrap;
}

.themetable td {
  font-size: clamp(0.8680555555555557rem, calc(0.8680555555555557rem + ((0.8888888888888888 - 0.8680555555555557) * ((100vw - 20rem) / (96 - 20)))), 0.8888888888888888rem);
  line-height: 1.6;
  padding: 0.75rem 1rem;
}

table.table-type--1 td:hover table.table-type--1 td > div {
  opacity: 1;
  visibility: visible;
  display: block;
}

/* ==========================================
   Formie Customization
   ========================================== */

.fui-btn {
  --fui-btn-font-size: 1rem;
  --fui-btn-padding: 0.375rem 0.75rem;
  --fui-btn-border-radius: 0.25rem;
}

.fui-input,
.fui-select {
  --fui-input-font-size: 16px;
  --fui-input-padding: 0.75rem 1rem;
  --fui-input-border-radius: 6px;
}

/* ==========================================
   Utilities
   ========================================== */

.ssummary {
  display: none;
}

.paymentMethod {
  max-width: 500px;
}

/* ==========================================
   Spinner / Loading
   ========================================== */

.spinner {
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: space-between;
  font-size: clamp(1.125rem, 1.09211rem + 0.164474vw, 1.25rem);
  line-height: 1.6;
}

.spinner > div {
  border-radius: 0.25rem;
  --tw-bg-opacity: 1;
  background-color: rgb(var(--c-gray-500) / var(--tw-bg-opacity));
  height: 100%;
  width: 15%;
  animation: 1.2s ease-in-out infinite sk-stretchdelay;
}

.spinner .spinner-2 {
  animation-delay: -1.1s;
}

.spinner .spinner-3 {
  animation-delay: -1s;
}

.spinner .spinner-4 {
  animation-delay: -0.9s;
}

.spinner .spinner-5 {
  animation-delay: -0.8s;
}

@keyframes sk-stretchdelay {
  0%, 40%, 100% {
    transform: scaleY(0.4);
  }
  20% {
    transform: scaleY(1);
  }
}

.spinner-overlay {
  position: absolute;
  inset: 0px;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.75);
}

.spinner-overlay.htmx-request,
.spinner-overlay.spinner-overlay--show {
  display: flex;
}

/* ==========================================
   Flight Search Results (Hitit Style)
   ========================================== */

/* Flight Card */
.flight-card {
  background: #ffffff;
  border: 1px solid #e7eaf3;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.2s ease;
}
.flight-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Card Header: route codes + flight number */
.flight-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}
.flight-route-code {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 700;
  color: #11224c;
}
.flight-number {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: #11224c;
}

/* Route pretty names */
.flight-route-name {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: #6e6e6e;
  margin-bottom: 0.75rem;
}

/* Schedule row */
.flight-schedule {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  flex-wrap: wrap;
}
.flight-time {
  font-weight: 600;
  color: #11224c;
  font-size: 1rem;
}
.flight-arrow {
  color: #8c98a4;
  font-size: 1rem;
}
.flight-duration {
  color: #6e6e6e;
  font-size: 0.8125rem;
}
.flight-date {
  color: #6e6e6e;
  font-size: 0.8125rem;
  margin-left: auto;
}

/* Non-stop badge */
.badge-nonstop {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* Fare Classes Table */
.flight-class-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 0.8125rem;
}
.flight-class-table thead th {
  background: #f7faff;
  color: #11224c;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 2px solid #e7eaf3;
  white-space: nowrap;
}
.flight-class-table thead th:last-child {
  text-align: center;
}
.flight-class-table tbody td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}
.flight-class-table tbody tr:hover {
  background: rgba(17, 34, 76, 0.03);
}

/* Clickable class row */
.flight-class-row {
  cursor: pointer;
}
.flight-class-row.selected {
  background: rgba(17, 34, 76, 0.06) !important;
}
.flight-class-row.selected td:first-child {
  border-left: 3px solid #11224c;
}

/* Price alignment */
.flight-class-table .price {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.flight-class-table .price.total {
  font-weight: 600;
  color: #11224c;
}
.flight-class-table .class-code {
  font-weight: 700;
  color: #11224c;
}

/* Radio select */
.class-selector {
  accent-color: #11224c;
  cursor: pointer;
}
.flight-class-table tbody td:last-child {
  text-align: center;
}

/* Fare Breakdown (expanded section) */
.flight-breakdown {
  margin-top: 1rem;
  padding: 1rem;
  background: #fafbfc;
  border: 1px solid #e7eaf3;
  border-radius: 6px;
}
.flight-breakdown-title {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: #11224c;
  margin: 0 0 0.75rem 0;
}

/* Breakdown Table */
.flight-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 0.8125rem;
}
.flight-breakdown-table thead th {
  background: #11224c;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
  text-align: left;
  white-space: nowrap;
}
.flight-breakdown-table thead th:first-child {
  border-radius: 4px 0 0 0;
}
.flight-breakdown-table thead th:last-child {
  border-radius: 0 4px 0 0;
}
.flight-breakdown-table tbody td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e7eaf3;
}
.flight-breakdown-table tbody tr:nth-child(even) {
  background: #f7faff;
}
.flight-breakdown-table tbody tr.total-row {
  font-weight: 700;
  background: #ffffff;
  border-top: 2px solid #11224c;
}
.flight-breakdown-table .price {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Select (Add Flight) Button */
.flight-select-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.5rem;
  margin-top: 0.75rem;
  background: #11224c;
  color: #ffffff;
  border: none;
  border-radius: 6.1875rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  float: right;
}
.flight-select-btn:hover {
  background: #00185c;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Breakdown Summary */
.flight-breakdown-summary {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e7eaf3;
  font-family: var(--font-body);
  font-size: 0.8125rem;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  color: #6e6e6e;
}
.summary-row.total-row {
  font-weight: 700;
  color: #11224c;
  font-size: 0.875rem;
  border-top: 2px solid #11224c;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}
.summary-value {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.total-amount {
  font-size: 1.125rem;
  color: #11224c;
}

/* ==========================================
   Formie Brand Overrides
   ========================================== */

.fui-i {
  --fui-primary-color: #11224c;
  --fui-primary-color-hover: #00185c;
  --fui-submit-btn-bg-color: #d40000;
  --fui-submit-btn-border-color: #d40000;
  --fui-submit-btn-bg-color-hover: #b00000;
  --fui-submit-btn-border-color-hover: #b00000;
  --fui-input-border-radius: 6px;
  --fui-input-padding: 0.75rem 1rem;
  --fui-btn-border-radius: 6.1875rem;
  --fui-btn-font-weight: 500;
  --fui-label-color: #11224c;
  --fui-label-font-weight: 600;
}

/* Formie submit button: pill shape + brand red */
.fui-submit {
  border-radius: 6.1875rem !important;
  padding: 0.5rem 2rem !important;
  font-weight: 500 !important;
  transition: all 0.2s ease-in-out !important;
}

.fui-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Formie inputs: brand focus style */
.fui-input:focus,
.fui-select:focus {
  border-color: #11224c !important;
  box-shadow: 0 0 0 3px rgba(17,34,76,0.15) !important;
}
