/* FlyFone Trial Onboard — Figma pixel-perfect */

/* ==========================================
   OVERRIDE for existing page 11716
========================================== */
.trial-form {
  background: #fff !important;
  backdrop-filter: none !important;
  border-radius: 16px !important;
  padding: 24px 32px !important;
  box-shadow: 0 4px 24px rgba(11, 11, 54, 0.06) !important;
  max-width: 559px !important;
}
.trial-form .ffo-form {
  background: transparent;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
  max-width: none;
  width: 100%;
}

/* Hero subtitle: force white (override theme default blue) */
.hero-section .hero-subtitle,
.hero-container .hero-subtitle,
.hero-subtitle {
  color: #ffffff !important;
}

/* ==========================================
   PAGE WRAPPER (hero + form layout)
========================================== */
.ffo-page {
  position: relative;
  min-height: 655px;
  padding: 120px 160px 80px;
  display: flex;
  align-items: flex-start;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow: hidden;
  isolation: isolate;
}

.ffo-page-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(46, 24, 0, 0.34), rgba(46, 24, 0, 0.34)),
    url('https://images.unsplash.com/photo-1556745753-b2904692b3cd?auto=format&fit=crop&w=1600&q=80');
  background-size: cover;
  background-position: center;
  z-index: -1;
}

.ffo-page-inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 80px;
}

.ffo-hero {
  flex: 0 0 477px;
  color: #fff;
  padding-top: 150px;
}
.ffo-hero-title {
  margin: 0 0 24px;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.8px;
}
.ffo-hero-sub {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
}

.ffo-form-wrap { flex: 0 0 559px; max-width: 100%; }

@media (max-width: 1100px) {
  .ffo-page { padding: 80px 40px; }
  .ffo-page-inner { flex-direction: column; gap: 40px; align-items: center; }
  .ffo-hero { flex: initial; padding-top: 0; text-align: center; }
  .ffo-form-wrap { flex: initial; width: 100%; max-width: 559px; }
}

@media (max-width: 540px) {
  .ffo-page { padding: 48px 20px; }
  .ffo-hero-title { font-size: 28px; }
  .ffo-hero-sub { font-size: 16px; }
}

/* ==========================================
   FORM CARD
========================================== */
.ffo-form {
  box-sizing: border-box;
  max-width: 559px;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  padding: 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #242442;
  box-shadow: 0 4px 24px rgba(11, 11, 54, 0.06);
}
.ffo-form > *,
.ffo-form p,
.ffo-form label,
.ffo-form span { margin: 0 !important; }

.ffo-form *, .ffo-form *::before, .ffo-form *::after { box-sizing: border-box; }

