/* ══════════════════════════════════════════════
   SHARED COMPONENTS — FairPlane Landing Pages
   Reusable UI components across all LP variants
   ══════════════════════════════════════════════ */

/* ── Base Body ── */
body {
  font-family: var(--fp-font);
  color: var(--fp-dark);
  background: var(--fp-white);
  min-height: 100vh;
}

/* ── LP Container ── */
.fp-lp {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ══════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════ */

.fp-header {
  width: 100%;
  padding: var(--fp-space-md) var(--fp-space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--fp-max-width);
  margin: 0 auto;
}

.fp-header__logo {
  height: 32px;
  width: auto;
}

.fp-header__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--fp-space-xs);
  font-size: var(--fp-font-size-sm);
  font-weight: 500;
  color: var(--fp-trustpilot);
  background: var(--fp-success-light);
  padding: 4px 12px;
  border-radius: var(--fp-radius-full);
}

/* ══════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════ */

.fp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--fp-space-sm);
  padding: 14px 32px;
  font-size: var(--fp-font-size-base);
  font-weight: 600;
  border-radius: var(--fp-radius);
  transition: var(--fp-transition);
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.fp-btn--primary {
  background: var(--fp-primary);
  color: var(--fp-white);
  box-shadow: 0 4px 15px var(--fp-primary-glow);
}

.fp-btn--primary:hover {
  background: var(--fp-primary-hover);
  box-shadow: 0 6px 25px var(--fp-primary-glow);
  transform: translateY(-1px);
}

.fp-btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px var(--fp-primary-glow);
}

.fp-btn--lg {
  padding: 18px 40px;
  font-size: var(--fp-font-size-lg);
  border-radius: var(--fp-radius-lg);
}

.fp-btn--full {
  width: 100%;
}

/* Button shimmer animation */
.fp-btn--primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transform: skewX(-25deg);
  transition: left 0.6s ease;
}

.fp-btn--primary:hover::after {
  left: 120%;
}

/* ══════════════════════════════════════════════
   FORM INPUTS
   ══════════════════════════════════════════════ */

.fp-input-group {
  position: relative;
  margin-bottom: var(--fp-space-md);
}

.fp-input-group__label {
  display: block;
  font-size: var(--fp-font-size-sm);
  font-weight: 600;
  color: var(--fp-dark);
  margin-bottom: var(--fp-space-xs);
  letter-spacing: 0.01em;
}

.fp-input-group__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--fp-gray-400);
  pointer-events: none;
  z-index: 1;
}

.fp-input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  font-size: var(--fp-font-size-base);
  background: var(--fp-light);
  border: 1.5px solid var(--fp-gray-300);
  border-radius: var(--fp-radius);
  color: var(--fp-dark);
  transition: var(--fp-transition);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.fp-input--with-icon {
  padding-left: 48px;
}

.fp-input:focus {
  outline: none;
  border-color: var(--fp-secondary);
  box-shadow: 0 0 0 3px var(--fp-secondary-light);
  background: var(--fp-white);
}

.fp-input::placeholder {
  color: var(--fp-gray-400);
}

.fp-input--error {
  border-color: var(--fp-error);
  box-shadow: 0 0 0 3px rgba(227, 32, 85, 0.08);
}

.fp-input-group__error {
  font-size: var(--fp-font-size-xs);
  color: var(--fp-error);
  margin-top: 4px;
  display: none;
}

.fp-input-group--error .fp-input-group__error {
  display: block;
}

/* ══════════════════════════════════════════════
   AUTOCOMPLETE DROPDOWN
   ══════════════════════════════════════════════ */

.fp-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--fp-white);
  border: 1px solid var(--fp-gray-200);
  border-radius: var(--fp-radius);
  box-shadow: var(--fp-shadow-lg);
  z-index: var(--fp-z-dropdown);
  max-height: 200px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: none;
  margin-top: 4px;
  -webkit-overflow-scrolling: touch;
}

.fp-autocomplete--open {
  display: block;
}

.fp-autocomplete__item {
  padding: 12px 16px;
  cursor: pointer;
  font-size: var(--fp-font-size-sm);
  border-bottom: 1px solid var(--fp-gray-100);
  transition: var(--fp-transition-fast);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fp-autocomplete__item:last-child {
  border-bottom: none;
}

.fp-autocomplete__item:hover,
.fp-autocomplete__item--active {
  background: var(--fp-secondary-light);
  color: var(--fp-secondary);
}

.fp-autocomplete__item-code {
  font-weight: 700;
  font-size: var(--fp-font-size-xs);
  color: var(--fp-gray-500);
  background: var(--fp-gray-100);
  padding: 2px 8px;
  border-radius: var(--fp-radius-sm);
}

.fp-autocomplete__item:hover .fp-autocomplete__item-code {
  background: var(--fp-secondary);
  color: var(--fp-white);
}

/* ══════════════════════════════════════════════
   CARD
   ══════════════════════════════════════════════ */

.fp-card {
  background: var(--fp-white);
  border-radius: var(--fp-radius-lg);
  padding: var(--fp-space-xl);
  box-shadow: var(--fp-shadow-lg);
  width: 100%;
  max-width: 480px;
}

.fp-card--glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ══════════════════════════════════════════════
   TRUST BADGES
   ══════════════════════════════════════════════ */

.fp-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fp-space-sm);
  justify-content: center;
}

.fp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fp-font-size-xs);
  font-weight: 500;
  color: var(--fp-gray-700);
  padding: 6px 14px;
  border-radius: var(--fp-radius-full);
  background: var(--fp-gray-100);
  white-space: nowrap;
}

.fp-badge__icon {
  font-size: 14px;
}

.fp-badge--success {
  background: var(--fp-success-light);
  color: var(--fp-success);
}

/* ══════════════════════════════════════════════
   STAT CARDS
   ══════════════════════════════════════════════ */

.fp-stats {
  display: flex;
  gap: var(--fp-space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.fp-stat {
  text-align: center;
  padding: var(--fp-space-md);
}

.fp-stat__value {
  font-size: var(--fp-font-size-3xl);
  font-weight: 700;
  color: var(--fp-dark);
  line-height: 1.1;
}

.fp-stat__label {
  font-size: var(--fp-font-size-xs);
  color: var(--fp-gray-500);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* ══════════════════════════════════════════════
   LOADING SPINNER
   ══════════════════════════════════════════════ */

.fp-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--fp-white);
  border-radius: 50%;
  animation: fp-spin 0.6s linear infinite;
  display: none;
}

@keyframes fp-spin {
  to { transform: rotate(360deg); }
}

.fp-btn--loading .fp-spinner {
  display: block;
}

.fp-btn--loading .fp-btn__text {
  opacity: 0;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */

@media (max-width: 768px) {
  :root {
    --fp-font-size-4xl:  2rem;
    --fp-font-size-5xl:  2.5rem;
    --fp-font-size-6xl:  3rem;
  }

  .fp-card {
    padding: var(--fp-space-lg);
    border-radius: var(--fp-radius);
  }

  .fp-stats {
    gap: var(--fp-space-sm);
  }

  .fp-stat__value {
    font-size: var(--fp-font-size-2xl);
  }
}

@media (max-width: 480px) {
  .fp-header {
    padding: var(--fp-space-sm) var(--fp-space-md);
  }

  .fp-btn--lg {
    padding: 16px 24px;
    font-size: var(--fp-font-size-base);
  }
}
