/* ============================================================
   Air Mastery — Videotraining Popup (Lead-Gate)
   Desktop: centered modal · Mobile: bottom-sheet
   ============================================================ */
#vt-popup-root {
  position: fixed;
  inset: 0;
  z-index: 999998;
  display: none;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
#vt-popup-root.open { display: block; }

#vt-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 15, 0.7);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
#vt-popup-root.open #vt-popup-backdrop { opacity: 1; }

#vt-popup-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
}

#vt-popup-card {
  pointer-events: auto;
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: linear-gradient(160deg, rgba(20, 25, 41, 0.96) 0%, rgba(11, 15, 26, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 30px 80px -10px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(48, 111, 213, 0.06);
  padding: 28px 26px 22px;
  color: #F0F4FF;
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
}
#vt-popup-root.open #vt-popup-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.vt-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.04);
  color: #8B97B8;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  font-size: 0;
}
.vt-close:hover { background: rgba(255, 255, 255, 0.08); color: #F0F4FF; }
.vt-close svg { width: 16px; height: 16px; }

.vt-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #5092ff, #306FD5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 6px 22px rgba(48, 111, 213, 0.4);
}
.vt-icon svg { width: 26px; height: 26px; color: #fff; }

.vt-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.2;
  margin: 0 0 6px;
  color: #F0F4FF;
}
.vt-sub {
  font-size: 13.5px;
  color: #B8C2D9;
  line-height: 1.55;
  margin: 0 0 22px;
}

.vt-form { display: flex; flex-direction: column; gap: 10px; }
.vt-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.vt-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8B97B8;
  padding-left: 2px;
}
.vt-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  color: #F0F4FF;
  transition: border-color 0.15s ease, background 0.15s ease;
  outline: none;
}
.vt-input::placeholder { color: #5a6478; }
.vt-input:focus {
  border-color: rgba(80, 146, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

/* Honeypot — versteckt vor menschlichen Augen */
.vt-honey {
  position: absolute !important;
  left: -10000px !important;
  top: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ============================================================
   intl-tel-input — Edler Country-Picker
   Targetet v24 Klassen + den (zu body angehängten) Dropdown-Container
   ============================================================ */
#vt-popup-card .iti { width: 100%; }
#vt-popup-card .iti__selected-country,
#vt-popup-card .iti__country-container > button {
  background: transparent !important;
  border-right: 1px solid rgba(255,255,255,0.06) !important;
  padding: 0 10px 0 12px !important;
  height: 100% !important;
  transition: background 0.15s ease !important;
}
#vt-popup-card .iti__selected-country:hover {
  background: rgba(255,255,255,0.04) !important;
}
#vt-popup-card .iti__selected-dial-code {
  color: #B8C2D9 !important;
  font-weight: 500 !important;
  font-size: 13.5px !important;
  margin-left: 6px !important;
}
#vt-popup-card .iti__flag {
  border-radius: 2px !important;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}
#vt-popup-card .iti__arrow {
  border-top-color: #8B97B8 !important;
  margin-left: 6px !important;
}

/* === Dropdown (am body angehängt) — Inline-Variante Desktop ============ */
.iti--container,
.iti__dropdown-content {
  z-index: 1000000 !important;          /* über unserem Popup (999998) */
  background:
    linear-gradient(180deg, rgba(20, 25, 41, 0.98) 0%, rgba(11, 15, 26, 0.99) 100%) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 14px !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 28px 60px -12px rgba(0,0,0,0.7) !important;
  overflow: hidden !important;
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  font-family: 'Inter', -apple-system, sans-serif !important;
  margin-top: 6px !important;
}

/* Search-Input im Dropdown */
.iti__search-input {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 9px !important;
  color: #F0F4FF !important;
  font-size: 13.5px !important;
  padding: 10px 12px !important;
  margin: 10px 10px 6px !important;
  width: calc(100% - 20px) !important;
  outline: none !important;
  transition: border-color 0.15s ease, background 0.15s ease !important;
}
.iti__search-input::placeholder { color: #5a6478 !important; }
.iti__search-input:focus {
  border-color: rgba(80,146,255,0.6) !important;
  background: rgba(255,255,255,0.05) !important;
}

/* Country-List */
.iti__country-list {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  color: #F0F4FF !important;
  font-size: 13.5px !important;
  max-height: 280px !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
  padding: 4px 0 8px !important;
}
.iti__country-list::-webkit-scrollbar { width: 6px; }
.iti__country-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.10); border-radius: 4px; }

