/* ODONTOTIP · Tipografía optimizada 2026
   Escala de peso reducida a 400 / 500 / 600 / 700.
   Diseño, layout, colores y comportamiento funcional preservados. */

/* assets/css/pais-moneda.css */

/* ==========================================================
   DISTRIBUCIÓN ORDENADA DEL REGISTRO
========================================================== */

.registro-card .registro-fieldset {
    display: block !important;
}

.registro-clinic-grid,
.registro-admin-grid {
    width: 100%;
    display: grid;
    gap: 10px 12px;
    align-items: start;
}

.registro-clinic-grid {
    grid-template-columns:
        minmax(155px, .92fr)
        minmax(170px, 1fr)
        minmax(285px, 1.55fr);
}

.registro-admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.registro-whatsapp-field {
    min-width: 0;
    grid-column: auto !important;
}

.registro-card .registro-field-full {
    grid-column: 1 / -1 !important;
}

.registro-card .registro-field {
    min-width: 0;
    margin: 0;
}

.registro-card .registro-field > span {
    display: block;
    margin-bottom: 7px;
}

.registro-card .registro-field input,
.registro-card .registro-field select,
.registro-card .company-country-trigger,
.registro-card .phone-country-trigger {
    min-height: 44px;
}

.country-currency-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px 14px;
}

/* ==========================================================
   SELECTOR VISUAL DE PAÍS DE OPERACIÓN
========================================================== */

.company-country-picker {
    position: relative;
    min-width: 0;
}

.company-country-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    white-space: nowrap !important;
}

.company-country-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 !important;
    padding: 0 12px;
    border: 1px solid #d7dfe8;
    border-radius: 12px;
    background: #ffffff;
    color: #172033;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition:
        border-color .16s ease,
        box-shadow .16s ease,
        background .16s ease;
}

.company-country-trigger:hover,
.company-country-picker.is-open .company-country-trigger,
.company-country-trigger:focus-visible {
    outline: 0;
    border-color: rgba(0, 169, 183, .72);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 169, 183, .11);
}

.company-country-trigger img,
.company-country-option img {
    width: 27px;
    height: 20px;
    flex: 0 0 27px;
    display: block;
    object-fit: contain;
}

.company-country-trigger > span {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-country-trigger svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    margin-left: auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .18s ease;
}

.company-country-picker.is-open .company-country-trigger svg {
    transform: rotate(180deg);
}

.company-country-menu {
    position: fixed;
    z-index: 2147483592;
    width: min(350px, calc(100vw - 28px));
    padding: 8px;
    overflow: hidden;
    border: 1px solid #dbe3ee;
    border-radius: 16px;
    background: rgba(255, 255, 255, .995);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .25);
    backdrop-filter: blur(16px);
}

.company-country-menu[hidden] {
    display: none !important;
}

.company-country-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 7px;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    background: #f8fafc;
}

.company-country-search-wrap svg {
    position: absolute;
    left: 11px;
    top: 50%;
    width: 17px;
    height: 17px;
    transform: translateY(-50%);
    fill: none;
    stroke: #64748b;
    stroke-width: 1.8;
    stroke-linecap: round;
    pointer-events: none;
}

.company-country-search {
    width: 100%;
    height: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 11px 0 36px !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #0f172a;
    font: inherit;
    font-size: 13px !important;
    font-weight: 600;
}

.company-country-options {
    max-height: 260px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.company-country-option {
    width: 100%;
    display: grid;
    grid-template-columns: 27px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #172033;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.company-country-option span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-country-option strong {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.company-country-option:hover,
.company-country-option:focus-visible {
    outline: 0;
    background: #eef9fb;
}

.company-country-option.is-selected {
    background: rgba(0, 169, 183, .12);
    color: #087d89;
    box-shadow: inset 0 0 0 1px rgba(0, 169, 183, .18);
}

.company-country-option.is-selected strong {
    color: inherit;
}

.company-country-option[hidden] {
    display: none !important;
}

/* ==========================================================
   SELECTOR INTERNACIONAL DE WHATSAPP
========================================================== */

.phone-input-group {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 9px;
    width: 100%;
}

.phone-country-picker {
    position: relative;
    min-width: 0;
}

.phone-country-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    padding: 0 10px;
    border: 1px solid #d7dfe8;
    border-radius: 12px;
    background: #ffffff;
    color: #172033;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition:
        border-color .16s ease,
        box-shadow .16s ease,
        background .16s ease;
}

.phone-country-trigger:hover,
.phone-country-picker.is-open .phone-country-trigger,
.phone-country-trigger:focus-visible {
    outline: 0;
    border-color: rgba(0, 169, 183, .72);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 169, 183, .11);
}

