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

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

/* ── 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: #22c55e;
  box-shadow: 0 0 0 1px #22c55e;
}

select.country-tomselect option {
  background: #111827;
  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: #22c55e !important;
  box-shadow: 0 0 0 1px #22c55e !important;
}

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

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

.ts-dropdown {
  background-color: #111827 !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(22, 163, 74, 0.2) !important;
  color: #22c55e !important;
}

.ts-dropdown .option.selected {
  background-color: rgba(22, 163, 74, 0.15) !important;
  color: #22c55e !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;
}
