/*
 * Estilos globales del layout cliente (Tailwind + custom)
 */

button, [type="submit"], [type="button"], [role="button"], a {
  cursor: pointer;
}

#site-navbar {
  background: transparent;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

#site-navbar.is-scrolled {
  background: rgba(7, 19, 35, 0.9);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 32px rgba(2, 8, 18, 0.34);
  backdrop-filter: blur(18px);
}

@supports not (backdrop-filter: blur(1px)) {
  #site-navbar.is-scrolled {
    background: rgba(7, 19, 35, 0.97);
  }
}

.goal-net-bg::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -90px -60px;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.13) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.11) 1px, transparent 1px);
  background-position: center;
  background-size: 88px 62px;
  mask-image: radial-gradient(ellipse at 50% 48%, black 0%, rgba(0, 0, 0, 0.58) 42%, transparent 80%);
  opacity: 0.42;
  transform: perspective(920px) rotateX(9deg) skewY(-1.2deg);
  transform-origin: center;
}

.goal-net-bg::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 107, 53, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(7, 19, 35, 0.04), rgba(7, 19, 35, 0.74) 96%);
}

.goal-net-bg > * {
  position: relative;
  z-index: 1;
}

.flow-card {
  position: relative;
  overflow: hidden;
}

.flow-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #ff6b35 0 64px, rgba(7, 19, 35, 0.18) 64px 100%);
}

.flow-card::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -42px;
  width: 116px;
  height: 116px;
  border: 1px solid rgba(7, 19, 35, 0.08);
  border-radius: 999px;
}

.benefits-field-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(7, 19, 35, 0.045) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    radial-gradient(circle at 50% 50%, transparent 0 118px, rgba(7, 19, 35, 0.05) 119px 120px, transparent 121px),
    linear-gradient(rgba(7, 19, 35, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 19, 35, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 64px 64px, 64px 64px;
  opacity: 0.74;
}

.benefit-card {
  position: relative;
  overflow: hidden;
}

.benefit-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #ff6b35, rgba(255, 107, 53, 0));
  opacity: 0;
  transition: opacity 160ms ease;
}

.benefit-card:hover::before {
  opacity: 1;
}

/* ── Tom Select — tema oscuro ───────────────────────────────────── */

select.country-tomselect {
  width: 100%;
  appearance: none;
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  padding: 0.75rem 2.75rem 0.75rem 1rem;
  line-height: 1.5rem;
  background-image: linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.5) 50%), linear-gradient(135deg, rgba(255, 255, 255, 0.5) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) calc(1.25rem), calc(100% - 0.85rem) calc(1.25rem);
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
}

select.country-tomselect:focus {
  outline: none;
  border-color: #ff8a5c;
  box-shadow: 0 0 0 1px #ff8a5c;
}

select.country-tomselect option {
  background: #071323;
  color: #ffffff;
}

/* El wrapper ocupa todo el ancho pero SIN estilos visuales propios */
.country-tomselect + .ts-wrapper,
.ts-wrapper {
  width: 100% !important;
  border: none !important;
  padding: 0 !important;
  background: transparent !important;
}

/* El control interno es el que tiene la apariencia del input */
.ts-wrapper .ts-control {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 0.75rem !important;
  padding: 0.625rem 1rem !important;
  min-height: unset !important;
  color: #ffffff !important;
  box-shadow: none !important;
  cursor: pointer;
  line-height: 1.5rem;
  gap: 0;
}

.ts-wrapper.focus .ts-control {
  border-color: #ff8a5c !important;
  box-shadow: 0 0 0 1px #ff8a5c !important;
}

.ts-control input {
  color: #ffffff !important;
}

.ts-control input::placeholder {
  color: rgba(255, 255, 255, 0.3) !important;
}

.ts-dropdown {
  background-color: #071323 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
  margin-top: 4px !important;
  overflow: hidden;
}

.ts-dropdown .ts-dropdown-content {
  max-height: 220px;
}

.ts-dropdown .option {
  color: rgba(255, 255, 255, 0.7) !important;
  padding: 0.6rem 1rem !important;
  font-size: 0.875rem;
  transition: all 0.15s;
}

.ts-dropdown .option:hover,
.ts-dropdown .option.active {
  background-color: rgba(255, 107, 53, 0.16) !important;
  color: #ff8a5c !important;
}

.ts-dropdown .option.selected {
  background-color: rgba(255, 107, 53, 0.12) !important;
  color: #ff8a5c !important;
  font-weight: 500;
}

.ts-dropdown .optgroup-header {
  color: rgba(255, 255, 255, 0.3) !important;
  font-size: 0.7rem !important;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 1rem 0.25rem !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ts-wrapper .ts-control .item {
  color: #ffffff !important;
}

/* Caret / flecha del dropdown */
.ts-wrapper.single .ts-control:after {
  border-color: rgba(255, 255, 255, 0.4) transparent transparent !important;
}

.ts-wrapper.single.dropdown-active .ts-control:after {
  border-color: transparent transparent rgba(255, 255, 255, 0.4) !important;
}

/* Scrollbar del dropdown */
.ts-dropdown-content::-webkit-scrollbar {
  width: 4px;
}
.ts-dropdown-content::-webkit-scrollbar-track {
  background: transparent;
}
.ts-dropdown-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}