.phone-country-trigger img,
.phone-country-option img {
    width: 27px;
    height: 20px;
    flex: 0 0 27px;
    display: block;
    object-fit: contain;
}

.phone-country-trigger svg {
    width: 15px;
    height: 15px;
    margin-left: auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .18s ease;
}

.phone-country-picker.is-open .phone-country-trigger svg {
    transform: rotate(180deg);
}

.phone-country-menu {
    position: fixed;
    z-index: 2147483593;
    width: min(330px, calc(100vw - 28px));
    padding: 8px;
    overflow: hidden;
    border: 1px solid #dbe3ee;
    border-radius: 16px;
    background: rgba(255, 255, 255, .995);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .25);
    backdrop-filter: blur(16px);
}

.phone-country-menu[hidden] {
    display: none !important;
}

.phone-country-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 7px;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    background: #f8fafc;
}

.phone-country-search-wrap svg {
    position: absolute;
    left: 11px;
    top: 50%;
    width: 17px;
    height: 17px;
    transform: translateY(-50%);
    fill: none;
    stroke: #64748b;
    stroke-width: 1.8;
    stroke-linecap: round;
    pointer-events: none;
}

.phone-country-search {
    width: 100%;
    height: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 11px 0 36px !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #0f172a;
    font: inherit;
    font-size: 13px !important;
    font-weight: 600;
}

