/* intl-tel-input v29 — tema GBOOK
 * Cargar SIEMPRE después de intlTelInput.css (el CDN redefine :root con valores light).
 * Tema app: html[data-bs-theme] desde localStorage kt_theme_mode (base_layout.html).
 * Docs: https://intl-tel-input.com/docs/theming
 */

[data-bs-theme="dark"] {
  --iti-border-color: #495057;
  --iti-country-selector-bg: #1f2430;
  --iti-icon-color: #cdd6df;
  --iti-hover-color: rgba(255, 255, 255, 0.08);
  --iti-path-globe-1x: url("https://cdn.jsdelivr.net/npm/intl-tel-input@29.0.4/dist/img/globe_light.webp");
  --iti-path-globe-2x: url("https://cdn.jsdelivr.net/npm/intl-tel-input@29.0.4/dist/img/globe_light@2x.webp");
}

[data-bs-theme="dark"] .iti.gbook-iti input.form-control,
[data-bs-theme="dark"] .iti.gbook-iti input.iti__tel-input {
  background-color: #1f2430 !important;
  color: #e5edf5 !important;
  border-color: #495057 !important;
}

[data-bs-theme="dark"] .iti.gbook-iti .iti__selected-dial-code {
  color: #cdd6df !important;
}

/* v29 detached: dropdownParent → body (.iti--detached-country-selector) */
.iti--detached-country-selector {
  z-index: 1080 !important;
}

[data-bs-theme="dark"] .iti--detached-country-selector .iti__country-selector {
  background-color: var(--iti-country-selector-bg) !important;
  border: var(--iti-border-width, 1px) solid var(--iti-border-color) !important;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.45);
  color: #e5edf5;
}

[data-bs-theme="dark"] .iti--detached-country-selector .iti__search-input {
  background-color: #111827 !important;
  color: #e5edf5 !important;
}

[data-bs-theme="dark"] .iti--detached-country-selector .iti__country,
[data-bs-theme="dark"] .iti--detached-country-selector .iti__country-name,
[data-bs-theme="dark"] .iti--detached-country-selector .iti__no-results {
  color: #e5edf5 !important;
}

[data-bs-theme="dark"] .iti--detached-country-selector .iti__country.iti__highlight {
  background-color: var(--iti-hover-color) !important;
}

/* v29 inline: dropdown dentro del wrapper .iti (drawer, calendario) */
[data-bs-theme="dark"] .iti.gbook-iti .iti__country-selector {
  background-color: var(--iti-country-selector-bg) !important;
  border-color: var(--iti-border-color) !important;
  color: #e5edf5;
}

[data-bs-theme="dark"] .iti.gbook-iti .iti__search-input {
  background-color: #111827 !important;
  color: #e5edf5 !important;
}

[data-bs-theme="dark"] .iti.gbook-iti .iti__country,
[data-bs-theme="dark"] .iti.gbook-iti .iti__country-name,
[data-bs-theme="dark"] .iti.gbook-iti .iti__no-results {
  color: #e5edf5 !important;
}

[data-bs-theme="dark"] .iti.gbook-iti .iti__country.iti__highlight {
  background-color: var(--iti-hover-color) !important;
}
