/*
 * Flyus public group-request pages — standalone stylesheet.
 *
 * Hand-written on purpose: public/css/app.css is a compiled Mix artifact
 * that currently carries another engineer's uncommitted work, so it must
 * not be edited or rebuilt. This file needs no build step and is linked
 * directly by resources/views/layouts/groups.blade.php. It is loaded ONLY
 * by the public group-request pages (groups.flyus.test) — the authenticated
 * portal and every partner-branded login page keep SB Admin 2 untouched.
 *
 * Design language: Flyus Design System (FDS). Tokens live in
 * public/css/fds-tokens.css, linked BEFORE this file by the groups layout.
 * The --flyus-* names below are kept as thin aliases onto --fds-* so the
 * rules in this file did not all have to be rewritten at once; new rules
 * should use the --fds-* tokens directly.
 */

:root {
  --flyus-purple: var(--fds-color-purple);
  --flyus-purple-dark: var(--fds-color-purple-hover);
  --flyus-red: var(--fds-color-red);
  --flyus-green: var(--fds-color-green);
  --flyus-grey-light: var(--fds-color-bg);
  --flyus-grey-medium: var(--fds-color-border-hover);
  --flyus-grey-dark: var(--fds-color-text);
  --flyus-text: var(--fds-color-text);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body.groups-page {
  font-family: var(--fds-font-base);
  color: var(--flyus-text);
  background: linear-gradient(180deg, var(--flyus-grey-light) 0%, #ffffff 260px);
  line-height: 1.5;
}

.groups-header {
  background: var(--flyus-purple);
  padding: 18px 24px;
}

.groups-header__inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.groups-header img {
  width: auto;
  height: 34px;
  display: block;
}

.groups-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

.groups-card {
  background: #ffffff;
  border-radius: var(--fds-radius-lg);
  box-shadow: var(--fds-shadow-md);
  border: 1px solid var(--fds-color-border);
  transition: box-shadow var(--fds-transition-normal);
  padding: 36px 40px;
}

@media (max-width: 576px) {
  .groups-card {
    padding: 24px 18px;
  }

  .groups-wrap {
    padding: 20px 10px 40px;
  }
}

.groups-title {
  color: var(--flyus-purple-dark);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.groups-subtitle {
  color: var(--flyus-grey-dark);
  margin: 0 0 28px;
  font-size: 0.95rem;
}

/* Section grouping — the form is long, so each logical group gets its own
   labeled block instead of reading as one wall of inputs. */
.groups-section {
  border-top: 1px solid var(--flyus-grey-light);
  padding-top: 22px;
  margin-top: 22px;
}

.groups-section:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.groups-section__title {
  color: var(--flyus-purple);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 16px;
}

.groups-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0 0 16px;
}

.groups-row > .form-group {
  flex: 1 1 220px;
  min-width: 0;
}

.groups-page .form-group {
  margin-bottom: 16px;
}

.groups-page label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--flyus-grey-dark);
  margin-bottom: 6px;
}

.groups-page .text-danger {
  color: var(--flyus-red);
}

.groups-page .text-muted {
  color: var(--flyus-grey-medium);
  font-weight: 400;
}

.groups-page .form-control,
.groups-page .form-control-file,
.groups-page select,
.groups-page textarea {
  width: 100%;
  font-size: 0.95rem;
  padding: 9px 12px;
  border: 1px solid var(--fds-color-border);
  border-radius: var(--fds-radius-sm);
  background: var(--fds-color-white);
  color: var(--fds-color-text);
  transition: border-color var(--fds-transition-fast), box-shadow var(--fds-transition-fast);
}

.groups-page .form-control:focus,
.groups-page select:focus,
.groups-page textarea:focus {
  outline: none;
  border-color: var(--flyus-purple);
  box-shadow: var(--fds-shadow-glow);
}

.groups-page .form-control.is-invalid,
.groups-page select.is-invalid,
.groups-page textarea.is-invalid {
  border-color: var(--flyus-red);
}

.groups-page .invalid-feedback {
  color: var(--flyus-red);
  font-size: 0.82rem;
  margin-top: 4px;
  display: block;
}

.groups-page .form-check-inline {
  display: inline-flex;
  align-items: center;
  margin-right: 18px;
  margin-bottom: 8px;
}

.groups-page .form-check-inline input {
  margin-right: 6px;
}

.groups-page .form-check-label {
  font-weight: 400;
  color: var(--flyus-text);
  margin-bottom: 0;
}

.groups-page table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.groups-page table th {
  text-align: left;
  color: var(--flyus-grey-dark);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 8px;
  border-bottom: 2px solid var(--flyus-grey-light);
}

.groups-page table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--flyus-grey-light);
}

.groups-page table .form-control {
  padding: 6px 8px;
  font-size: 0.88rem;
}