/* Country-Items */
.iti__country {
  padding: 10px 14px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  transition: background 0.12s ease !important;
  border: none !important;
}
.iti__country:hover,
.iti__country.iti__highlight {
  background: rgba(80,146,255,0.12) !important;
}
.iti__country .iti__country-name { color: #F0F4FF !important; }
.iti__country .iti__dial-code {
  color: #8B97B8 !important;
  font-size: 12.5px !important;
  margin-left: auto !important;
  padding-left: 12px !important;
}
.iti__country.iti__active {
  background: rgba(80,146,255,0.18) !important;
}

/* Divider zwischen "Preferred" und "All Countries" */
.iti__divider {
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  margin: 6px 0 !important;
  padding: 0 !important;
  height: 0 !important;
}

/* === Mobile: Fullscreen-Popup ============ */
.iti--fullscreen-popup {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1000001 !important;
  background: rgba(5, 8, 15, 0.96) !important;
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-radius: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}
.iti--fullscreen-popup .iti__country-list {
  flex: 1 !important;
  max-height: none !important;
  padding: 4px 0 24px !important;
}
.iti--fullscreen-popup .iti__search-input {
  margin: 14px 16px 8px !important;
  width: calc(100% - 32px) !important;
  font-size: 16px !important;     /* iOS: 16px verhindert Zoom-In */
  padding: 12px 14px !important;
  border-radius: 11px !important;
}
.iti--fullscreen-popup .iti__country {
  padding: 13px 18px !important;
  font-size: 15px !important;
}
.iti--fullscreen-popup .iti__country .iti__dial-code {
  font-size: 14px !important;
}

/* Fullscreen-Header mit Close-Button (intl-tel-input v24 baut den standardmäßig) */
.iti--fullscreen-popup .iti__country-container,
.iti--fullscreen-popup .iti__dropdown-header {
  background: rgba(255,255,255,0.03) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  padding: 14px 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.vt-submit {
  width: 100%;
  background: linear-gradient(180deg, #5092ff 0%, #306FD5 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,
    0 6px 20px rgba(48,111,213,0.4);
  font-family: inherit;
}
.vt-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #5B93E8 0%, #4080e5 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.22) inset,
    0 9px 26px rgba(48,111,213,0.5);
}
.vt-submit:disabled { opacity: 0.65; cursor: wait; }

.vt-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: vtspin 0.7s linear infinite;
  display: none;
}
.vt-submit.loading .vt-spinner { display: inline-block; }
.vt-submit.loading .vt-submit-text { opacity: 0.7; }
@keyframes vtspin { to { transform: rotate(360deg); } }

.vt-trust {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}
.vt-trust-item {
  font-size: 11px;
  color: #8B97B8;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.vt-trust-item::before {
  content: '✓';
  color: #4ade80;
  font-weight: 700;
}

.vt-error {
  display: none;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  margin-bottom: 10px;
}
.vt-error.show { display: block; }

.vt-success {
  display: none;
  text-align: center;
  padding: 20px 0;
}
.vt-success.show { display: block; }
.vt-success-icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  border: 2px solid rgba(34, 197, 94, 0.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.vt-success-title { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.vt-success-msg { font-size: 13px; color: #B8C2D9; line-height: 1.55; }

/* ============================================================
   MOBILE — Bottom-Sheet
   ============================================================ */
@media (max-width: 640px) {
  #vt-popup-wrap {
    align-items: flex-end;
    padding: 0;
  }
  #vt-popup-card {
    max-width: none;
    border-radius: 22px 22px 0 0;
    padding: 22px 20px 26px;
    max-height: 90vh;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
  }
  #vt-popup-root.open #vt-popup-card { transform: translateY(0); opacity: 1; }
  .vt-title { font-size: 19px; }
  .vt-sub { font-size: 13px; margin-bottom: 18px; }
  /* iOS: font-size >= 16px verhindert Auto-Zoom-In beim Fokus */
  .vt-input { padding: 12px 13px; font-size: 16px; }
  .vt-submit { padding: 13px 16px; font-size: 15px; }
  /* iti Phone-Input ebenfalls 16px erzwingen — gleiche Regel */
  #vt-popup-card .iti input[type="tel"] { font-size: 16px !important; }
  #vt-popup-card .iti__selected-dial-code { font-size: 15px !important; }
  /* Drag handle visual */
  #vt-popup-card::before {
    content: '';
    display: block;
    width: 38px;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
    margin: -8px auto 14px;
  }
  .vt-close { top: 14px; right: 14px; }
}

/* Body-Scroll-Lock */
body.vt-popup-open { overflow: hidden; }