/* HEAD */
.ffo-head { display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.ffo-title { margin: 0; font-size: 24px; font-weight: 600; line-height: 1.5; color: #242442; }
.ffo-sub   { margin: 0; font-size: 14px; font-weight: 400; line-height: 1.4; color: #545463; }

/* FIELDS — tight uniform gaps (Phone number row = standard) */
.ffo-fields { display: flex; flex-direction: column; gap: 10px; }
.ffo-fields > *,
.ffo-fields > * > * { margin: 0 !important; padding: 0; }
.ffo-row    { display: flex; gap: 12px; }
.ffo-row-2 > * { flex: 1 1 0; min-width: 0; }

.ffo-field { display: flex; flex-direction: column; gap: 4px; }
.ffo-field input, .ffo-field select, .ffo-field .ffo-dropdown, .ffo-field .ffo-dropdown-btn { margin: 0 !important; }
.ffo-label { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 500; line-height: 1.2; color: #242442; }
.ffo-req   { color: #b3261e; font-style: normal; font-size: 14px; line-height: 1; }

.ffo-field input,
.ffo-field select {
  width: 100%;
  padding: 12px;
  font: 400 16px/1.4 'Inter', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', system-ui, sans-serif;
  color: #242442;
  background: #fff;
  border: 1px solid #e7e4e4;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(11, 11, 54, 0.06);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.ffo-field select.ffo-select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23545463' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}

/* CUSTOM DROPDOWN (Language) */
.ffo-dropdown { position: relative; width: 100%; }

.ffo-dropdown-btn {
  width: 100%;
  padding: 12px;
  padding-right: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  font: 400 16px/1.4 'Inter', system-ui, sans-serif;
  color: #242442;
  background: #fff;
  border: 1px solid #e7e4e4;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(11, 11, 54, 0.06);
  cursor: pointer;
  text-align: left;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.ffo-dropdown-btn:hover { border-color: #c4c1c1; }
.ffo-dropdown-btn:focus,
.ffo-dropdown.is-open .ffo-dropdown-btn {
  border-color: #5e983e;
  box-shadow: 0 0 0 3px rgba(94, 152, 62, 0.15);
}

.ffo-dropdown-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ffo-dropdown-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform .15s;
  pointer-events: none;
}
.ffo-dropdown.is-open .ffo-dropdown-arrow { transform: translateY(-50%) rotate(180deg); }

.ffo-flag {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  background: #f2f2f2;
  display: inline-block;
  vertical-align: middle;
}

.ffo-dropdown-list {
  position: absolute;
  z-index: 10;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #fff;
  border: 1px solid #e7e4e4;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(11, 11, 54, 0.12);
}
.ffo-dropdown-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  color: #242442;
  transition: background .1s;
}
.ffo-dropdown-list li:hover,
.ffo-dropdown-list li[aria-selected="true"] { background: #f2f2f2; }

.ffo-field.is-error .ffo-dropdown-btn {
  border-color: #b3261e;
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.12);
}

.ffo-field input::placeholder { color: #a5a5ac; }

.ffo-field input:focus,
.ffo-field select:focus {
  border-color: #5e983e;
  box-shadow: 0 0 0 3px rgba(94, 152, 62, 0.15);
}

.ffo-field.is-error input,
.ffo-field.is-error select {
  border-color: #b3261e;
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.12);
}

/* BUTTON */
.ffo-btn {
  width: 100%;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #5e983e;
  color: #fafcf8;
  border: 1px solid #5e983e;
  border-radius: 9999px;
  font: 600 16px/1.4 'Inter', system-ui, sans-serif;
  cursor: pointer;
  transition: background .15s, transform .05s;
}
.ffo-btn:hover  { background: #4f8234; }
.ffo-btn:active { transform: translateY(1px); }
.ffo-btn:disabled { opacity: .6; cursor: wait; }

/* DIVIDER */
.ffo-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  color: #545463;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}
.ffo-divider::before,
.ffo-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: #e7e4e4;
}
.ffo-divider span { flex: 0 0 auto; }

/* TELEGRAM BUTTON */
.ffo-tele-btn {
  width: 100%;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #eaf4e3;
  color: #242442;
  border: 1px solid #cfe4bf;
  border-radius: 9999px;
  font: 600 15px/1.4 'Inter', system-ui, sans-serif;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
}
.ffo-tele-btn:hover    { background: #dbecd0; border-color: #bcd9a9; }
.ffo-tele-btn:active   { transform: translateY(1px); }
.ffo-tele-btn:disabled { opacity: .7; cursor: wait; }
.ffo-tele-icon { flex: 0 0 20px; }

/* REFERRAL CARD (shown after Telegram button click) */
.ffo-referral {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: #f8faf5;
  border: 1px solid #cfe4bf;
  border-radius: 12px;
}
.ffo-referral-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: #242442;
}
.ffo-step { display: flex; align-items: flex-start; gap: 10px; }
.ffo-step code {
  background: #e7e4e4;
  color: #242442;
  padding: 1px 6px;
  border-radius: 4px;
  font: 600 12px/1.4 'SFMono-Regular', Menlo, Consolas, monospace;
}
.ffo-step-num {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #5e983e;
  color: #fff;
  font: 600 12px/20px 'Inter', system-ui, sans-serif;
  text-align: center;
}
.ffo-referral-card {
  background: #fff;
  border: 1px solid #e7e4e4;
  border-radius: 10px;
  padding: 12px 14px;
}
.ffo-referral-label {
  font-size: 12px;
  font-weight: 600;
  color: #545463;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.ffo-referral-body {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ffo-referral-code {
  flex: 1 1 auto;
  font: 600 18px/1.3 'SFMono-Regular', Menlo, Consolas, monospace;
  color: #242442;
  letter-spacing: 1px;
  word-break: break-all;
  user-select: all;
}
.ffo-referral-copy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #fff;
  color: #5e983e;
  border: 1px solid #cfe4bf;
  border-radius: 8px;
  font: 600 13px/1.3 'Inter', system-ui, sans-serif;
  cursor: pointer;
  transition: background .15s;
}
.ffo-referral-copy:hover     { background: #eaf4e3; }
.ffo-referral-copy.is-copied { background: #5e983e; color: #fff; border-color: #5e983e; }
.ffo-referral-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: #5e983e;
  color: #fff;
  border-radius: 9999px;
  font: 600 14px/1.3 'Inter', system-ui, sans-serif;
  text-decoration: none;
  transition: background .15s;
}
.ffo-referral-open:hover { background: #4f8234; color: #fff; text-decoration: none; }

/* ALERT */
.ffo-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 1.45;
}
.ffo-alert-icon { flex: 0 0 20px; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.ffo-alert-body { flex: 1 1 auto; min-width: 0; }
.ffo-alert-title { font-weight: 600; font-size: 14px; line-height: 1.4; margin-bottom: 2px; }
.ffo-alert-desc  { font-weight: 400; font-size: 13px; line-height: 1.5; }
.ffo-alert-desc strong { font-weight: 600; }

.ffo-alert.is-success { background: #eaf4e3; border-color: #cfe4bf; color: #1f4a12; }
.ffo-alert.is-success .ffo-alert-title { color: #1f4a12; }
.ffo-alert.is-success .ffo-alert-desc  { color: #3a6b2a; }

.ffo-alert.is-warn    { background: #fff7ed; border-color: #fed7aa; color: #7c2d12; }
.ffo-alert.is-warn .ffo-alert-title { color: #9a3412; }
.ffo-alert.is-warn .ffo-alert-desc  { color: #9a3412; }

.ffo-alert.is-error   { background: #fdeceb; border-color: #f4c7c4; color: #601410; }
.ffo-alert.is-error .ffo-alert-title { color: #8a1f1a; }
.ffo-alert.is-error .ffo-alert-desc  { color: #8a1f1a; }

/* TERMS */
.ffo-terms { margin: 0; font-size: 14px; line-height: 1.4; color: #545463; text-align: center; }
.ffo-link  { color: #5e983e; font-weight: 600; text-decoration: none; }
.ffo-link:hover { text-decoration: underline; }

/* SUCCESS PANEL (after submit) */
.ffo-success {
  display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; padding: 8px 0;
}
.ffo-success .ffo-icon {
  width: 56px; height: 56px; border-radius: 50%; background: #eaf4e3;
  display: inline-flex; align-items: center; justify-content: center; color: #5e983e;
}
.ffo-success h3 { margin: 0; font-size: 20px; font-weight: 600; color: #242442; }
.ffo-success p  { margin: 0; font-size: 14px; color: #545463; line-height: 1.5; }
.ffo-success .ffo-email-masked { color: #242442; font-weight: 600; }

/* RESPONSIVE */
@media (max-width: 540px) {
  .ffo-form { padding: 20px; border-radius: 12px; }
  .ffo-row-2 { flex-direction: column; }
  .ffo-title { font-size: 20px; }
}