.groups-page .table-responsive {
  overflow-x: auto;
  margin-bottom: 12px;
}

/* The included traveler-manifest partial (groups/_travelers.blade.php) is
   not restyled directly — its markup/logic is untouched — but it does use
   a handful of Bootstrap-style utility classes that have no effect without
   Bootstrap loaded. Cover those here so it still reads cleanly. */
.groups-page .small {
  font-size: 0.85rem;
}

.groups-page .font-weight-bold {
  font-weight: 700;
}

.groups-page .d-block {
  display: block;
}

.groups-page .btn {
  display: inline-block;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--fds-radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  font-size: 0.9rem;
  transition: background var(--fds-transition-fast), box-shadow var(--fds-transition-fast);
}

.groups-page .btn-sm {
  padding: 5px 12px;
  font-size: 0.82rem;
}

.groups-page .btn-outline-secondary {
  background: #fff;
  border-color: var(--flyus-grey-medium);
  color: var(--flyus-grey-dark);
}

.groups-page .btn-outline-secondary:hover {
  background: var(--flyus-grey-light);
}

.groups-btn-secondary {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--flyus-purple);
  color: var(--flyus-purple);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--fds-radius-md);
  cursor: pointer;
  transition: background var(--fds-transition-fast);
}

.groups-btn-secondary:hover {
  background: rgba(89, 48, 132, 0.06);
}

.groups-submit {
  display: block;
  width: 100%;
  background: var(--flyus-red);
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 20px;
  border-radius: var(--fds-radius-md);
  cursor: pointer;
  margin-top: var(--fds-space-sm);
  font-family: var(--fds-font-bold);
  transition: background var(--fds-transition-fast), box-shadow var(--fds-transition-fast);
}

.groups-submit:hover {
  background: var(--fds-color-accent-hover);
  box-shadow: var(--fds-shadow-md);
}

.groups-footnote {
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--flyus-grey-dark);
  text-align: center;
}

.groups-footnote a {
  color: var(--flyus-purple);
  font-weight: 600;
  text-decoration: none;
}

.groups-footnote a:hover {
  text-decoration: underline;
}

/* Short clarifying copy under the marketing opt-in checkbox — quiet,
   subordinate to the checkbox's own label. */
.groups-field-hint {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--flyus-grey-medium);
}

/* Inline consent notice above the submit button. Deliberately not a
   checkbox — see resources/views/groups/form.blade.php. Small and muted,
   but still readable; it sits right above the (very prominent) submit
   button so it can't be missed. */
.groups-consent-notice {
  margin: 18px 0 10px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--flyus-grey-dark);
  text-align: center;
}

.groups-consent-notice a {
  color: var(--flyus-purple);
  font-weight: 600;
  text-decoration: none;
}

.groups-consent-notice a:hover {
  text-decoration: underline;
}

/* Legal footer — quiet supporting material, clearly separated from the
   form card, present on every public group-request page via
   layouts/groups.blade.php (form, confirmation, rate-limited). */
.groups-legal-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--flyus-grey-light);
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--flyus-grey-medium);
}

.groups-legal-footer p {
  margin: 0 0 4px;
}

.groups-legal-footer a {
  color: var(--flyus-grey-dark);
  text-decoration: underline;
}

.groups-legal-footer a:hover {
  color: var(--flyus-purple);
}

.groups-legal-footer__divider {
  margin: 0 8px;
  color: var(--flyus-grey-medium);
}

.groups-legal-footer__copyright {
  color: var(--flyus-grey-medium);
}

@media (max-width: 576px) {
  .groups-legal-footer {
    padding-left: 8px;
    padding-right: 8px;
  }
}

.groups-page p a {
  color: var(--flyus-purple);
  font-weight: 600;
}

.groups-page hr {
  display: none; /* section borders replace the old hr dividers */
}

/*
 * Airport autocomplete (Origin/Destination), see
 * public/js/airport-autocomplete.js. The wrapper is inserted by that
 * script at runtime — if JS never runs, the input has none of this markup
 * and just renders as a plain text field via the .form-control rules above.
 */
.airport-autocomplete {
  position: relative;
}

.airport-autocomplete__list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--fds-color-border);
  border-radius: var(--fds-radius-md);
  box-shadow: var(--fds-shadow-lg);
  max-height: 260px;
  overflow-y: auto;
}

.airport-autocomplete__item {
  padding: 9px 12px;
  font-size: 0.92rem;
  color: #333;
  cursor: pointer;
  white-space: normal;
}

.airport-autocomplete__item.is-active,
.airport-autocomplete__item:hover {
  background: var(--flyus-grey-light);
  color: var(--flyus-purple-dark);
}

@media (max-width: 480px) {
  .airport-autocomplete__list {
    max-height: 220px;
  }

  .airport-autocomplete__item {
    padding: 12px 14px;
    font-size: 1rem;
  }
}
