/* Banderas y selector de país (static/js/countries.js). Compartido por el
   panel admin, el portal de coach y el sitio público: CSS simple, sin
   Tailwind, para que funcione igual en las tres hojas de estilo. */

.flag {
  display: inline-block;
  width: 1.34em;
  height: 1em;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .12);
  vertical-align: -0.14em;
  flex-shrink: 0;
  background: #e2e8f0;
}
.flag-label { margin-left: .45em; }
.flag-code { font-weight: 700; font-size: .85em; letter-spacing: .04em; }

/* ---- Selector ---- */
.cs { position: relative; display: block; width: 100%; font-weight: 400; text-transform: none; letter-spacing: normal; }
.cs-native {
  position: absolute !important; inset: 0; width: 100% !important; height: 100% !important;
  opacity: 0 !important; pointer-events: none !important; margin: 0 !important;
}
.cs-button {
  display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box;
  margin: 0; padding-right: 38px; text-align: left; cursor: pointer;
  border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: inherit;
  font: inherit; line-height: 1.3; min-height: 44px; position: relative;
}
.cs-button .flag { width: 22px; height: 16.5px; }
.cs-button-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-button-text.is-placeholder { opacity: .55; }
.cs-chevron {
  position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); opacity: .5; transition: transform .15s;
}
.cs.is-open .cs-chevron { transform: rotate(-135deg); margin-top: -2px; }
.cs-button:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

.cs-panel {
  position: absolute; z-index: 80; left: 0; right: 0; top: calc(100% + 6px);
  background: #fff; border: 1px solid #cbd5e1; border-radius: 12px;
  box-shadow: 0 18px 40px -12px rgba(15, 23, 42, .28); overflow: hidden;
  color: #0f172a; font-size: 14px;
}
.cs.opens-up .cs-panel { top: auto; bottom: calc(100% + 6px); }
.cs-search {
  display: block; width: 100%; box-sizing: border-box; margin: 0 !important;
  border: 0 !important; border-bottom: 1px solid #e2e8f0 !important; border-radius: 0 !important;
  padding: 12px 14px 12px 38px !important; font: inherit; font-size: 14px !important; outline: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat 13px center / 16px !important;
  box-shadow: none !important;
}
.cs-list { list-style: none; margin: 0; padding: 6px; max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; }
.cs-group {
  padding: 10px 10px 4px; font-size: 10px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: #94a3b8;
}
.cs-option {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  cursor: pointer; color: #1e293b;
}
.cs-option .cs-name { flex: 1; min-width: 0; }
.cs-option small { font-size: 11px; font-weight: 700; color: #94a3b8; letter-spacing: .04em; }
.cs-option.is-active { background: #eff6ff; }
.cs-option[aria-selected="true"] { font-weight: 700; color: #1d4ed8; }
.cs-option[aria-selected="true"]::after {
  content: ""; width: 5px; height: 9px; margin-right: 3px;
  border-right: 2px solid #1d4ed8; border-bottom: 2px solid #1d4ed8; transform: rotate(45deg);
}
.cs-option .flag { width: 22px; height: 16.5px; }
.cs-flag-blank { width: 22px; height: 16.5px; border-radius: 2px; border: 1px dashed #cbd5e1; flex-shrink: 0; }
.cs-empty { padding: 18px 10px; text-align: center; color: #94a3b8; font-size: 13px; }
.cs [hidden] { display: none !important; }
/* Aislado de los estilos de etiqueta de cada formulario (ej. en el sitio
   público, «.form-field span» pone todo en mayúsculas y en bloque). */
.cs .cs-name, .cs .cs-button-text {
  display: block; margin: 0; font-size: inherit; font-weight: inherit; color: inherit;
  text-transform: none; letter-spacing: normal;
}
.cs .cs-button-text { font-weight: 500; }
.cs .cs-chevron { display: block; margin-bottom: 0; }
.cs .cs-flag-blank { display: block; margin: 0; }
.cs .flag-label { display: inline; text-transform: none; }