.phone-country-options {
    max-height: 250px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.phone-country-option {
    width: 100%;
    display: grid;
    grid-template-columns: 27px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #172033;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.phone-country-option span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.phone-country-option strong {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.phone-country-option:hover,
.phone-country-option:focus-visible {
    outline: 0;
    background: #eef9fb;
}

.phone-country-option.is-selected {
    background: rgba(0, 169, 183, .12);
    color: #087d89;
    box-shadow: inset 0 0 0 1px rgba(0, 169, 183, .18);
}

.phone-country-option.is-selected strong {
    color: inherit;
}

.phone-country-option[hidden] {
    display: none !important;
}

.phone-local-number {
    width: 100%;
    min-width: 0;
    margin: 0 !important;
}

.phone-preview,
.currency-note {
    display: block;
    margin-top: 6px;
    color: #667085;
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.35;
}

/* ==========================================================
   CLOUDFLARE TURNSTILE EN REGISTRO
========================================================== */

.registro-turnstile-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 66px;
    padding: 7px;
    border: 1px solid #e1e8ef;
    border-radius: 14px;
    background: #f8fafc;
}

.registro-turnstile-wrap .cf-turnstile {
    width: 100%;
    max-width: 100%;
}

.registro-submit:disabled {
    opacity: .62;
    cursor: not-allowed;
    filter: grayscale(.08);
}

/* ==========================================================
   FORMULARIO COMPACTO: UNA SOLA VISTA EN LAPTOP / DESKTOP
========================================================== */

.registro-body {
    min-height: 100dvh;
}

.registro-page {
    min-height: 100dvh;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    align-items: center;
}

.registro-form-section {
    min-height: 0;
    align-self: center;
}

form.registro-card {
    width: 100%;
    padding-top: 15px !important;
    padding-bottom: 14px !important;
}

form.registro-card .registro-heading {
    margin-bottom: 10px !important;
}

form.registro-card .registro-heading > span {
    margin-bottom: 2px !important;
}

form.registro-card .registro-heading h2 {
    margin-bottom: 3px !important;
    line-height: 1.05;
}

form.registro-card .registro-heading p {
    margin-top: 0 !important;
    line-height: 1.35;
}

form.registro-card .registro-fieldset {
    margin: 0 0 9px !important;
    padding: 10px 13px 12px !important;
    border-radius: 17px;
}

form.registro-card .registro-fieldset legend {
    padding-inline: 7px;
}

form.registro-card .registro-field > span {
    margin-bottom: 5px;
    line-height: 1.2;
}

form.registro-card .registro-field input,
form.registro-card .registro-field select,
form.registro-card .company-country-trigger,
form.registro-card .phone-country-trigger {
    min-height: 40px;
    height: 40px;
}

form.registro-card .phone-input-group {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 7px;
}

form.registro-card .phone-preview,
form.registro-card .currency-note {
    margin-top: 4px;
    min-height: 14px;
    font-size: 9.5px;
    line-height: 1.25;
}

/* Checkbox y texto en la misma línea. */
form.registro-card .registro-terms {
    width: 100%;
    display: grid !important;
    grid-template-columns: 17px minmax(0, 1fr);
    align-items: center !important;
    column-gap: 9px;
    margin: 6px 0 8px !important;
    padding: 0 1px;
    cursor: pointer;
}

form.registro-card .registro-terms input[type="checkbox"] {
    position: static !important;
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    min-height: 17px !important;
    margin: 0 !important;
    padding: 0 !important;
    align-self: center;
    accent-color: #00a9b7;
}

form.registro-card .registro-terms > span {
    min-width: 0;
    margin: 0 !important;
    line-height: 1.3;
}

form.registro-card .registro-turnstile-wrap {
    min-height: 60px;
    padding: 4px 6px;
    border-radius: 12px;
}

form.registro-card .registro-submit {
    min-height: 41px;
    margin-top: 7px !important;
}

form.registro-card .registro-login-link {
    margin-top: 7px !important;
    margin-bottom: 0 !important;
    line-height: 1.25;
}

/* En una pantalla de escritorio normal, evita el scroll de la página. */
@media (min-width: 900px) and (min-height: 700px) {
    html,
    body.registro-body {
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    .registro-page {
        width: 100%;
        height: 100dvh;
        min-height: 100dvh;
        overflow: hidden;
    }

    .registro-form-section {
        max-height: 100%;
        overflow: hidden;
    }

    form.registro-card {
        max-height: calc(100dvh - 20px);
    }

    html:has(.registro-alert-error),
    body.registro-body:has(.registro-alert-error) {
        height: auto;
        overflow-y: auto;
    }
}

/* Pantallas de poca altura: reduce espacios, pero conserva acceso a todo. */
@media (max-height: 820px) and (min-width: 681px) {
    .registro-page {
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }

    form.registro-card {
        padding-top: 11px !important;
        padding-bottom: 10px !important;
    }

    form.registro-card .registro-heading {
        margin-bottom: 7px !important;
    }

    form.registro-card .registro-heading h2 {
        font-size: clamp(20px, 2.3vw, 27px);
    }

    form.registro-card .registro-fieldset {
        margin-bottom: 7px !important;
        padding-top: 8px !important;
        padding-bottom: 9px !important;
    }

    form.registro-card .registro-field input,
    form.registro-card .registro-field select,
    form.registro-card .company-country-trigger,
    form.registro-card .phone-country-trigger {
        min-height: 38px;
        height: 38px;
    }

    form.registro-card .registro-turnstile-wrap {
        min-height: 57px;
    }

    form.registro-card .registro-submit {
        min-height: 39px;
    }
}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 980px) {
    .registro-clinic-grid {
        grid-template-columns:
            minmax(145px, .9fr)
            minmax(155px, .95fr)
            minmax(265px, 1.45fr);
        gap: 9px 10px;
    }

    form.registro-card .phone-input-group {
        grid-template-columns: 108px minmax(0, 1fr);
    }
}

@media (max-width: 680px) {
    html,
    body.registro-body {
        height: auto;
        overflow-y: auto;
    }

    .registro-page {
        min-height: 100dvh;
        padding: 8px !important;
        align-items: start;
    }

    form.registro-card {
        padding: 13px !important;
    }

    .registro-clinic-grid,
    .registro-admin-grid,
    .country-currency-grid {
        grid-template-columns: 1fr;
    }

    .registro-card .registro-field-full,
    .registro-whatsapp-field {
        grid-column: auto !important;
    }

    .phone-input-group,
    form.registro-card .phone-input-group {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    form.registro-card .registro-terms {
        align-items: start !important;
    }

    form.registro-card .registro-terms input[type="checkbox"] {
        margin-top: 1px !important;
    }
}

@media (max-width: 420px) {
    .phone-input-group,
    form.registro-card .phone-input-group {
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 6px;
    }

    .company-country-trigger,
    .phone-country-trigger {
        padding-inline: 8px;
    }

    .company-country-trigger img,
    .company-country-option img,
    .phone-country-trigger img,
    .phone-country-option img {
        width: 24px;
        height: 18px;
        flex-basis: 24px;
    }

    .registro-turnstile-wrap {
        padding-inline: 3px;
    }
}


/* Jerarquía tipográfica clínica */
.company-country-trigger, .phone-country-trigger { font-weight: 500; }
.company-country-search, .phone-country-search { font-weight: 400; }
.company-country-option, .phone-country-option { font-weight: 500; }
.company-country-option strong, .phone-country-option strong { font-weight: 600; }
.phone-preview, .currency-note { font-weight: 400; }
