/* =========================================================
   AGENDA ONLINE ELEMENTS
   Archivo de estilos centralizado para Default.aspx
   Secciones separadas por panel/elemento para mantener el flujo WebForms.
   ========================================================= */


/* =========================================================
   TOKENS VISUALES / FUENTE GLOBAL
   ========================================================= */
:root {
    --agenda-font-family: 'Roboto', sans-serif;
    --agenda-sidebar-width-desktop: 273px;
    --agenda-color-primary: #4B5DC1;
    --agenda-color-primary-hover: #4054BD;
    --agenda-color-primary-dark: #3547A8;
    --agenda-color-title: #001B3F;
    --agenda-color-text: #13233D;
    --agenda-color-muted: #666666;
    --agenda-color-surface: #FFFFFF;
    --agenda-color-page: #F4F6FF;
    --agenda-radius-button: 0 10px 10px 10px;
    --agenda-radius-hour-button: 7px;
    --agenda-radius-card: 12px;
    --agenda-radius-control: 10px;
    --agenda-title-main-size: 30px;
    --agenda-title-main-weight: 700;
    --agenda-title-main-line-height: 1.16;
    --agenda-title-main-letter-spacing: 0;
    --agenda-subtitle-main-size: 18px;
}

/* =========================================================
   PANEL GENERAL DEL PROCESO
   ========================================================= */
.agenda-proceso-wrapper {
    width: 100%;
    min-height: calc(100vh - 80px);
    padding: 70px 16px 40px 16px;
    box-sizing: border-box;
    background: #f4f6ff;
}

.agenda-proceso-titulo {
    text-align: center;
    margin-bottom: 54px;
}

    .agenda-proceso-titulo h1 {
        margin: 0 0 14px 0;
        color: #4b5fc7;
        font-size: 40px;
        font-weight: 700;
        line-height: 1.15;
    }

    .agenda-proceso-titulo p {
        margin: 0;
        color: #4b5fc7;
        font-size: 25px;
        font-weight: 400;
    }

.agenda-lista-horas-sede-sin-horas
/* =========================================================
   PANEL RUT PACIENTE
   ========================================================= */
.agenda-rut-wrapper {
    width: 100%;
    box-sizing: border-box;
}

.agenda-rut-titulo {
    text-align: center;
    margin-bottom: 54px;
}

    .agenda-rut-titulo h1 {
        margin: 0 0 14px 0;
        color: #4b5fc7;
        font-size: 40px;
        font-weight: 700;
        line-height: 1.15;
    }

    .agenda-rut-titulo p {
        margin: 0;
        color: #4b5fc7;
        font-size: 25px;
        font-weight: 400;
    }

.agenda-rut-card {
    width: 100%;
    max-width: 660px;
    min-height: 500px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    padding: 96px 48px 48px 48px;
    box-sizing: border-box;
}

.agenda-rut-contenido {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    text-align: center;
}

    .agenda-rut-contenido h2 {
        margin: 0 0 34px 0;
        color: #001b3f;
        font-size: 27px;
        font-weight: 700;
        line-height: 1.2;
    }

.agenda-rut-control {
    width: 100%;
    height: 56px;
    margin-bottom: 14px;
    border: 1px solid #4b5fc7;
    border-radius: 12px;
    background: #ffffff;
    color: #222222;
    font-size: 25px;
    text-align: center;
    text-align-last: center;
    padding: 0 18px;
    box-sizing: border-box;
}

.agenda-rut-input {
    color: #222222;
}

    .agenda-rut-input::placeholder {
        color: #777777;
        opacity: 1;
    }

.agenda-rut-control:focus {
    outline: none;
    border-color: #4b5fc7;
    box-shadow: 0 0 0 2px rgba(75, 95, 199, 0.12);
}

.agenda-rut-btn-continuar {
    width: 100%;
    height: 46px;
    margin-top: 0;
    border: 1px solid #3547a8;
    background: #4b5fc7;
    color: #ffffff;
    font-size: 27px;
    font-weight: 600;
    cursor: pointer;
}

    .agenda-rut-btn-continuar:hover {
        background: #4054bd;
    }

.agenda-rut-error {
    display: block;
    margin: 0 0 10px 0;
    color: #b00020;
    font-size: 14px;
    text-align: left;
}

.agenda-rut-mensaje {
    margin: 0 0 10px 0;
    color: #b00020;
    font-size: 14px;
    text-align: left;
}

/* =========================================================
   PANEL INTERMEDIO / CONFIRMACIÓN SIMPLE
   ========================================================= */
.agenda-intermedio-card,
.agenda-confirmacion-card {
    width: 100%;
    max-width: 660px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    padding: 56px 48px;
    box-sizing: border-box;
    text-align: center;
}

    .agenda-intermedio-card h2,
    .agenda-confirmacion-card h2 {
        margin: 0 0 18px 0;
        color: #001b3f;
        font-size: 27px;
        font-weight: 700;
    }

    .agenda-intermedio-card p,
    .agenda-confirmacion-card p {
        margin: 0 0 24px 0;
        color: #13233D;
        font-size: 16px;
    }

/* =========================================================
   PANEL INTERMEDIO DOBLE SELECCIÓN
   ========================================================= */
.agenda-doble-seleccion-contenedor {
    max-width: 1180px;
    padding: 48px 40px;
    text-align: center;
}

    .agenda-doble-seleccion-contenedor > p {
        max-width: 760px;
        margin-left: auto;
        margin-right: auto;
    }

.agenda-doble-seleccion-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 32px;
    width: 100%;
    margin-top: 28px;
}

.agenda-doble-seleccion-card {
    min-height: 470px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 34px 42px 28px 42px;
    background: #ffffff;
    border: 1px solid #edf0fa;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.16);
    box-sizing: border-box;
    text-align: left;
}

.agenda-doble-seleccion-contenido h3 {
    margin: 0 0 24px 0;
    color: #13233D;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
}

.agenda-doble-seleccion-descripcion {
    min-height: 150px;
    margin: 0 0 28px 0 !important;
    color: #4054bd !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px !important;
    line-height: 1.55;
    text-align: left;
}

.agenda-doble-seleccion-precios {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 28px 0;
}

.agenda-doble-seleccion-precio {
    display: block;
    min-height: 22px;
    padding: 9px 14px;
    border: 1px solid #dbe1f4;
    border-radius: 12px;
    color: #111111;
    font-size: 16px;
    line-height: 1.35;
}

    .agenda-doble-seleccion-precio br {
        line-height: 1.7;
    }

.agenda-doble-seleccion-btn {
    display: block;
    width: 100%;
    padding: 12px 18px;
    background: #4b5fc4;
    border-radius: 11px;
    color: #ffffff !important;
    font-size: 19px;
    font-weight: 600;
    text-align: center;
    text-decoration: none !important;
    box-sizing: border-box;
}

    .agenda-doble-seleccion-btn:hover,
    .agenda-doble-seleccion-btn:focus {
        background: #4054bd;
        color: #ffffff !important;
    }

@media (max-width: 980px) {
    .agenda-doble-seleccion-contenedor {
        padding: 34px 24px;
    }

    .agenda-doble-seleccion-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .agenda-doble-seleccion-card {
        min-height: auto;
        padding: 28px 24px 24px 24px;
    }

    .agenda-doble-seleccion-descripcion {
        min-height: auto;
    }
}

@media (max-width: 560px) {
    .agenda-doble-seleccion-contenedor {
        padding: 28px 16px;
    }

    .agenda-doble-seleccion-contenido h3 {
        font-size: 21px;
    }

    .agenda-doble-seleccion-descripcion {
        font-size: 16px !important;
    }

    .agenda-doble-seleccion-precio {
        font-size: 16px;
    }

    .agenda-doble-seleccion-btn {
        font-size: 16px;
    }
}

/* =========================================================
   PANEL HORAS DISPONIBLES - ESTRUCTURA GENERAL
   ========================================================= */
.agenda-horas-wrapper {
    width: 100%;
    padding-top: 0;
}

.agenda-horas-titulo {
    text-align: center;
    margin-bottom: 35px;
}

    .agenda-horas-titulo h1 {
        margin: 0;
        color: #3f57c4;
        font-size: 32px;
        font-weight: 700;
    }

    .agenda-horas-titulo p {
        margin: 6px 0 0 0;
        color: #3f57c4;
        font-size: 20px;
    }

.agenda-horas-card {
    width: 88%;
    max-width: 1120px;
    min-height: 350px;
    margin: 0 auto;
    padding: 24px 42px;
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 12px;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.22);
    display: grid;
    grid-template-columns: 220px 1fr 330px;
    column-gap: 35px;
    align-items: start;
}

.agenda-item-info {
    text-align: left;
}

.agenda-item-img {
    width: 185px;
    height: 245px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    display: block;
    margin: 0 auto 18px auto;
}

.agenda-item-nombre {
    display: block;
    color: #4d5fb1;
    font-size: 20px !important;
    font-weight: 500;
    text-align: center;
    text-transform: uppercase;
}

.agenda-disponibilidad-centro {
    text-align: center;
    padding-top: 5px;
}

.agenda-fecha-principal {
    display: block;
    color: #4d5fb1;
    font-size: 18px;
    margin-bottom: 18px;
}

.agenda-servicio {
    display: block;
    color: #000;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.agenda-lista-horas {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

.agenda-btn-hora {
    min-width: 72px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid #3f57ff;
    border-radius: 9px;
    background: #fff;
    color: #3f57c4;
    font-size: 15px;
    cursor: pointer;
    margin-left: -1px;
}

    .agenda-btn-hora:hover,
    .agenda-btn-hora.activo {
        background: #3f57c4;
        color: #fff;
    }

    .agenda-btn-hora.deshabilitado {
        opacity: .45;
        cursor: not-allowed;
    }

/* CALENDARIO DISPONIBILIDAD */
/* =========================================================
   PANEL HORAS DISPONIBLES - CALENDARIO
   ========================================================= */
.agenda-calendario-box {
    text-align: center;
}

.agenda-calendario-titulo {
    display: block;
    margin-bottom: 18px;
    color: #13233D;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.agenda-calendario {
    width: 360px;
    max-width: 100%;
    margin: 0 auto;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #cfcfcf;
    border-radius: 2px;
    background: #ffffff;
    color: #222222;
    font-size: 16px;
    table-layout: fixed;
    overflow: hidden;
}

    .agenda-calendario table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        table-layout: fixed;
    }

    .agenda-calendario td,
    .agenda-calendario th {
        position: relative;
        text-align: center;
        vertical-align: middle;
        box-sizing: border-box;
    }

    .agenda-calendario a,
    .agenda-calendario a:hover,
    .agenda-calendario a:focus {
        color: inherit;
        text-decoration: none;
    }

.agenda-calendario-title {
    height: 44px;
    background: #ffffff;
    color: #4b5fc7;
    font-size: 20px;
    font-weight: 700;
    line-height: 44px;
    text-transform: lowercase;
}

    .agenda-calendario-title a,
    .agenda-calendario-title a:hover,
    .agenda-calendario-title a:focus {
        display: inline-block;
        min-width: 28px;
        color: #202020;
        font-size: 18px;
        font-weight: 700;
        line-height: 44px;
        text-decoration: none;
    }

.agenda-calendario-day-header {
    height: 48px;
    background: #e8e8e8;
    color: #4b5fc7;
    font-size: 0;
    font-weight: 700;
    line-height: 48px;
    text-transform: uppercase;
}

    .agenda-calendario-day-header::after {
        color: #4b5fc7;
        font-size: 17px;
        font-weight: 700;
        line-height: 48px;
    }

.agenda-calendario tr:nth-child(2) th.agenda-calendario-day-header:nth-child(1)::after {
    content: "L";
}

.agenda-calendario tr:nth-child(2) th.agenda-calendario-day-header:nth-child(2)::after {
    content: "M";
}

.agenda-calendario tr:nth-child(2) th.agenda-calendario-day-header:nth-child(3)::after {
    content: "X";
}

.agenda-calendario tr:nth-child(2) th.agenda-calendario-day-header:nth-child(4)::after {
    content: "J";
}

.agenda-calendario tr:nth-child(2) th.agenda-calendario-day-header:nth-child(5)::after {
    content: "V";
}

.agenda-calendario tr:nth-child(2) th.agenda-calendario-day-header:nth-child(6)::after {
    content: "S";
}

.agenda-calendario tr:nth-child(2) th.agenda-calendario-day-header:nth-child(7)::after {
    content: "D";
}

/*
    Importante:
    DayRender puede reemplazar la clase base del Calendar.
    Por eso los estilos de celda se aplican también a las clases agregadas desde CodeBehind.
*/
.agenda-calendario-day,
.agenda-calendario td.agenda-dia-disponible,
.agenda-calendario td.agenda-dia-no-disponible,
.agenda-calendario td.agenda-dia-seleccionado {
    width: 14.285%;
    height: 46px !important;
    min-height: 46px;
    padding: 24px 0 5px 0 !important;
    color: #222222;
    font-size: 16px;
    line-height: 17px !important;
    text-align: center;
    vertical-align: bottom !important;
    box-sizing: border-box;
}

    .agenda-calendario-day a,
    .agenda-calendario td.agenda-dia-disponible a,
    .agenda-calendario td.agenda-dia-no-disponible a,
    .agenda-calendario td.agenda-dia-seleccionado a,
    .agenda-calendario-day a:hover,
    .agenda-calendario td.agenda-dia-disponible a:hover,
    .agenda-calendario td.agenda-dia-no-disponible a:hover,
    .agenda-calendario td.agenda-dia-seleccionado a:hover,
    .agenda-calendario-day a:focus,
    .agenda-calendario td.agenda-dia-disponible a:focus,
    .agenda-calendario td.agenda-dia-no-disponible a:focus,
    .agenda-calendario td.agenda-dia-seleccionado a:focus {
        position: relative;
        z-index: 2;
        display: block;
        width: 100%;
        height: 17px;
        min-height: 17px;
        padding: 0 !important;
        color: inherit !important;
        font-size: inherit;
        font-weight: inherit;
        line-height: 17px;
        text-align: center;
        text-decoration: none;
        box-sizing: border-box;
    }

.agenda-calendario-other-month {
    color: #b7b7b7;
}

.agenda-calendario-today {
    color: #4b5fc7;
    font-weight: 700;
}

/* Día no disponible */
.agenda-dia-no-disponible {
    background: #ffffff !important;
    color: #b7b7b7 !important;
    cursor: not-allowed !important;
}

    .agenda-dia-no-disponible a,
    .agenda-dia-no-disponible a:hover,
    .agenda-dia-no-disponible a:focus {
        color: #b7b7b7 !important;
        cursor: not-allowed !important;
    }

/* Día disponible: texto azul y marca azul arriba del número */
.agenda-dia-disponible {
    color: #4b5fc7 !important;
    font-weight: 700;
    cursor: pointer;
}

    .agenda-dia-disponible a,
    .agenda-dia-disponible a:hover,
    .agenda-dia-disponible a:focus {
        color: #4b5fc7 !important;
    }

    .agenda-dia-disponible::before {
        content: "";
        position: absolute;
        top: 6px;
        left: 50%;
        z-index: 1;
        width: 14px;
        height: 14px;
        background: #4b5fc7;
        transform: translateX(-50%);
        pointer-events: none;
    }

.agenda-calendario td.agenda-dia-disponible:hover,
.agenda-calendario td.agenda-dia-disponible:focus-within {
    background: #b9eaf4 !important;
    border-radius: 5px;
    color: #4b5fc7 !important;
}

    .agenda-calendario td.agenda-dia-disponible:hover a,
    .agenda-calendario td.agenda-dia-disponible:focus-within a {
        color: #4b5fc7 !important;
    }

/* Día seleccionado: fondo celeste */
.agenda-calendario-selected,
.agenda-dia-seleccionado {
    background: #2fb8dc !important;
    border-radius: 5px;
    color: #4b5fc7 !important;
    font-weight: 700;
}

    .agenda-calendario-selected a,
    .agenda-dia-seleccionado a,
    .agenda-calendario-selected a:hover,
    .agenda-dia-seleccionado a:hover,
    .agenda-calendario-selected a:focus,
    .agenda-dia-seleccionado a:focus {
        color: #4b5fc7 !important;
    }

    .agenda-dia-seleccionado.agenda-dia-no-disponible::before {
        display: none;
    }

@media (max-width: 600px) {
    .agenda-calendario {
        width: 320px;
        font-size: 15px;
    }

    .agenda-calendario-titulo {
        font-size: 19px;
    }

    .agenda-calendario-day-header {
        height: 42px;
        font-size: 0;
        line-height: 42px;
    }

        .agenda-calendario-day-header::after {
            font-size: 15px;
            line-height: 42px;
        }

    .agenda-calendario-day,
    .agenda-calendario td.agenda-dia-disponible,
    .agenda-calendario td.agenda-dia-no-disponible,
    .agenda-calendario td.agenda-dia-seleccionado {
        height: 43px !important;
        min-height: 43px;
        padding: 22px 0 5px 0 !important;
        font-size: 15px;
        line-height: 16px !important;
    }

        .agenda-calendario-day a,
        .agenda-calendario td.agenda-dia-disponible a,
        .agenda-calendario td.agenda-dia-no-disponible a,
        .agenda-calendario td.agenda-dia-seleccionado a {
            height: 16px;
            min-height: 16px;
            padding: 0 !important;
            line-height: 16px;
        }

    .agenda-dia-disponible::before {
        top: 5px;
        width: 13px;
        height: 13px;
    }
}


.agenda-sin-horas {
    color: #777;
    font-size: 15px;
    margin-top: 12px;
    display: block;
}

.agenda-acciones {
    grid-column: 1 / 4;
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.agenda-btn-secundario,
.agenda-btn-primario {
    min-width: 110px;
    height: 38px;
    border: 1px solid #3f57c4;
    font-size: 15px;
    cursor: pointer;
}

.agenda-btn-secundario {
    background: #fff;
    color: #3f57c4;
}

.agenda-btn-primario {
    background: #3f57c4;
    color: #fff;
}

@media (max-width: 900px) {
    .agenda-horas-card {
        grid-template-columns: 1fr;
        row-gap: 25px;
        padding: 22px;
    }

    .agenda-acciones {
        grid-column: 1;
    }
}


/* =========================================================
   PANEL HORAS DISPONIBLES - RESPONSIVE MÓVIL
   Imagen a la izquierda; título, fecha, sede y horas a la derecha;
   calendario inmediatamente debajo del bloque principal.
   ========================================================= */
@media (max-width: 600px) {
    .agenda-horas-wrapper {
        width: 100%;
        overflow-x: hidden;
    }

    .agenda-horas-card.agenda-horas-card-item {
        display: grid !important;
        grid-template-columns: 112px minmax(0, 1fr) !important;
        grid-auto-rows: auto;
        column-gap: 14px !important;
        row-gap: 16px !important;
        align-items: start !important;
        justify-content: stretch !important;
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        min-height: 0 !important;
        margin: 0 auto !important;
        padding: 18px 14px 20px 14px !important;
        box-sizing: border-box !important;
        overflow: hidden;
    }

    .agenda-horas-card-item .agenda-item-info-dinamico {
        grid-column: 1;
        grid-row: 1;
        width: 112px !important;
        min-width: 0 !important;
        max-width: 112px !important;
        text-align: center !important;
    }

    .agenda-horas-card-item .agenda-item-img {
        width: 96px !important;
        max-width: 96px !important;
        height: 128px !important;
        margin: 0 auto 8px auto !important;
        border-radius: 9px !important;
        object-fit: cover;
    }

    .agenda-horas-card-item .agenda-item-nombre {
        margin-top: 6px !important;
        color: #4b5fc7;
        font-size: 15px !important;
        font-weight: 500;
        line-height: 1.25;
        text-align: center;
    }

    .agenda-horas-card-item .agenda-item-especialidades {
        max-height: 42px;
        overflow: hidden;
        margin-top: 8px !important;
        color: #4b5fc7;
        font-size: 10px !important;
        line-height: 1.25;
        text-align: center;
    }

    .agenda-horas-card-item .agenda-item-info-medico {
        max-height: 24px;
        overflow: hidden;
        margin-top: 5px !important;
        font-size: 10px !important;
        line-height: 1.2;
        text-align: center;
    }

    .agenda-horas-card-item .agenda-item-horas-dinamico {
        grid-column: 2;
        grid-row: 1;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding-top: 4px !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    .agenda-horas-card-item .agenda-proxima-hora-titulo {
        display: block !important;
        width: 100% !important;
        max-width: 190px;
        margin: 0 auto 14px auto !important;
        color: #2a2a2a;
        font-size: 17px !important;
        font-weight: 700 !important;
        line-height: 1.22 !important;
        text-align: center !important;
        white-space: normal;
        text-transform: uppercase;
    }

    .agenda-horas-card-item .agenda-fecha-principal {
        display: block !important;
        width: 100% !important;
        max-width: 170px;
        margin: 0 auto 18px auto !important;
        color: #4b5fc7;
        font-size: 20px !important;
        font-weight: 400 !important;
        line-height: 1.38 !important;
        text-align: center !important;
        white-space: normal;
        word-break: normal;
        overflow-wrap: normal;
    }

    .agenda-horas-card-item .agenda-lista-horas-grupo {
        width: 100%;
        margin: 0 auto 0 auto !important;
        gap: 10px !important;
        align-items: center !important;
        box-sizing: border-box;
    }

    .agenda-horas-card-item .agenda-lista-horas-grupo-titulo {
        width: 100% !important;
        max-width: 170px;
        margin: 0 auto 8px auto !important;
        color: #2a2a2a;
        font-size: 16px !important;
        line-height: 1.35;
        text-align: center !important;
        text-transform: uppercase;
    }

    .agenda-horas-card-item .agenda-lista-horas-grupo-botones {
        width: 100% !important;
        justify-content: center !important;
        gap: 6px !important;
        flex-wrap: wrap !important;
    }

    .agenda-horas-card-item .agenda-btn-hora {
        min-width: 64px !important;
        height: 30px !important;
        margin-left: 0 !important;
        padding: 0 9px !important;
        border-radius: 8px;
        font-size: 13px !important;
    }

    .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin-top: 4px !important;
        text-align: center !important;
    }

    .agenda-horas-card-item .agenda-calendario-titulo {
        margin: 0 0 12px 0 !important;
        font-size: 18px !important;
        font-weight: 700;
        line-height: 1.2;
        text-align: center;
    }

    .agenda-horas-card-item .agenda-calendario {
        width: min(320px, 100%) !important;
        margin: 0 auto !important;
    }

    .agenda-horas-card-item + .agenda-acciones,
    .agenda-horas-card-item .agenda-acciones,
    .agenda-acciones {
        grid-column: 1 / -1 !important;
        width: 100%;
        margin-top: 8px !important;
        box-sizing: border-box;
    }
}

@media (max-width: 390px) {
    .agenda-horas-card.agenda-horas-card-item {
        grid-template-columns: 90px minmax(0, 1fr) !important;
        column-gap: 10px !important;
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        padding: 16px 10px !important;
    }

    .agenda-horas-card-item .agenda-item-info-dinamico {
        width: 90px !important;
        max-width: 90px !important;
    }

    .agenda-horas-card-item .agenda-item-img {
        width: 80px !important;
        max-width: 80px !important;
        height: 106px !important;
    }

    .agenda-horas-card-item .agenda-proxima-hora-titulo {
        font-size: 16px !important;
    }

    .agenda-horas-card-item .agenda-fecha-principal {
        font-size: 16px !important;
    }

    .agenda-horas-card-item .agenda-btn-hora {
        min-width: 62px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 768px) {
    .agenda-horas-wrapper:has(.agenda-sin-horas-card) {
        overflow: visible !important;
        padding-bottom: 14px !important;
    }
}

@media (max-width: 768px) {
    .agenda-proceso-titulo,
    .agenda-rut-titulo {
        margin-bottom: 34px;
    }

        .agenda-proceso-titulo h1,
        .agenda-rut-titulo h1 {
            font-size: 32px;
        }

        .agenda-proceso-titulo p,
        .agenda-rut-titulo p {
            font-size: 21px;
        }

    .agenda-rut-card {
        max-width: 100%;
        min-height: auto;
        padding: 56px 24px 36px 24px;
        border-radius: 18px;
    }

    .agenda-rut-contenido h2 {
        font-size: 25px;
    }

    .agenda-rut-control {
        font-size: 22px;
    }

    .agenda-rut-btn-continuar {
        font-size: 24px;
    }
}

/* =========================================================
   PANEL CONFIRMACIÓN RESERVA
   ========================================================= */
.agenda-confirmacion-card {
    max-width: 980px;
    padding: 42px 48px;
    text-align: left;
}

.agenda-confirmacion-header {
    margin-bottom: 28px;
    text-align: left;
}

    .agenda-confirmacion-header h2 {
        margin: 0 0 8px 0;
        color: #001b3f;
        font-size: 28px;
        font-weight: 700;
    }

    .agenda-confirmacion-header p {
        margin: 0;
        color: #13233D;
        font-size: 15px;
    }

.agenda-confirmacion-grid {
    display: flex;
    gap: 28px;
    width: 100%;
    margin-bottom: 26px;
}

.agenda-confirmacion-col {
    flex: 1 1 0;
    min-width: 0;
}

.agenda-confirmacion-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 34px;
    padding: 9px 0;
    border-bottom: 1px solid #e8eaf5;
    box-sizing: border-box;
}

.agenda-confirmacion-label {
    width: 42%;
    min-width: 135px;
    color: #26304f;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.agenda-confirmacion-value {
    flex: 1 1 auto;
    min-width: 0;
    color: #4b5fc7;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
}

.agenda-confirmacion-info-wrapper {
    width: 100%;
    margin: 20px 0 0 0;
}

.agenda-confirmacion-info-desplegable {
    width: 100%;
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
}

.agenda-confirmacion-info-bar {
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 0 18px;
    background: #4b5fc7;
    border-radius: 8px 8px 0 0;
    box-sizing: border-box;
}

.agenda-confirmacion-info-desplegable:not([open]) .agenda-confirmacion-info-bar {
    border-radius: 8px;
}

.agenda-confirmacion-info-link,
.agenda-confirmacion-info-link:hover,
.agenda-confirmacion-info-link:focus {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.agenda-confirmacion-info-icon {
    color: #ffffff;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
}

.agenda-confirmacion-info-body {
    width: 100%;
    padding: 18px 20px 8px 20px;
    background: #ffffff;
    box-sizing: border-box;
}

.agenda-confirmacion-recordatorio {
    display: block;
    margin: 0 0 12px 0;
    color: #333333;
    font-size: 15px;
    line-height: 1.45;
}

.agenda-confirmacion-acciones {
    width: 100%;
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 14px;
}

    .agenda-confirmacion-acciones .agenda-btn-secundario,
    .agenda-confirmacion-acciones .agenda-btn-primario {
        width: auto;
        min-width: 180px;
    }

@media (max-width: 768px) {
    .agenda-confirmacion-card {
        padding: 30px 22px;
    }

    .agenda-confirmacion-grid {
        display: block;
    }

    .agenda-confirmacion-row {
        display: block;
    }

    .agenda-confirmacion-label {
        display: block;
        width: 100%;
        min-width: 0;
        margin-bottom: 4px;
    }

    .agenda-confirmacion-value {
        display: block;
    }

    .agenda-confirmacion-acciones {
        display: block;
    }

        .agenda-confirmacion-acciones .agenda-btn-secundario,
        .agenda-confirmacion-acciones .agenda-btn-primario {
            width: 100%;
            margin-bottom: 12px;
        }
}


/* =========================================================
   PANEL CONSULTA RESERVA
   ========================================================= */
.agenda-consulta-reserva-wrapper {
    width: min(1320px, 100%);
    max-width: 1320px;
    text-align: left;
}

    .agenda-consulta-reserva-wrapper .agenda-confirmacion-header {
        margin-bottom: 24px;
    }

        .agenda-consulta-reserva-wrapper .agenda-confirmacion-header h2 {
            font-size: 20px;
        }

        .agenda-consulta-reserva-wrapper .agenda-confirmacion-header p {
            font-size: 15px;
        }

.agenda-consulta-reserva-card {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-sizing: border-box;
}

    .agenda-consulta-reserva-card + .agenda-consulta-reserva-card {
        margin-top: 28px;
        padding-top: 26px;
        border-top: 1px solid #e8eaf5;
    }

.agenda-consulta-reserva-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 26px 52px;
    width: 100%;
}

.agenda-consulta-reserva-col {
    min-width: 0;
}

.agenda-consulta-reserva-row {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 40px;
    margin-bottom: 14px;
    padding: 6px 10px;
    border: 1px solid #dfe3f1;
    border-radius: 10px;
    background: #ffffff;
    box-sizing: border-box;
    overflow: hidden;
}

.agenda-consulta-reserva-label {
    flex: 0 0 auto;
    margin-right: 6px;
    color: #1f1f1f;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.25;
    white-space: nowrap;
}

.agenda-consulta-reserva-value {
    flex: 1 1 auto;
    min-width: 0;
    color: #4b5fc7;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.25;
    word-break: break-word;
}

.agenda-consulta-reserva-acciones {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    width: 100%;
    margin-top: 42px;
    padding: 0 18px;
    box-sizing: border-box;
}

.agenda-consulta-reserva-btn {
    width: min(360px, 100%);
    min-height: 52px;
    padding: 10px 24px;
    border: 1px solid #4b5fc7;
    border-radius: 0 10px 10px 10px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    box-sizing: border-box;
    transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.agenda-consulta-reserva-btn-secundario {
    background: #ffffff;
    color: #4b5fc7;
}

.agenda-consulta-reserva-btn-primario {
    background: #4b5fc7;
    color: #ffffff;
    box-shadow: 0 4px 0 #2e3f9a;
}

.agenda-consulta-reserva-btn-secundario:hover,
.agenda-consulta-reserva-btn-secundario:focus {
    background: #f4f6ff;
    color: #4054bd;
    border-color: #4054bd;
}

.agenda-consulta-reserva-btn-primario:hover,
.agenda-consulta-reserva-btn-primario:focus {
    background: #4054bd;
    border-color: #4054bd;
    color: #ffffff;
}


.agenda-consulta-reserva-wrapper > .agenda-confirmacion-acciones {
    display: none;
}

    .agenda-consulta-reserva-wrapper > .agenda-confirmacion-acciones .agenda-btn-secundario {
        width: min(360px, 100%);
        min-height: 52px;
        padding: 10px 24px;
        border: 1px solid #4b5fc7;
        border-radius: 0 10px 10px 10px;
        background: #ffffff;
        color: #4b5fc7;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.2;
        cursor: pointer;
        box-sizing: border-box;
        transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
    }

        .agenda-consulta-reserva-wrapper > .agenda-confirmacion-acciones .agenda-btn-secundario:hover,
        .agenda-consulta-reserva-wrapper > .agenda-confirmacion-acciones .agenda-btn-secundario:focus {
            background: #f4f6ff;
            color: #4054bd;
            border-color: #4054bd;
        }

.agenda-consulta-reserva-mensaje-ok {
    width: min(720px, 100%);
    margin: 0 auto 24px auto;
    padding: 16px 22px;
    border: 1px solid #aad8ad;
    border-radius: 10px;
    background: #e5f6df;
    color: #247a34;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    box-sizing: border-box;
}

    .agenda-consulta-reserva-mensaje-ok span {
        display: block;
    }



.agenda-consulta-reserva-empty {
    width: min(520px, 100%);
    margin: 30px auto 0 auto;
    padding: 28px 30px;
    border: 1px solid #bfe4bd;
    border-radius: 16px;
    background: #f2fbef;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    text-align: center;
}

.agenda-consulta-reserva-empty-titulo {
    display: block;
    margin: 0 0 10px 0;
    color: #087a22;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.agenda-consulta-reserva-empty-texto {
    display: block;
    max-width: 420px;
    margin: 0 auto;
    color: #13233D;
    font-size: 15px;
    line-height: 1.45;
}

.agenda-consulta-reserva-empty-btn {
    display: inline-block;
    width: min(260px, 100%);
    margin-top: 20px;
}

.agenda-consulta-reserva-modal-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10020;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
}

.agenda-consulta-reserva-modal {
    width: min(700px, calc(100vw - 48px));
    min-height: 0;
    padding: 34px 38px 38px 38px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    box-sizing: border-box;
    text-align: center;
}

    .agenda-consulta-reserva-modal h2 {
        margin: 0 0 22px 0;
        color: #333333;
        font-size: 30px;
        font-weight: 700;
        line-height: 1.2;
    }

.agenda-consulta-reserva-modal-texto {
    display: block;
    max-width: 560px;
    margin: 0 auto 24px auto;
    color: #13233D;
    font-size: 17px;
    line-height: 1.45;
}

.agenda-consulta-reserva-modal-error {
    display: block;
    max-width: 760px;
    margin: 0 auto 22px auto;
    padding: 12px 16px;
    border: 1px solid #f0b9b9;
    border-radius: 8px;
    background: #fff2f2;
    color: #b00020;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.agenda-consulta-reserva-modal-acciones {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    width: 100%;
    margin-top: 18px;
}

.agenda-consulta-reserva-modal-btn {
    flex: 1 1 0;
    min-height: 46px;
    padding: 10px 24px;
    border: 1px solid #4b5fc7;
    border-radius: 0 10px 10px 10px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-sizing: border-box;
    transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.agenda-consulta-reserva-modal-btn-secundario {
    background: #ffffff;
    color: #4b5fc7;
}

.agenda-consulta-reserva-modal-btn-primario {
    background: #4b5fc7;
    color: #ffffff;
    box-shadow: 0 4px 0 #2e3f9a;
}

.agenda-consulta-reserva-modal-btn-secundario:hover,
.agenda-consulta-reserva-modal-btn-secundario:focus {
    background: #f4f6ff;
    color: #4054bd;
    border-color: #4054bd;
}

.agenda-consulta-reserva-modal-btn-primario:hover,
.agenda-consulta-reserva-modal-btn-primario:focus {
    background: #4054bd;
    border-color: #4054bd;
    color: #ffffff;
}

@media (max-width: 900px) {
    .agenda-consulta-reserva-wrapper {
        width: 100%;
        max-width: 100%;
    }

    .agenda-consulta-reserva-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .agenda-consulta-reserva-acciones {
        flex-direction: column;
        gap: 16px;
        padding: 0;
    }

    .agenda-consulta-reserva-btn {
        width: 100%;
        box-shadow: none !important;
    }

    .agenda-consulta-reserva-wrapper > .agenda-confirmacion-acciones {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 16px;
    }

        .agenda-consulta-reserva-wrapper > .agenda-confirmacion-acciones .agenda-btn-secundario {
            width: 100%;
        }

    .agenda-consulta-reserva-empty-btn {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .agenda-consulta-reserva-empty {
        width: 100%;
        margin-top: 24px;
        padding: 24px 18px;
    }

    .agenda-consulta-reserva-empty-titulo {
        font-size: 17px;
    }

    .agenda-consulta-reserva-empty-texto {
        font-size: 14px;
    }

    .agenda-consulta-reserva-row {
        display: block;
        min-height: 0;
        padding: 9px 12px;
    }

    .agenda-consulta-reserva-label {
        display: inline;
        margin-right: 4px;
        font-size: 15px;
        white-space: normal;
    }

    .agenda-consulta-reserva-value {
        display: inline;
        font-size: 15px;
    }

    .agenda-consulta-reserva-modal {
        min-height: 0;
        padding: 32px 20px 34px 20px;
    }

        .agenda-consulta-reserva-modal h2 {
            font-size: 30px;
        }

    .agenda-consulta-reserva-modal-texto {
        font-size: 17px;
    }

    .agenda-consulta-reserva-modal-acciones {
        flex-direction: column;
        gap: 14px;
    }

    .agenda-consulta-reserva-modal-btn {
        width: 100%;
        font-size: 16px;
        box-shadow: none !important;
    }
}


/* =========================================================
   PANEL SELECTOR AGENDA
   ========================================================= */
.agenda-selector-card {
    width: min(760px, 92vw);
    margin: 0 auto;
    padding: 56px 48px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0px 3px 6px #00000029;
    text-align: center;
}

    .agenda-selector-card h2 {
        margin: 0 0 36px 0;
        font-size: 28px;
        color: #001b44;
    }

    .agenda-selector-card p {
        margin: 0 0 22px 0;
        font-size: 28px;
        color: #4c61c7;
    }

.agenda-selector-btn {
    display: block;
    width: min(460px, 100%);
    margin: 18px auto 0 auto;
    padding: 10px 16px;
    color: #fff;
    background: #4d61c6;
    border: 1px solid rgba(255, 255, 255, .7);
    box-shadow: 3px 4px 0 #283b91;
    font-size: 28px;
    line-height: 1.25;
    text-decoration: none;
}

    .agenda-selector-btn span,
    .agenda-selector-btn small {
        display: block;
        color: #fff;
    }

    .agenda-selector-btn small {
        margin-top: 6px;
        font-size: 26px;
    }

    .agenda-selector-btn:hover,
    .agenda-selector-btn:focus {
        color: #fff;
        text-decoration: none;
        filter: brightness(.98);
    }

@media (max-width: 768px) {
    .agenda-selector-card {
        padding: 36px 24px;
    }

        .agenda-selector-card h2,
        .agenda-selector-card p,
        .agenda-selector-btn {
            font-size: 22px;
            box-shadow: none !important;
        }

            .agenda-selector-btn small {
                font-size: 20px;
            }
}

/* =========================================================
   PANEL RESERVA CONFIRMADA FINAL
   ========================================================= */
.agenda-reserva-final-card {
    width: min(1540px, 100%);
    margin: 0 auto;
    padding: 34px 34px 26px 34px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.16);
    box-sizing: border-box;
    color: #222222;
    text-align: left;
}

    .agenda-reserva-final-card h2 {
        margin: 0 0 14px 0;
        color: #2a2a2a;
        font-size: 32px;
        font-weight: 700;
        line-height: 1.25;
    }

.agenda-reserva-final-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px;
    width: 100%;
    margin-top: 12px;
}

.agenda-reserva-final-col {
    min-width: 0;
}

.agenda-reserva-final-seccion-titulo {
    width: 100%;
    min-height: 38px;
    margin-bottom: 14px;
    padding: 8px 16px;
    border-radius: 4px;
    background: #4b5fc7;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    box-sizing: border-box;
}

.agenda-reserva-final-row {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 38px;
    margin-bottom: 14px;
    padding: 7px 16px;
    border: 1px solid #dfe3f1;
    border-radius: 4px;
    background: #ffffff;
    box-sizing: border-box;
}

.agenda-reserva-final-label {
    flex: 0 0 auto;
    margin-right: 6px;
    color: #1f1f1f;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.25;
    white-space: nowrap;
}

.agenda-reserva-final-value {
    flex: 1 1 auto;
    min-width: 0;
    color: #4b5fc7;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.25;
    word-break: break-word;
}

.agenda-reserva-final-recordatorio {
    margin: 18px 0 0 0;
    padding: 14px 18px;
    border: 1px solid #dfe3f1;
    border-radius: 6px;
    background: #f7f8ff;
    color: #333333;
    font-size: 15px;
    line-height: 1.45;
}

.agenda-reserva-final-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    width: 100%;
    margin-top: 18px;
}

.agenda-reserva-final-mensaje {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    color: #4b5fc7;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.65;
}

.agenda-reserva-final-footer .agenda-btn-secundario {
    flex: 0 0 auto;
    min-width: 264px;
    height: 42px;
    font-size: 17px;
}

.agenda-reserva-final-mapa {
    width: 100%;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #d9d9d9;
    box-sizing: border-box;
}

.agenda-reserva-final-mapa-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
    gap: 24px;
    align-items: center;
    width: 100%;
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid #dfe3f1;
    border-radius: 10px;
    background: #ffffff;
    box-sizing: border-box;
}

    .agenda-reserva-final-mapa-card h3 {
        margin: 0 0 12px 0;
        color: #001b3f;
        font-size: 22px;
        font-weight: 700;
    }

    .agenda-reserva-final-mapa-card p {
        margin: 0 0 10px 0;
        color: #333333;
        font-size: 16px;
        line-height: 1.45;
    }

    .agenda-reserva-final-mapa-card img {
        display: block;
        width: 100%;
        max-height: 360px;
        object-fit: contain;
        border-radius: 8px;
    }

.agenda-reserva-final-banner {
    width: calc(100% + 68px);
    margin: 28px -34px -26px -34px;
    padding-top: 16px;
    border-top: 1px solid #d9d9d9;
    overflow: hidden;
    box-sizing: border-box;
    text-align: left;
}

    .agenda-reserva-final-banner a {
        display: block;
        text-decoration: none;
    }

    .agenda-reserva-final-banner img {
        display: block;
        width: min(1350px, 100%);
        max-width: 100%;
        max-height: 260px;
        object-fit: cover;
        object-position: left center;
        border-radius: 16px 16px 0 0;
    }

@media (max-width: 1100px) {
    .agenda-reserva-final-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .agenda-reserva-final-mapa-card {
        grid-template-columns: 1fr;
    }

        .agenda-reserva-final-mapa-card img {
            max-height: none;
        }
}

@media (max-width: 768px) {
    .agenda-reserva-final-card {
        padding: 28px 18px 22px 18px;
    }

        .agenda-reserva-final-card h2 {
            font-size: 27px;
        }

    .agenda-reserva-final-seccion-titulo {
        font-size: 17px;
    }

    .agenda-reserva-final-row {
        display: block;
        padding: 9px 14px;
    }

    .agenda-reserva-final-label {
        display: block;
        margin: 0 0 4px 0;
        font-size: 16px;
        white-space: normal;
    }

    .agenda-reserva-final-value {
        display: block;
        font-size: 16px;
    }

    .agenda-reserva-final-footer {
        display: block;
    }

        .agenda-reserva-final-footer .agenda-btn-secundario {
            width: 100%;
            min-width: 0;
            margin-top: 14px;
        }

    .agenda-reserva-final-mapa-card {
        padding: 18px;
    }

    .agenda-reserva-final-banner {
        width: calc(100% + 36px);
        margin: 24px -18px -22px -18px;
    }

        .agenda-reserva-final-banner img {
            width: 100%;
            max-height: none;
            border-radius: 12px 12px 0 0;
        }
}



/* =========================================================
   PANEL DISPONIBILIDAD - FILTROS, PROFESIONALES Y PREVISIONES
   ========================================================= */
.agenda-disponibilidad-filtros {
    width: 100%;
    max-width: 720px;
    margin: 0 auto 34px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.agenda-disponibilidad-filtro-btn {
    min-width: 150px;
    height: 30px;
    padding: 0 18px;
    border: 1px solid #4b5fc7;
    background: #ffffff;
    color: #666666;
    font-size: 14px;
    font-weight: 500;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    box-shadow: none;
}

    .agenda-disponibilidad-filtro-btn:hover,
    .agenda-disponibilidad-filtro-btn.activo {
        background: #4b5fc7;
        color: #ffffff;
        box-shadow: 0 3px 8px rgba(55, 73, 173, .28);
    }

.agenda-disponibilidad-aviso {
    width: min(1150px, 92vw);
    margin: 0 auto 24px auto;
    padding: 18px 24px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 7px rgba(0, 0, 0, .12);
    color: #17243f;
    font-size: 20px;
    line-height: 1.35;
    text-align: center;
    box-sizing: border-box;
}

.agenda-profesionales-grid {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: clamp(24px, 2.5vw, 36px) clamp(20px, 2.75vw, 42px);
    box-sizing: border-box;
}

.agenda-profesional-card {
    width: 100%;
    min-width: 0;
    min-height: 320px;
    padding: 14px 18px 16px 18px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .16);
    text-align: center;
    box-sizing: border-box;
}

.agenda-profesional-img {
    width: 100%;
    height: 250px;
    max-height: 250px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    margin: 0 auto 12px auto;
    object-fit: cover;
    object-position: 40% 0%;
}

.agenda-profesional-nombre {
    display: block;
    min-height: 24px;
    margin: 0 0 8px 0;
    color: #4b5fc7;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.25;
}

.agenda-profesional-especialidades,
.agenda-item-especialidades {
    display: block;
    color: #337ab7;
    font-size: 13px;
    line-height: 1.35;
    text-transform: uppercase;
    white-space: pre-line;
}

.agenda-profesional-info,
.agenda-item-info-medico {
    display: block;
    max-height: 76px;
    overflow: hidden;
    color: #5a5a5a;
    font-size: 12px;
    line-height: 1.35;
}

.agenda-profesional-btn {
    width: 100%;
    min-height: 34px;
    margin-top: 12px;
    border: 1px solid #4b5fc7;
    background: #ffffff;
    color: #666666;
    font-size: 15px;
    cursor: pointer;
}

    .agenda-profesional-btn:hover {
        background: #4b5fc7;
        color: #ffffff;
    }

.agenda-previsiones-grid {
    width: min(890px, 92vw);
    margin: 0 auto;
    padding: 22px 44px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .16);
    display: grid;
    grid-template-columns: repeat(3, minmax(190px, 1fr));
    gap: 50px 44px;
    box-sizing: border-box;
}

.agenda-prevision-card {
    min-height: 128px;
    padding: 12px;
    border: 1px solid #d9ddf4;
    border-radius: 8px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-sizing: border-box;
}

    .agenda-prevision-card:hover,
    .agenda-prevision-card.activo {
        border-color: #4b5fc7;
        box-shadow: 0 2px 8px rgba(75, 95, 199, .2);
        text-decoration: none;
    }

.agenda-prevision-img {
    max-width: 92%;
    max-height: 86px;
    object-fit: contain;
}

.agenda-prevision-nombre {
    color: #4b5fc7;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

@media (max-width: 900px) {
    .agenda-previsiones-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
        padding: 22px;
        gap: 24px;
    }
}

@media (max-width: 600px) {
    .agenda-disponibilidad-filtros {
        gap: 12px;
        margin-bottom: 24px;
    }

    .agenda-disponibilidad-filtro-btn {
        width: 100%;
        min-width: 0;
    }

    .agenda-disponibilidad-aviso {
        font-size: 16px;
        padding: 14px 16px;
    }

    .agenda-profesionales-grid,
    .agenda-previsiones-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .agenda-profesional-img {
        height: 220px;
    }
}

/* ESTILOS MOVIDOS DESDE Default.aspx - RESERVA FINAL */
.agenda-reserva-final-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 32px 34px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 18px;
}

    .agenda-reserva-final-card h2 {
        margin: 0 0 14px 0;
        font-size: 30px;
        font-weight: 700;
        color: #222222;
    }

.agenda-reserva-final-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 38px;
    margin-top: 12px;
}

.agenda-reserva-final-seccion-titulo {
    background: #4d5fc0;
    color: #ffffff;
    border-radius: 5px;
    font-weight: 700;
    text-align: center;
    padding: 8px 12px;
    margin-bottom: 14px;
}

.agenda-reserva-final-row {
    border: 1px solid #d9deee;
    border-radius: 4px;
    padding: 8px 16px;
    margin-bottom: 14px;
    font-size: 18px;
    min-height: 38px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.agenda-reserva-final-label {
    color: #1f1f1f;
    font-weight: 500;
}

.agenda-reserva-final-value {
    color: #4d5fc0;
}

.agenda-reserva-final-footer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
    margin-top: 8px;
}

.agenda-reserva-final-mensaje,
.agenda-reserva-final-recordatorio {
    color: #4d5fc0;
    font-weight: 700;
    line-height: 1.6;
}

.agenda-reserva-final-mapa {
    margin-top: 18px;
    border-top: 1px solid #d9deee;
    padding-top: 18px;
}

.agenda-reserva-final-mapa-card {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr);
    gap: 22px;
    align-items: start;
}

    .agenda-reserva-final-mapa-card img {
        width: 100%;
        border-radius: 8px;
        border: 1px solid #d9deee;
    }

.agenda-reserva-final-banner {
    margin-top: 14px;
    border-top: 1px solid #d9deee;
    padding-top: 14px;
}

    .agenda-reserva-final-banner img {
        max-width: 100%;
        width: 100%;
        border-radius: 0 15px 15px 15px;
    }

@media (max-width: 992px) {
    .agenda-reserva-final-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .agenda-reserva-final-footer,
    .agenda-reserva-final-mapa-card {
        grid-template-columns: 1fr;
    }

    .agenda-reserva-final-card {
        padding: 22px 18px;
    }
}


/* =========================================================
   AJUSTE FINAL - CALENDARIO SOLO MES VISIBLE
   Requiere que DayRender agregue la clase agenda-dia-otro-mes.
   Oculta solo la fila completa que pertenece 100% al mes anterior/siguiente.
   ========================================================= */
.agenda-calendario tr:has(> td.agenda-dia-otro-mes:nth-child(1)):has(> td.agenda-dia-otro-mes:nth-child(2)):has(> td.agenda-dia-otro-mes:nth-child(3)):has(> td.agenda-dia-otro-mes:nth-child(4)):has(> td.agenda-dia-otro-mes:nth-child(5)):has(> td.agenda-dia-otro-mes:nth-child(6)):has(> td.agenda-dia-otro-mes:nth-child(7)) {
    display: none !important;
}

.agenda-calendario td.agenda-dia-otro-mes.agenda-dia-no-disponible::before {
    display: none !important;
}

/* =========================================================
   PANEL HORAS DISPONIBLES - MOBILE SEPARADO
   Solo aplica en dispositivos móviles/tablet chica.
   Escritorio mantiene la estructura original del CodeBehind.
   Distribución:
   [ FOTO / PROFESIONAL ] [ TÍTULO / FECHA / SEDE ]
   [ SELECTOR DE HORAS                                  ]
   [ CALENDARIO                                         ]
   ========================================================= */
@media (max-width: 768px) {
    .agenda-horas-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .agenda-horas-card.agenda-horas-card-item {
        display: grid !important;
        grid-template-columns: minmax(96px, 124px) minmax(0, 1fr) !important;
        grid-template-areas:
            "info titulo"
            "info fecha"
            "info sede"
            "botones botones"
            "calendario calendario"
            "acciones acciones" !important;
        column-gap: 14px !important;
        row-gap: 12px !important;
        align-items: start !important;
        justify-content: stretch !important;
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        min-width: 0 !important;
        min-height: 0 !important;
        margin: 0 auto !important;
        padding: 18px 14px 20px 14px !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .agenda-horas-card-item .agenda-item-info-dinamico {
        grid-area: info !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 124px !important;
        justify-self: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    .agenda-horas-card-item .agenda-item-img {
        display: block !important;
        width: 96px !important;
        max-width: 96px !important;
        height: 128px !important;
        margin: 0 auto 8px auto !important;
        border-radius: 9px !important;
        object-fit: cover !important;
    }

    .agenda-horas-card-item .agenda-item-nombre {
        display: block !important;
        width: 100% !important;
        margin: 6px auto 0 auto !important;
        color: #4b5fc7 !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        line-height: 1.2 !important;
        text-align: center !important;
        overflow-wrap: break-word !important;
    }

    .agenda-horas-card-item .agenda-item-especialidades {
        display: block !important;
        width: 100% !important;
        max-height: 42px !important;
        overflow: hidden !important;
        margin: 8px auto 0 auto !important;
        color: #4b5fc7 !important;
        font-size: 10px !important;
        line-height: 1.25 !important;
        text-align: center !important;
        text-transform: uppercase !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
    }

    .agenda-horas-card-item .agenda-item-info-medico {
        display: block !important;
        max-height: 24px !important;
        overflow: hidden !important;
        margin-top: 5px !important;
        color: #4d4d4d !important;
        font-size: 10px !important;
        line-height: 1.2 !important;
        text-align: center !important;
    }

    .agenda-horas-card-item .agenda-item-horas-dinamico,
    .agenda-horas-card-item .agenda-lista-horas-grupo {
        display: contents !important;
    }

    .agenda-horas-card-item .agenda-proxima-hora-titulo {
        grid-area: titulo !important;
        align-self: end !important;
        justify-self: center !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        color: #2a2a2a !important;
        font-size: clamp(17px, 5vw, 22px) !important;
        font-weight: 700 !important;
        line-height: 1.18 !important;
        letter-spacing: .03em !important;
        text-align: center !important;
        text-transform: uppercase !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
    }

    .agenda-horas-card-item .agenda-fecha-principal {
        grid-area: fecha !important;
        align-self: center !important;
        justify-self: center !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        color: #4b5fc7 !important;
        font-size: clamp(18px, 5.4vw, 24px) !important;
        font-weight: 400 !important;
        line-height: 1.25 !important;
        text-align: center !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
    }

    .agenda-horas-card-item .agenda-lista-horas-grupo-titulo,
    .agenda-horas-card-item .agenda-servicio {
        grid-area: sede !important;
        align-self: start !important;
        justify-self: center !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        color: #2a2a2a !important;
        font-size: clamp(14px, 4.2vw, 18px) !important;
        font-weight: 500 !important;
        line-height: 1.25 !important;
        text-align: center !important;
        text-transform: uppercase !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
    }

    .agenda-horas-card-item .agenda-lista-horas-grupo-botones,
    .agenda-horas-card-item .agenda-lista-horas {
        grid-area: botones !important;
        justify-self: center !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 6px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 8px auto 0 auto !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .agenda-horas-card-item .agenda-btn-hora {
        flex: 0 0 auto !important;
        min-width: 64px !important;
        height: 32px !important;
        margin: 0 !important;
        padding: 0 9px !important;
        border-radius: 8px !important;
        font-size: 13px !important;
        line-height: 1 !important;
        box-sizing: border-box !important;
    }

    .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        grid-area: calendario !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        justify-self: center !important;
        margin: 8px auto 0 auto !important;
        padding: 0 !important;
        text-align: center !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }

    .agenda-horas-card-item .agenda-calendario-titulo {
        display: block !important;
        width: 100% !important;
        margin: 0 auto 12px auto !important;
        color: #001b3f !important;
        font-size: clamp(18px, 5vw, 23px) !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        letter-spacing: .04em !important;
        text-align: center !important;
        text-transform: uppercase !important;
        white-space: normal !important;
    }

    .agenda-horas-card-item .agenda-calendario {
        width: min(340px, 100%) !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        table-layout: fixed !important;
        box-sizing: border-box !important;
    }

        .agenda-horas-card-item .agenda-calendario table {
            width: 100% !important;
            table-layout: fixed !important;
        }

    .agenda-horas-card-item + .agenda-acciones,
    .agenda-horas-card-item .agenda-acciones,
    .agenda-acciones {
        grid-area: acciones !important;
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: 100% !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 390px) {
    .agenda-horas-card.agenda-horas-card-item {
        grid-template-columns: 90px minmax(0, 1fr) !important;
        column-gap: 10px !important;
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        padding: 16px 10px 18px 10px !important;
    }

    .agenda-horas-card-item .agenda-item-info-dinamico {
        max-width: 90px !important;
    }

    .agenda-horas-card-item .agenda-item-img {
        width: 80px !important;
        max-width: 80px !important;
        height: 106px !important;
    }

    .agenda-horas-card-item .agenda-item-nombre {
        font-size: 13px !important;
    }

    .agenda-horas-card-item .agenda-proxima-hora-titulo {
        font-size: 16px !important;
    }

    .agenda-horas-card-item .agenda-fecha-principal {
        font-size: 16px !important;
    }

    .agenda-horas-card-item .agenda-lista-horas-grupo-titulo,
    .agenda-horas-card-item .agenda-servicio {
        font-size: 13px !important;
    }

    .agenda-horas-card-item .agenda-btn-hora {
        min-width: 62px !important;
        height: 31px !important;
        font-size: 13px !important;
    }

    .agenda-horas-card-item .agenda-calendario {
        width: min(318px, 100%) !important;
    }
}

/* =========================================================
   PANEL DESPLEGABLES / CONTENIDO INFORMATIVO
   Movido desde Default.aspx para centralizar estilos.
   ========================================================= */
.agenda-desplegables-wrapper {
    width: min(90%, 980px);
    margin: 22px auto 0 auto;
}

.agenda-desplegable {
    margin-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;
}

.agenda-desplegable-titulo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 8px 18px;
    background: #4c5fc7;
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    list-style: none;
    box-sizing: border-box;
}

    .agenda-desplegable-titulo::-webkit-details-marker {
        display: none;
    }

.agenda-desplegable-icono {
    position: relative;
    display: inline-flex;
    flex: 0 0 16px;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: inherit;
    font-size: 0;
    line-height: 0;
    transform: rotate(0deg);
    transform-origin: 50% 50%;
    transition: transform .18s ease;
    box-sizing: border-box;
}

    .agenda-desplegable-icono::before {
        content: "";
        display: block;
        width: 0;
        height: 0;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 8px solid currentColor;
    }

.agenda-desplegable[open] .agenda-desplegable-icono {
    transform: rotate(180deg);
}

.agenda-desplegable-contenido {
    padding: 14px 22px 18px 22px;
    background: #fff;
    color: #13233D;
    font-size: 18px;
    line-height: 1.45;
    box-sizing: border-box;
}

    .agenda-desplegable-contenido p {
        margin: 0 0 12px 0;
    }

        .agenda-desplegable-contenido p:last-child {
            margin-bottom: 0;
        }

    .agenda-desplegable-contenido ul {
        margin: 0;
        padding-left: 24px;
    }

@media (max-width: 768px) {
    .agenda-desplegables-wrapper {
        width: 92%;
    }

    .agenda-desplegable-titulo {
        font-size: 18px;
        padding: 8px 14px;
    }

    .agenda-desplegable-contenido {
        font-size: 16px;
        padding: 12px 16px 15px 16px;
    }
}


/* =========================================================
   PANEL DATOS PACIENTE
   Crear / actualizar paciente desde AgendaOnline
   ========================================================= */
.agenda-datos-paciente-card {
    width: min(1510px, 100%);
    margin: 0 auto;
    padding: 28px 54px 42px 54px;
    background: #ffffff;
    border-radius: 0;
    box-shadow: none;
    box-sizing: border-box;
    text-align: left;
}

.agenda-datos-paciente-titulo {
    margin: 0 0 28px 0;
    color: #333333;
    font-size: 42px;
    font-weight: 400;
    line-height: 1.2;
}

.agenda-datos-paciente-descripcion {
    display: none;
}

.agenda-datos-paciente-mensaje {
    width: min(936px, 100%);
    margin: 0 0 18px 0;
    padding: 12px 16px;
    border: 1px solid #f0c7c7;
    border-radius: 8px;
    background: #fff6f6;
    color: #b00020;
    font-size: 15px;
    line-height: 1.35;
    box-sizing: border-box;
}

.agenda-datos-paciente-documento-grid {
    display: grid;
    grid-template-columns: 452px 452px;
    gap: 28px;
    width: min(936px, 100%);
    margin-bottom: 36px;
}

.agenda-datos-paciente-seccion {
    display: block;
    margin: 0 0 14px 0;
    color: #3f57c4;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.agenda-datos-paciente-grid {
    display: grid;
    grid-template-columns: 452px 452px;
    gap: 24px 32px;
    width: min(936px, 100%);
}

.agenda-datos-paciente-control {
    width: 100%;
    height: 66px;
    padding: 0 30px;
    border: 1px solid #777777;
    border-radius: 10px;
    background: #ffffff;
    color: #333333;
    font-size: 18px;
    font-weight: 600;
    line-height: 66px;
    box-sizing: border-box;
}

    .agenda-datos-paciente-control:focus {
        outline: none;
        border-color: #4b5fc7;
        box-shadow: 0 0 0 2px rgba(75, 95, 199, .12);
    }

.agenda-datos-paciente-input::placeholder {
    color: #777777;
    opacity: 1;
    font-weight: 600;
}

.agenda-datos-paciente-select {
    cursor: pointer;
}

.agenda-datos-paciente-acciones {
    width: 100%;
    margin-top: 26px;
    display: flex;
    justify-content: flex-end;
}

.agenda-datos-paciente-btn-guardar {
    width: 382px;
    height: 43px;
    border: 1px solid #3547a8;
    background: #4b5fc7;
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .4px;
    cursor: pointer;
    text-transform: uppercase;
}

    .agenda-datos-paciente-btn-guardar:hover {
        background: #4054bd;
    }

@media (max-width: 1050px) {
    .agenda-datos-paciente-card {
        padding: 28px 24px 38px 24px;
    }

    .agenda-datos-paciente-documento-grid,
    .agenda-datos-paciente-grid {
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .agenda-datos-paciente-card {
        padding: 24px 18px 34px 18px;
    }

    .agenda-datos-paciente-titulo {
        font-size: 32px;
    }

    .agenda-datos-paciente-documento-grid,
    .agenda-datos-paciente-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .agenda-datos-paciente-control {
        height: 56px;
        padding: 0 20px;
        font-size: 17px;
        line-height: 56px;
    }

    .agenda-datos-paciente-acciones {
        justify-content: stretch;
    }

    .agenda-datos-paciente-btn-guardar {
        width: 100%;
        font-size: 18px;
    }
}

/* =========================================================
   MASTER PAGE / LAYOUT GENERAL
   Movido desde Oftamedica5.Master para centralizar estilos.
   ========================================================= */
html,
body {
    width: 100%;
    min-width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    background: #F5F6FD;
    overflow-x: hidden;
}

body {
    font-family: var(--agenda-font-family);
}

.agenda-master-form {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.agenda-master-layout {
    width: 100%;
    min-height: 100vh;
    display: flex;
    background: #F5F6FD;
}

.agenda-master-sidebar {
    width: var(--agenda-sidebar-width-desktop);
    flex: 0 0 var(--agenda-sidebar-width-desktop);
    min-height: 100vh;
    background: #4B5DC1;
    color: #ffffff;
    overflow-y: auto;
    box-sizing: border-box;
    scrollbar-width: none;
}

    .agenda-master-sidebar::-webkit-scrollbar {
        display: none;
    }

.agenda-master-logo {
    min-height: 205px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 45px 0 0 0;
    box-sizing: border-box;
}

    .agenda-master-logo img {
        width: 316px;
        max-width: 100%;
        height: auto;
        display: block;
    }

.agenda-master-menu {
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.agenda-master-nav-link {
    min-height: 72px;
    width: 100%;
    padding: 0 16px 0 46px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-sizing: border-box;
    color: #ffffff;
    text-decoration: none;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.25;
    background: transparent;
    border: 0;
    transition: background-color .15s ease, color .15s ease;
}

    .agenda-master-nav-link:hover,
    .agenda-master-nav-link:focus {
        color: #ffffff;
        text-decoration: none;
        background: rgba(255, 255, 255, .10);
    }

    .agenda-master-nav-link.activo {
        color: #4B5DC1;
        background: #ffffff;
    }

        .agenda-master-nav-link.activo:hover,
        .agenda-master-nav-link.activo:focus {
            color: #4B5DC1;
            background: #ffffff;
        }

    .agenda-master-nav-link.volver {
        min-height: 88px;
        margin-bottom: 18px;
    }

.agenda-master-icon {
    width: 32px;
    min-width: 32px;
    text-align: center;
    font-size: 34px;
    line-height: 1;
    font-weight: 700;
}

.agenda-master-icon-home {
    font-size: 38px;
}

.agenda-master-actions {
    width: 100%;
    padding: 34px 16px 32px 16px;
    box-sizing: border-box;
}

.agenda-master-action-btn {
    width: 100%;
    min-height: 55px;
    margin-bottom: 12px;
    border: 1px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    font-size: 19px;
    font-weight: 500;
    background: transparent;
    box-sizing: border-box;
    transition: background-color .15s ease, color .15s ease;
}

    .agenda-master-action-btn:hover,
    .agenda-master-action-btn:focus {
        color: #4B5DC1;
        background: #ffffff;
        text-decoration: none;
    }

.agenda-master-main {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 100vh;
    background-color: #F5F6FD;
    background-image: url('<%= ResolveUrl("~/Content/Images/BackGroundLogin.png") %>');
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: 55% auto;
    overflow-y: auto;
    box-sizing: border-box;
    scrollbar-width: none;
}

    .agenda-master-main::-webkit-scrollbar {
        display: none;
    }

.agenda-master-content {
    width: 100%;
    min-height: 100vh;
    box-sizing: border-box;
    padding: 68px 48px 48px 48px;
}

    /*
            El fondo general pertenece al MasterPage.
            Los paneles internos solo deben controlar su card/contenido.
        */
    .agenda-master-content .agenda-proceso-wrapper {
        min-height: auto !important;
        background: transparent !important;
        padding: 0 !important;
    }

    .agenda-master-content .agenda-rut-wrapper,
    .agenda-master-content .agenda-horas-wrapper {
        background: transparent !important;
    }

@media (max-width: 900px) {
    .agenda-master-layout {
        display: block;
    }

    .agenda-master-sidebar {
        width: 100%;
        min-height: auto;
        flex: none;
    }

    .agenda-master-logo {
        min-height: auto;
        padding: 18px 16px 12px 16px;
    }

        .agenda-master-logo img {
            width: 260px;
        }

    .agenda-master-menu {
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
    }

        .agenda-master-menu::-webkit-scrollbar {
            display: none;
        }

    .agenda-master-nav-link {
        width: auto;
        min-width: 230px;
        min-height: 58px;
        padding: 0 18px;
        font-size: 17px;
        white-space: nowrap;
    }

        .agenda-master-nav-link.volver {
            margin-bottom: 0;
        }

    .agenda-master-icon {
        font-size: 28px;
    }

    .agenda-master-actions {
        display: flex;
        gap: 12px;
        padding: 12px 16px 16px 16px;
    }

    .agenda-master-action-btn {
        min-height: 44px;
        margin-bottom: 0;
        font-size: 16px;
    }

    .agenda-master-main {
        min-height: calc(100vh - 220px);
        background-size: 100% auto;
    }

    .agenda-master-content {
        min-height: calc(100vh - 220px);
        padding: 42px 16px 36px 16px;
    }
}

@media (max-width: 520px) {
    .agenda-master-actions {
        display: block;
    }

    .agenda-master-action-btn {
        margin-bottom: 10px;
    }

    .agenda-master-nav-link {
        min-width: 205px;
        font-size: 16px;
    }
}


/* =========================================================
   PANEL HORAS DISPONIBLES - MULTI SEDE / UBICACIÓN
   Las horas se agrupan por GrupoTexto desde CnAgendaOnline.
   ========================================================= */
.agenda-lista-items-disponibilidad {
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 100%;
    align-items: center;
}

.agenda-horas-card-item .agenda-lista-horas-grupo-titulo {
    color: #4b5fc7;
    font-weight: 500;
    text-transform: none;
}

.agenda-horas-card-item .agenda-lista-horas-grupo-icono {
    display: inline-block;
    flex: 0 0 auto;
    color: #4b5fc7;
    font-size: 18px;
    line-height: 1;
}

.agenda-horas-card-item .agenda-lista-horas-grupo-texto {
    display: inline-block;
    min-width: 0;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    text-align: inherit;
}

.agenda-horas-card-item .agenda-lista-horas-grupo + .agenda-lista-horas-grupo {
    margin-top: 14px;
}

@media (max-width: 768px) {
    .agenda-horas-card-item .agenda-lista-horas-grupo-titulo {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .agenda-horas-card-item .agenda-lista-horas-grupo-icono {
        font-size: 15px;
    }
}


/* =========================================================
   AJUSTE CALENDARIO - CELDA COMPLETA CLICKEABLE
   El Calendar de WebForms genera el link solo sobre el número.
   Se expande el <a> a toda la celda disponible/seleccionada
   para que funcione el click en el bloque completo del día.
   ========================================================= */
.agenda-calendario td.agenda-dia-disponible,
.agenda-calendario td.agenda-dia-seleccionado {
    cursor: pointer;
}

    .agenda-calendario td.agenda-dia-disponible a,
    .agenda-calendario td.agenda-dia-disponible a:hover,
    .agenda-calendario td.agenda-dia-disponible a:focus,
    .agenda-calendario td.agenda-dia-seleccionado a,
    .agenda-calendario td.agenda-dia-seleccionado a:hover,
    .agenda-calendario td.agenda-dia-seleccionado a:focus {
        position: absolute !important;
        inset: 0 !important;
        z-index: 3 !important;
        display: flex !important;
        align-items: flex-end !important;
        justify-content: center !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 100% !important;
        padding: 0 0 5px 0 !important;
        color: inherit !important;
        font-size: inherit !important;
        font-weight: inherit !important;
        line-height: 17px !important;
        text-align: center !important;
        text-decoration: none !important;
        box-sizing: border-box !important;
    }

    .agenda-calendario td.agenda-dia-disponible::before {
        z-index: 2;
    }

@media (max-width: 600px) {
    .agenda-calendario td.agenda-dia-disponible a,
    .agenda-calendario td.agenda-dia-disponible a:hover,
    .agenda-calendario td.agenda-dia-disponible a:focus,
    .agenda-calendario td.agenda-dia-seleccionado a,
    .agenda-calendario td.agenda-dia-seleccionado a:hover,
    .agenda-calendario td.agenda-dia-seleccionado a:focus {
        padding: 0 0 5px 0 !important;
        line-height: 16px !important;
    }
}


/* =========================================================
   PANEL VALIDACIÓN CONTACTO
   Actualización correo / teléfono antes de confirmación.
   Estilo equivalente al flujo AgendaDefault, centralizado aquí.
   ========================================================= */
.agenda-validacion-contacto-card {
    width: min(1200px, 94vw);
    min-height: 390px;
    margin: 0 auto;
    padding: 118px 98px 50px 98px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .16);
    box-sizing: border-box;
    text-align: center;
}

.agenda-validacion-contacto-titulo,
.agenda-validacion-contacto-descripcion {
    display: none;
}

.agenda-validacion-contacto-contenido {
    width: min(958px, 100%);
    margin: 0 auto;
}

.agenda-validacion-contacto-mensaje {
    width: min(958px, 100%);
    margin: 0 auto 14px auto;
    padding: 10px 14px;
    border: 1px solid #f0c7c7;
    border-radius: 8px;
    background: #fff6f6;
    color: #b00020;
    font-size: 15px;
    line-height: 1.35;
    text-align: left;
    box-sizing: border-box;
}

.agenda-validacion-contacto-seccion {
    display: block;
    width: 100%;
    margin: 0 0 24px 0;
    color: #3f57c4;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

.agenda-validacion-contacto-grid {
    display: block;
    width: 100%;
}

.agenda-validacion-contacto-campo {
    position: relative;
    width: 100%;
    margin: 0 0 10px 0;
}

.agenda-validacion-contacto-icono {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 2;
    width: 20px;
    height: 20px;
    object-fit: contain;
    transform: translateY(-50%);
    pointer-events: none;
}

.agenda-validacion-contacto-control {
    width: 100%;
    height: 49px;
    padding: 0 48px;
    border: 1px solid #777777;
    border-radius: 7px;
    background: #ffffff;
    color: #111111;
    font-size: 18px;
    font-weight: 700;
    line-height: 49px;
    text-align: center;
    box-sizing: border-box;
}

    .agenda-validacion-contacto-control:focus {
        outline: none;
        border-color: #4b5fc7;
        box-shadow: 0 0 0 2px rgba(75, 95, 199, .12);
    }

.agenda-validacion-contacto-input::placeholder {
    color: #777777;
    opacity: 1;
    font-weight: 600;
}

.agenda-validacion-contacto-acciones {
    width: 100%;
    margin-top: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.agenda-validacion-contacto-btn-volver,
.agenda-validacion-contacto-btn-guardar {
    height: 47px;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: .2px;
    cursor: pointer;
    box-sizing: border-box;
}

.agenda-validacion-contacto-btn-volver {
    width: 260px;
    border: 1px solid #4b5fc7;
    background: #ffffff;
    color: #4b5fc7;
}

    .agenda-validacion-contacto-btn-volver:hover {
        background: #f4f6ff;
    }

.agenda-validacion-contacto-btn-guardar {
    flex: 1 1 auto;
    min-width: 360px;
    border: 1px solid #3547a8;
    background: #4b5fc7;
    color: #ffffff;
    text-transform: uppercase;
}

    .agenda-validacion-contacto-btn-guardar:hover {
        background: #4054bd;
    }

@media (max-width: 1050px) {
    .agenda-validacion-contacto-card {
        padding: 82px 46px 42px 46px;
    }
}

@media (max-width: 768px) {
    .agenda-validacion-contacto-card {
        width: min(100%, 94vw);
        min-height: 0;
        padding: 42px 20px 34px 20px;
    }

    .agenda-validacion-contacto-seccion {
        margin-bottom: 18px;
        font-size: 19px;
    }

    .agenda-validacion-contacto-control {
        height: 46px;
        padding: 0 42px;
        font-size: 16px;
        line-height: 46px;
    }

    .agenda-validacion-contacto-icono {
        left: 14px;
        width: 18px;
        height: 18px;
    }

    .agenda-validacion-contacto-acciones {
        display: block;
    }

    .agenda-validacion-contacto-btn-volver,
    .agenda-validacion-contacto-btn-guardar {
        width: 100%;
        min-width: 0;
        height: 45px;
        font-size: 19px;
    }

    .agenda-validacion-contacto-btn-volver {
        margin-bottom: 10px;
    }
}


/* =========================================================
   MODAL INFORMACIÓN MÉDICO - AGENDA ONLINE
   ========================================================= */

.agenda-info-medico-link {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    font: inherit;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: pre-line;
}

    .agenda-info-medico-link:hover,
    .agenda-info-medico-link:focus {
        text-decoration-thickness: 2px;
        outline: none;
    }

.agenda-info-medico-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
}

.agenda-info-medico-modal {
    width: min(1080px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    padding: 26px 34px 30px 34px;
    box-sizing: border-box;
}

.agenda-info-medico-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0 48px 24px 48px;
    text-align: center;
}

    .agenda-info-medico-header h2 {
        margin: 0;
        color: #4b5fc7;
        font-size: 28px;
        font-weight: 700;
        line-height: 1.25;
    }

.agenda-info-medico-cerrar-icono {
    position: absolute;
    top: -8px;
    right: -6px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #4b5fc7;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.agenda-info-medico-contenido {
    display: flex;
    gap: 44px;
    align-items: flex-start;
}

.agenda-info-medico-foto-wrapper {
    flex: 0 0 292px;
    text-align: center;
}

.agenda-info-medico-foto {
    width: 292px;
    max-width: 100%;
    height: 388px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.agenda-info-medico-detalle {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
    text-align: center;
}

.agenda-info-medico-descripcion {
    display: block;
    margin: 0 0 28px 0;
    color: #4b5fc7;
    font-size: 18px;
    line-height: 1.55;
    text-align: left;
    white-space: pre-line;
}

.agenda-info-medico-subtitulo {
    margin: 0 0 12px 0;
    color: #111111;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

.agenda-info-medico-especialidades {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 36px;
    margin-bottom: 26px;
}

.agenda-info-medico-especialidad {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    min-height: 24px;
    padding: 4px 16px;
    border-radius: 5px;
    background: #727272;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-transform: uppercase;
}

.agenda-info-medico-convenios {
    margin-top: 8px;
    text-align: center;
}

.agenda-info-medico-convenios-texto {
    display: block;
    color: #202020;
    font-size: 18px;
    line-height: 1.45;
}

.agenda-info-medico-acciones {
    display: flex;
    justify-content: center;
    margin-top: 34px;
}

.agenda-info-medico-btn-volver {
    width: min(380px, 100%);
    min-height: 42px;
    padding: 0 14px;
    background: #4B5DC1 0% 0% no-repeat padding-box;
    color: #ffffff;
    border-radius: 0px 10px 10px 10px;
    border-width: 2px;
    border-style: outset;
    border-color: #4B5DC1;
    box-shadow: none;
    opacity: 1;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    appearance: auto;
    -webkit-appearance: button;
    cursor: pointer;
}

@media (max-width: 900px) {
    .agenda-info-medico-overlay {
        align-items: flex-start;
        padding: 16px;
    }

    .agenda-info-medico-modal {
        max-height: calc(100vh - 32px);
        padding: 22px 18px 24px 18px;
    }

    .agenda-info-medico-header {
        padding: 0 38px 18px 38px;
    }

        .agenda-info-medico-header h2 {
            font-size: 24px;
        }

    .agenda-info-medico-contenido {
        flex-direction: column;
        gap: 22px;
        align-items: center;
    }

    .agenda-info-medico-foto-wrapper {
        flex-basis: auto;
        width: 100%;
    }

    .agenda-info-medico-foto {
        width: min(260px, 100%);
        height: auto;
        max-height: 340px;
    }

    .agenda-info-medico-detalle {
        width: 100%;
    }

    .agenda-info-medico-descripcion {
        font-size: 16px;
        text-align: center;
    }

    .agenda-info-medico-especialidades {
        gap: 8px;
    }

    .agenda-info-medico-especialidad {
        min-width: 130px;
        font-size: 11px;
    }

    .agenda-info-medico-convenios-texto {
        font-size: 16px;
    }
}



/* =========================================================
   AJUSTE DISTRIBUCIÓN MODAL MÉDICO Y DISPONIBILIDAD MÓVIL
   ========================================================= */

@media (min-width: 901px) {
    .agenda-info-medico-modal {
        width: min(1120px, 100%) !important;
        padding: 34px 42px 32px 42px !important;
    }

    .agenda-info-medico-header {
        padding: 6px 54px 28px 54px !important;
    }

        .agenda-info-medico-header h2 {
            line-height: 1.22 !important;
        }

    .agenda-info-medico-cerrar-icono {
        top: -2px !important;
        right: -2px !important;
    }

    .agenda-info-medico-contenido {
        gap: 50px !important;
        align-items: flex-start !important;
    }

    .agenda-info-medico-detalle {
        padding-top: 8px !important;
    }

    .agenda-info-medico-acciones {
        justify-content: flex-end !important;
        margin-top: 32px !important;
        padding-right: 28px !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 600px) {
    .agenda-horas-card.agenda-horas-card-item {
        display: grid !important;
        grid-template-columns: 116px minmax(0, 1fr) !important;
        grid-auto-rows: auto !important;
        column-gap: 14px !important;
        row-gap: 12px !important;
        width: min(360px, calc(100vw - 18px)) !important;
        max-width: min(360px, calc(100vw - 18px)) !important;
        margin: 0 auto !important;
        padding: 16px 14px 20px 14px !important;
        border-radius: 10px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .agenda-horas-card-item .agenda-item-info-dinamico {
        grid-column: 1 !important;
        grid-row: 1 / span 2 !important;
        width: 116px !important;
        min-width: 0 !important;
        max-width: 116px !important;
        align-self: start !important;
        text-align: center !important;
    }

    .agenda-horas-card-item .agenda-item-img {
        width: 94px !important;
        max-width: 94px !important;
        height: 112px !important;
        margin: 0 auto 8px auto !important;
        border-radius: 8px !important;
        object-fit: cover !important;
    }

    .agenda-horas-card-item .agenda-item-nombre {
        display: block !important;
        margin-top: 0 !important;
        color: #4b5fc7 !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        line-height: 1.18 !important;
        text-align: center !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
    }

    .agenda-horas-card-item .agenda-item-especialidades,
    .agenda-horas-card-item .agenda-info-medico-link {
        display: none !important;
    }

    .agenda-horas-card-item .agenda-item-horas-dinamico {
        display: contents !important;
    }

    .agenda-horas-card-item .agenda-proxima-hora-titulo {
        grid-column: 2 !important;
        grid-row: 1 !important;
        align-self: end !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 10px auto 8px auto !important;
        padding: 0 0 10px 0 !important;
        border-bottom: 1px solid #ececec !important;
        color: #2a2a2a !important;
        font-size: 17px !important;
        font-weight: 700 !important;
        line-height: 1.18 !important;
        letter-spacing: .03em !important;
        text-align: center !important;
        text-transform: uppercase !important;
        white-space: normal !important;
    }

    .agenda-horas-card-item .agenda-fecha-principal {
        grid-column: 2 !important;
        grid-row: 2 !important;
        align-self: start !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 8px auto 0 auto !important;
        color: #4b5fc7 !important;
        font-size: 18px !important;
        font-weight: 400 !important;
        line-height: 1.25 !important;
        text-align: center !important;
        white-space: normal !important;
    }

    .agenda-horas-card-item .agenda-lista-horas-grupo {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 4px auto 8px auto !important;
        gap: 8px !important;
        align-items: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

        .agenda-horas-card-item .agenda-lista-horas-grupo:first-of-type {
            margin-top: 12px !important;
        }

    .agenda-horas-card-item .agenda-lista-horas-grupo-titulo {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto 2px auto !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 6px !important;
        color: #4b5fc7 !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        line-height: 1.25 !important;
        text-align: center !important;
        text-transform: none !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        box-sizing: border-box !important;
    }

    .agenda-horas-card-item .agenda-lista-horas-grupo-icono {
        flex: 0 0 auto !important;
        color: #4b5fc7 !important;
        font-size: 15px !important;
        line-height: 1 !important;
    }

    .agenda-horas-card-item .agenda-lista-horas-grupo-texto {
        min-width: 0 !important;
        color: #4b5fc7 !important;
        font-size: 15px !important;
        line-height: 1.25 !important;
        text-align: center !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    .agenda-horas-card-item .agenda-lista-horas-grupo-botones {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 7px !important;
    }

    .agenda-horas-card-item .agenda-btn-hora {
        min-width: 66px !important;
        height: 31px !important;
        margin-left: 0 !important;
        padding: 0 10px !important;
        border-radius: 7px !important;
        font-size: 14px !important;
        line-height: 1 !important;
        box-sizing: border-box !important;
    }

    .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin-top: 16px !important;
        padding-top: 10px !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    .agenda-horas-card-item .agenda-calendario-titulo {
        margin: 0 0 12px 0 !important;
        color: #13233D !important;
        font-size: 18px !important;
        font-weight: 500 !important;
        line-height: 1.2 !important;
        letter-spacing: .06em !important;
        text-align: center !important;
    }

    .agenda-horas-card-item .agenda-calendario {
        width: min(320px, 100%) !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }

    .agenda-info-medico-overlay {
        padding: 10px !important;
        align-items: flex-start !important;
    }

    .agenda-info-medico-modal {
        width: 100% !important;
        max-height: calc(100vh - 20px) !important;
        padding: 24px 18px 24px 18px !important;
        border-radius: 12px !important;
    }

    .agenda-info-medico-header {
        padding: 12px 38px 18px 38px !important;
    }

    .agenda-info-medico-cerrar-icono {
        top: 0 !important;
        right: 0 !important;
    }

    .agenda-info-medico-contenido {
        gap: 18px !important;
    }

    .agenda-info-medico-foto {
        width: min(240px, 100%) !important;
        height: auto !important;
        max-height: 300px !important;
    }

    .agenda-info-medico-descripcion {
        font-size: 15px !important;
        line-height: 1.45 !important;
        text-align: center !important;
    }

    .agenda-info-medico-acciones {
        justify-content: center !important;
        margin-top: 24px !important;
        padding-right: 0 !important;
    }

    .agenda-info-medico-btn-volver {
        width: min(320px, 100%) !important;
    }
}

@media (max-width: 390px) {
    .agenda-horas-card.agenda-horas-card-item {
        grid-template-columns: 104px minmax(0, 1fr) !important;
        width: min(344px, calc(100vw - 14px)) !important;
        max-width: min(344px, calc(100vw - 14px)) !important;
        padding: 15px 12px 18px 12px !important;
        column-gap: 10px !important;
    }

    .agenda-horas-card-item .agenda-item-info-dinamico {
        width: 104px !important;
        max-width: 104px !important;
    }

    .agenda-horas-card-item .agenda-item-img {
        width: 84px !important;
        max-width: 84px !important;
        height: 104px !important;
    }

    .agenda-horas-card-item .agenda-proxima-hora-titulo {
        font-size: 16px !important;
        margin-top: 8px !important;
    }

    .agenda-horas-card-item .agenda-fecha-principal {
        font-size: 16px !important;
    }

    .agenda-horas-card-item .agenda-lista-horas-grupo-texto,
    .agenda-horas-card-item .agenda-lista-horas-grupo-titulo {
        font-size: 14px !important;
    }

    .agenda-horas-card-item .agenda-btn-hora {
        min-width: 62px !important;
        height: 30px !important;
        font-size: 13px !important;
    }
}


/* =========================================================
   CORRECCIÓN MOBILE - GRUPOS DE UBICACIÓN/HORAS SIN MONTAJE
   Debe quedar al final del CSS para sobrescribir el bloque mobile previo.
   ========================================================= */
@media (max-width: 768px) {
    .agenda-horas-card.agenda-horas-card-item {
        display: grid !important;
        grid-template-columns: 112px minmax(0, 1fr) !important;
        grid-template-areas: none !important;
        grid-auto-flow: row !important;
        grid-auto-rows: auto !important;
        column-gap: 14px !important;
        row-gap: 12px !important;
        align-items: start !important;
        width: min(360px, calc(100vw - 10px)) !important;
        max-width: min(360px, calc(100vw - 10px)) !important;
        margin: 0 auto !important;
        padding: 16px 14px 20px 14px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .agenda-horas-card-item .agenda-item-info-dinamico {
        grid-area: auto !important;
        grid-column: 1 !important;
        grid-row: 1 / span 2 !important;
        width: 112px !important;
        min-width: 0 !important;
        max-width: 112px !important;
        justify-self: center !important;
        align-self: start !important;
        text-align: center !important;
    }

    .agenda-horas-card-item .agenda-item-img {
        width: 88px !important;
        max-width: 88px !important;
        height: 112px !important;
        margin: 0 auto 8px auto !important;
        border-radius: 8px !important;
        object-fit: cover !important;
    }

    .agenda-horas-card-item .agenda-item-nombre {
        width: 100% !important;
        margin: 0 auto !important;
        color: #4b5fc7 !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        line-height: 1.15 !important;
        text-align: center !important;
        overflow-wrap: break-word !important;
    }

    .agenda-horas-card-item .agenda-item-especialidades,
    .agenda-horas-card-item .agenda-info-medico-link,
    .agenda-horas-card-item .agenda-item-info-medico {
        display: none !important;
    }

    .agenda-horas-card-item .agenda-item-horas-dinamico {
        display: contents !important;
        min-width: 0 !important;
    }

    .agenda-horas-card-item .agenda-proxima-hora-titulo {
        grid-area: auto !important;
        grid-column: 2 !important;
        grid-row: 1 !important;
        align-self: end !important;
        justify-self: stretch !important;
        width: 100% !important;
        margin: 10px 0 10px 0 !important;
        padding: 0 0 12px 0 !important;
        border-bottom: 1px solid #eeeeee !important;
        color: #2a2a2a !important;
        font-size: 17px !important;
        font-weight: 700 !important;
        line-height: 1.15 !important;
        letter-spacing: .03em !important;
        text-align: center !important;
        text-transform: uppercase !important;
        white-space: normal !important;
    }

    .agenda-horas-card-item .agenda-fecha-principal {
        grid-area: auto !important;
        grid-column: 2 !important;
        grid-row: 2 !important;
        align-self: start !important;
        justify-self: stretch !important;
        width: 100% !important;
        margin: 8px 0 0 0 !important;
        color: #4b5fc7 !important;
        font-size: 18px !important;
        font-weight: 400 !important;
        line-height: 1.25 !important;
        text-align: center !important;
        white-space: normal !important;
    }

    .agenda-horas-card-item .agenda-lista-horas-grupo {
        grid-area: auto !important;
        grid-column: 1 / -1 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 4px auto 8px auto !important;
        gap: 8px !important;
        text-align: center !important;
        box-sizing: border-box !important;
        clear: both !important;
    }

        .agenda-horas-card-item .agenda-lista-horas-grupo:first-of-type {
            margin-top: 10px !important;
        }

    .agenda-horas-card-item .agenda-lista-horas-grupo-titulo,
    .agenda-horas-card-item .agenda-servicio {
        grid-area: auto !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 auto !important;
        color: #4b5fc7 !important;
        font-size: 16px !important;
        font-weight: 500 !important;
        line-height: 1.25 !important;
        text-align: center !important;
        text-transform: none !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        box-sizing: border-box !important;
    }

    .agenda-horas-card-item .agenda-lista-horas-grupo-icono {
        flex: 0 0 auto !important;
        color: #4b5fc7 !important;
        font-size: 16px !important;
        line-height: 1 !important;
    }

    .agenda-horas-card-item .agenda-lista-horas-grupo-texto {
        display: inline !important;
        min-width: 0 !important;
        color: #4b5fc7 !important;
        font-size: 16px !important;
        line-height: 1.25 !important;
        text-align: center !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    .agenda-horas-card-item .agenda-lista-horas-grupo-botones,
    .agenda-horas-card-item .agenda-lista-horas {
        grid-area: auto !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 7px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .agenda-horas-card-item .agenda-btn-hora {
        flex: 0 0 auto !important;
        min-width: 66px !important;
        height: 31px !important;
        margin: 0 !important;
        padding: 0 10px !important;
        border-radius: 7px !important;
        font-size: 14px !important;
        line-height: 1 !important;
        box-sizing: border-box !important;
    }

    .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        grid-area: auto !important;
        grid-column: 1 / -1 !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 16px auto 0 auto !important;
        padding: 10px 0 0 0 !important;
        text-align: center !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }

    .agenda-horas-card-item .agenda-calendario-titulo {
        margin: 0 auto 12px auto !important;
        color: #13233D !important;
        font-size: 18px !important;
        font-weight: 500 !important;
        line-height: 1.2 !important;
        letter-spacing: .06em !important;
        text-align: center !important;
        text-transform: uppercase !important;
    }

    .agenda-horas-card-item .agenda-calendario {
        width: min(320px, 100%) !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        table-layout: fixed !important;
    }
}

@media (max-width: 390px) {
    .agenda-horas-card.agenda-horas-card-item {
        grid-template-columns: 102px minmax(0, 1fr) !important;
        width: min(350px, calc(100vw - 8px)) !important;
        max-width: min(350px, calc(100vw - 8px)) !important;
        padding: 15px 10px 18px 10px !important;
        column-gap: 10px !important;
    }

    .agenda-horas-card-item .agenda-item-info-dinamico {
        width: 102px !important;
        max-width: 102px !important;
    }

    .agenda-horas-card-item .agenda-item-img {
        width: 82px !important;
        max-width: 82px !important;
        height: 104px !important;
    }

    .agenda-horas-card-item .agenda-proxima-hora-titulo {
        font-size: 16px !important;
    }

    .agenda-horas-card-item .agenda-fecha-principal {
        font-size: 16px !important;
    }

    .agenda-horas-card-item .agenda-lista-horas-grupo-titulo,
    .agenda-horas-card-item .agenda-lista-horas-grupo-texto {
        font-size: 15px !important;
    }

    .agenda-horas-card-item .agenda-btn-hora {
        min-width: 62px !important;
        height: 30px !important;
        font-size: 13px !important;
    }
}


/* =========================================================
   CONFIRMACIÓN - INFORMACIÓN IMPORTANTE
   Hace clickeable toda la barra y mantiene el toggle entre postbacks.
   ========================================================= */
.agenda-confirmacion-info-bar {
    position: relative;
}

.agenda-confirmacion-info-link,
.agenda-confirmacion-info-link:hover,
.agenda-confirmacion-info-link:focus {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 0 52px 0 18px;
    box-sizing: border-box;
}

.agenda-confirmacion-info-icon {
    position: relative;
    z-index: 1;
    margin-left: auto;
    pointer-events: none;
}
/* =========================================================
   MASTER PAGE - MENÚ LATERAL MOBILE SIN POSTBACK
   Convierte el sidebar horizontal mobile en drawer desplegable.
   Usa checkbox + label para abrir/cerrar solo con CSS.
   ========================================================= */
.agenda-master-menu-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.agenda-master-mobile-open,
.agenda-master-mobile-overlay,
.agenda-master-mobile-close {
    display: none;
}

@media (max-width: 900px) {
    .agenda-master-form {
        position: relative;
    }

    .agenda-master-layout {
        display: block !important;
        min-height: 100vh !important;
    }

    .agenda-master-mobile-open {
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 1305;
        width: 46px;
        height: 46px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        border: 1px solid rgba(0, 27, 63, .08);
        border-radius: 10px;
        background: #ffffff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, .10);
        cursor: pointer;
        box-sizing: border-box;
        transition: opacity .18s ease, transform .18s ease, box-shadow .18s ease;
    }

        .agenda-master-mobile-open:hover,
        .agenda-master-mobile-open:focus {
            box-shadow: 0 4px 16px rgba(0, 0, 0, .14);
            transform: translateY(-1px);
        }

        .agenda-master-mobile-open span {
            width: 18px;
            height: 2px;
            display: block;
            border-radius: 2px;
            background: #222222;
        }

    .agenda-master-menu-toggle:checked ~ .agenda-master-mobile-open {
        opacity: 0;
        pointer-events: none;
        transform: translateX(-10px);
    }

    .agenda-master-mobile-overlay {
        position: fixed;
        inset: 0;
        z-index: 1290;
        display: block;
        background: rgba(0, 0, 0, .45);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .22s ease, visibility .22s ease;
        cursor: pointer;
    }

    .agenda-master-menu-toggle:checked ~ .agenda-master-mobile-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .agenda-master-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        z-index: 1300 !important;
        width: min(306px, 84vw) !important;
        max-width: 306px !important;
        min-height: 100vh !important;
        height: 100vh !important;
        display: flex !important;
        flex-direction: column !important;
        flex: none !important;
        background: #ffffff !important;
        color: #333333 !important;
        box-shadow: 12px 0 28px rgba(0, 0, 0, .22) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        transform: translateX(-108%) !important;
        transition: transform .24s ease !important;
        box-sizing: border-box !important;
        scrollbar-width: none;
    }

        .agenda-master-sidebar::-webkit-scrollbar {
            display: none;
        }

    .agenda-master-menu-toggle:checked ~ .agenda-master-layout .agenda-master-sidebar {
        transform: translateX(0) !important;
    }

    .agenda-master-mobile-close {
        position: absolute;
        top: 12px;
        right: 12px;
        z-index: 2;
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 9px;
        color: #ffffff;
        font-size: 29px;
        font-weight: 300;
        line-height: 1;
        cursor: pointer;
        opacity: .88;
        transition: background-color .15s ease, opacity .15s ease;
    }

        .agenda-master-mobile-close:hover,
        .agenda-master-mobile-close:focus {
            background: rgba(255, 255, 255, .12);
            opacity: 1;
        }

    .agenda-master-logo {
        min-height: 122px !important;
        padding: 30px 22px 20px 22px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        background: #4B5DC1 !important;
        box-sizing: border-box !important;
    }

        .agenda-master-logo img {
            width: 238px !important;
            max-width: calc(100% - 20px) !important;
            height: auto !important;
            display: block !important;
        }

    .agenda-master-menu {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 18px 0 10px 0 !important;
        overflow: visible !important;
        box-sizing: border-box !important;
        scrollbar-width: none;
    }

        .agenda-master-menu::before {
            content: 'MENÚ';
            display: block;
            padding: 0 28px 14px 28px;
            color: #6f6f6f;
            font-size: 12px;
            font-weight: 500;
            letter-spacing: .08em;
            text-transform: uppercase;
        }

    .agenda-master-nav-link {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 54px !important;
        padding: 0 24px 0 28px !important;
        display: flex !important;
        align-items: center !important;
        gap: 14px !important;
        color: #3b3b3b !important;
        background: #ffffff !important;
        border-left: 4px solid transparent !important;
        text-decoration: none !important;
        font-size: 16px !important;
        font-weight: 400 !important;
        line-height: 1.25 !important;
        white-space: normal !important;
        box-sizing: border-box !important;
    }

        .agenda-master-nav-link:hover,
        .agenda-master-nav-link:focus {
            color: #4B5DC1 !important;
            background: #f5f6ff !important;
            text-decoration: none !important;
        }

        .agenda-master-nav-link.activo {
            color: #4B5DC1 !important;
            background: #f3f5ff !important;
            border-left-color: #4B5DC1 !important;
            font-weight: 600 !important;
        }

        .agenda-master-nav-link.volver {
            min-height: 54px !important;
            margin: 0 0 8px 0 !important;
        }

    .agenda-master-icon {
        width: 28px !important;
        min-width: 28px !important;
        color: #555555 !important;
        text-align: center !important;
        font-size: 26px !important;
        line-height: 1 !important;
        font-weight: 600 !important;
    }

    .agenda-master-nav-link:hover .agenda-master-icon,
    .agenda-master-nav-link:focus .agenda-master-icon,
    .agenda-master-nav-link.activo .agenda-master-icon {
        color: #4B5DC1 !important;
    }

    .agenda-master-icon-home {
        font-size: 28px !important;
    }

    .agenda-master-actions {
        width: 100% !important;
        display: block !important;
        margin-top: auto !important;
        padding: 18px 22px 26px 22px !important;
        border-top: 1px solid #eeeeee !important;
        box-sizing: border-box !important;
        background: #ffffff !important;
    }

    .agenda-master-action-btn {
        width: 100% !important;
        min-height: 47px !important;
        margin: 0 0 10px 0 !important;
        border: 1px solid #4B5DC1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #4B5DC1 !important;
        background: #ffffff !important;
        text-decoration: none !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        box-sizing: border-box !important;
    }

        .agenda-master-action-btn:hover,
        .agenda-master-action-btn:focus {
            color: #ffffff !important;
            background: #4B5DC1 !important;
            text-decoration: none !important;
        }

    .agenda-master-main {
        width: 100% !important;
        min-height: 100vh !important;
        background-size: 100% auto !important;
    }

    .agenda-master-content {
        width: 100% !important;
        min-height: 100vh !important;
        padding: 74px 12px 36px 12px !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 420px) {
    .agenda-master-sidebar {
        width: min(288px, 86vw) !important;
        max-width: 288px !important;
    }

    .agenda-master-logo {
        min-height: 112px !important;
        padding: 26px 20px 18px 20px !important;
    }

        .agenda-master-logo img {
            width: 220px !important;
        }

    .agenda-master-nav-link {
        min-height: 52px !important;
        padding-left: 24px !important;
        padding-right: 20px !important;
        font-size: 15px !important;
    }

    .agenda-master-actions {
        padding: 16px 18px 24px 18px !important;
    }
}



/* =========================================================
   ESCALA DESKTOP CONTROLADA
   Mantiene la vista original, solo reduce proporciones grandes.
   No toca el panel de selección de hora ni .agenda-btn-hora.
   ========================================================= */
@media (min-width: 901px) {
    html,
    body {
        overflow-x: hidden !important;
    }

        html body .agenda-master-layout,
        html body .agenda-master-main {
            overflow-x: hidden !important;
        }

        html body .agenda-master-sidebar {
            width: var(--agenda-sidebar-width-desktop) !important;
            flex: 0 0 var(--agenda-sidebar-width-desktop) !important;
            min-width: var(--agenda-sidebar-width-desktop) !important;
            max-width: var(--agenda-sidebar-width-desktop) !important;
        }

        html body .agenda-master-logo {
            min-height: 137px !important;
            height: 137px !important;
            padding-bottom: 80px;
            box-sizing: border-box !important;
        }

            html body .agenda-master-logo img {
                width: 243px !important;
                max-width: 243px !important;
                height: 57px !important;
                max-height: 57px !important;
                object-fit: contain !important;
            }

        html body .agenda-master-nav-link {
            min-height: 74px !important;
            padding: 5px 10px 5px 12px !important;
            gap: 12px !important;
            font-size: 16px !important;
            font-weight: 400 !important;
            line-height: 20px !important;
        }

            html body .agenda-master-nav-link.volver {
                min-height: 74px !important;
                margin-bottom: 0 !important;
            }

        html body .agenda-master-icon {
            width: 30px !important;
            min-width: 30px !important;
            font-size: 30px !important;
            font-weight: 400 !important;
        }

        html body .agenda-master-icon-home {
            font-size: 30px !important;
        }

        html body .agenda-master-actions {
            width: var(--agenda-sidebar-width-desktop) !important;
            margin-top: auto !important;
            padding: 34px 0 32px 32px !important;
            box-sizing: border-box !important;
        }

        html body .agenda-master-action-btn {
            width: 216px !important;
            min-height: 45px !important;
            height: 45px !important;
            margin: 0 0 10px 0 !important;
            font-size: 16px !important;
            font-weight: 400 !important;
            line-height: 20px !important;
        }

        html body .agenda-master-content {
            padding: 132px 34px 42px 34px !important;
            overflow-x: hidden !important;
        }

            html body .agenda-master-content .agenda-proceso-wrapper {
                width: 100% !important;
                min-height: auto !important;
                padding: 0 !important;
                background: transparent !important;
                overflow-x: hidden !important;
                box-sizing: border-box !important;
            }

        html body .agenda-proceso-titulo,
        html body .agenda-rut-titulo,
        html body .agenda-horas-titulo {
            margin-bottom: 48px !important;
            text-align: center !important;
        }

            html body .agenda-proceso-titulo h1,
            html body .agenda-rut-titulo h1,
            html body .agenda-horas-titulo h1 {
                margin: 0 0 10px 0 !important;
                color: var(--agenda-color-primary) !important;
                font-size: var(--agenda-title-main-size) !important;
                font-weight: var(--agenda-title-main-weight) !important;
                line-height: var(--agenda-title-main-line-height) !important;
                letter-spacing: 0 !important;
            }

            html body .agenda-proceso-titulo p,
            html body .agenda-rut-titulo p,
            html body .agenda-horas-titulo p {
                margin: 0 !important;
                color: var(--agenda-color-primary) !important;
                font-size: var(--agenda-subtitle-main-size) !important;
                font-weight: 400 !important;
                line-height: 1.25 !important;
                letter-spacing: 0 !important;
            }

        /* Selectores iniciales: mismo look original, escala más contenida */
        html body .agenda-selector-card {
            width: min(640px, 92vw) !important;
            margin: 0 auto !important;
            padding: 46px 42px !important;
            border-radius: var(--agenda-radius-card) !important;
            box-shadow: 0 2px 12px rgba(0, 0, 0, .16) !important;
            text-align: center !important;
        }

            html body .agenda-selector-card h2 {
                margin: 0 0 26px 0 !important;
                color: var(--agenda-color-title) !important;
                font-size: 20px !important;
                font-weight: 700 !important;
                line-height: 1.22 !important;
            }

            html body .agenda-selector-card p {
                margin: 0 0 18px 0 !important;
                color: var(--agenda-color-primary) !important;
                font-size: 20px !important;
                font-weight: 400 !important;
                line-height: 1.28 !important;
            }

        /* Selector con apariencia similar a btn_agenda_nuevos */
        html body .agenda-selector-btn {
            display: block !important;
            width: 318px !important;
            max-width: 100% !important;
            margin: 14px auto 0 auto !important;
            padding: 8px 14px !important;
            background: #4B5DC1 0% 0% no-repeat padding-box !important;
            color: white !important;
            border-radius: 0px 10px 10px 10px !important;
            /* Esto imita el efecto raro/nativo del input */
            border-width: 2px !important;
            border-style: outset !important;
            border-color: #4B5DC1 !important;
            box-shadow: none !important;
            opacity: 1 !important;
            font-size: 20px !important;
            font-weight: 500 !important;
            line-height: 1.24 !important;
            text-align: center !important;
            text-decoration: none !important;
            cursor: pointer !important;
        }

            html body .agenda-selector-btn small {
                margin-top: 4px !important;
                font-size: 18px !important;
                line-height: 1.2 !important;
            }

        /* RUT / Datos paciente: reduce altura sin cambiar composición */
        html body .agenda-rut-card {
            width: 100% !important;
            max-width: 640px !important;
            min-height: 420px !important;
            margin: 0 auto !important;
            padding: 50px 46px 42px 46px !important;
            border-radius: var(--agenda-radius-card) !important;
            box-shadow: 0 2px 12px rgba(0, 0, 0, .16) !important;
            box-sizing: border-box !important;
        }

        html body .agenda-rut-contenido {
            width: 100% !important;
            max-width: 400px !important;
            margin: 0 auto !important;
            text-align: center !important;
        }

            html body .agenda-rut-contenido h2 {
                margin: 0 0 26px 0 !important;
                color: var(--agenda-color-title) !important;
                font-size: 23px !important;
                font-weight: 700 !important;
                line-height: 1.2 !important;
            }

        html body .agenda-rut-control {
            width: 100% !important;
            height: 50px !important;
            margin: 0 0 12px 0 !important;
            padding: 0 18px !important;
            border-radius: var(--agenda-radius-control) !important;
            font-size: 20px !important;
            font-weight: 400 !important;
            line-height: 50px !important;
            box-sizing: border-box !important;
        }

        html body .agenda-rut-btn-continuar {
            width: 100% !important;
            height: 44px !important;
            margin: 0 !important;
            padding: 0 14px !important;
            background: #4B5DC1 0% 0% no-repeat padding-box !important;
            color: #fff !important;
            border-radius: 0px 10px 10px 10px !important;
            border-width: 2px !important;
            border-style: outset !important;
            border-color: #4B5DC1 !important;
            box-shadow: none !important;
            opacity: 1 !important;
            font-size: 21px !important;
            font-weight: 500 !important;
            line-height: 1 !important;
            text-align: center !important;
            appearance: auto !important;
            -webkit-appearance: button !important;
            cursor: pointer !important;
        }

        /* Disponibilidad / Selección de hora: se restauran proporciones previas, solo sin radius asimétrico en horas */
        html body .agenda-disponibilidad-filtros {
            max-width: 680px !important;
            margin: 0 auto 18px auto !important;
            gap: 28px !important;
        }

        html body .agenda-disponibilidad-filtro-btn {
            min-width: 180px !important;
            height: 34px !important;
            padding: 0 18px !important;
            font-size: 15px !important;
            line-height: 32px !important;
        }

        html body .agenda-disponibilidad-aviso {
            width: min(930px, 100%) !important;
            margin: 0 auto 26px auto !important;
            padding: 16px 24px !important;
            border-radius: 8px !important;
            font-size: 18px !important;
            line-height: 1.32 !important;
        }

        html body .agenda-lista-items-disponibilidad {
            width: 100% !important;
            gap: 24px !important;
        }

        html body .agenda-horas-card {
            width: min(940px, 100%) !important;
            max-width: 940px !important;
            min-height: 300px !important;
            margin: 0 auto !important;
            padding: 22px 2px !important;
            grid-template-columns: 170px minmax(290px, 1fr) 300px !important;
            column-gap: 22px !important;
            border-radius: var(--agenda-radius-card) !important;
            overflow: hidden !important;
            box-sizing: border-box !important;
        }

        html body .agenda-item-img {
            width: 150px !important;
            height: 198px !important;
            margin: 0 auto 12px auto !important;
            border-radius: 9px !important;
        }

        html body .agenda-item-nombre {
            font-size: 16px;
            line-height: 1.32 !important;
        }

        html body .agenda-item-especialidades {
            font-size: 15px !important;
            line-height: 1.25 !important;
        }

        html body .agenda-item-info-medico {
            font-size: 11px !important;
            line-height: 1.25 !important;
        }

        html body .agenda-proxima-hora-titulo {
            margin: 0 0 16px 0 !important;
            font-size: 20px !important;
            line-height: 1.22 !important;
            letter-spacing: .07em !important;
            color: #13233D;
        }

        html body .agenda-fecha-principal {
            margin-bottom: 16px !important;
            font-size: 20px !important;
            line-height: 1.25 !important;
        }

        html body .agenda-lista-horas-grupo-titulo,
        html body .agenda-servicio {
            margin-bottom: 10px !important;
            font-size: 18px !important;
            line-height: 1.3 !important;
        }

        html body .agenda-lista-horas-grupo-icono {
            font-size: 16px !important;
        }

        html body .agenda-lista-horas-grupo-botones,
        html body .agenda-lista-horas {
            gap: 7px !important;
            font-size: 15px;
            color: #4d5fb1;
        }

        html body .agenda-btn-hora {
            min-width: 78px !important;
            height: 34px !important;
            margin-left: 0 !important;
            padding: 0 12px !important;
            border-radius: var(--agenda-radius-hour-button) !important;
            font-size: 15px !important;
            line-height: 1 !important;
            box-sizing: border-box !important;
        }

        html body .agenda-calendario-box {
            width: 300px !important;
            max-width: 300px !important;
        }

        html body .agenda-calendario-titulo {
            margin: 0 0 12px 0 !important;
            font-size: 20px !important;
            line-height: 1.2 !important;
            letter-spacing: 0px !important;
        }

        html body .agenda-calendario {
            width: 300px !important;
            max-width: 300px !important;
            font-size: 15px !important;
        }

        html body .agenda-calendario-title {
            height: 36px !important;
            font-size: 18px !important;
            line-height: 36px !important;
        }

            html body .agenda-calendario-title a,
            html body .agenda-calendario-title a:hover,
            html body .agenda-calendario-title a:focus {
                line-height: 36px !important;
            }

        html body .agenda-calendario-day-header {
            height: 38px !important;
            line-height: 38px !important;
        }

            html body .agenda-calendario-day-header::after {
                font-size: 15px !important;
                line-height: 38px !important;
            }

        html body .agenda-calendario-day,
        html body .agenda-calendario td.agenda-dia-disponible,
        html body .agenda-calendario td.agenda-dia-no-disponible,
        html body .agenda-calendario td.agenda-dia-seleccionado {
            height: 38px !important;
            min-height: 38px !important;
            padding: 20px 0 4px 0 !important;
            font-size: 15px !important;
            line-height: 15px !important;
        }

        html body .agenda-dia-disponible::before {
            top: 5px !important;
            width: 13px !important;
            height: 13px !important;
        }

        /* Formularios finales: solo baja títulos grandes, conserva layout original */
        html body .agenda-datos-paciente-titulo {
            font-size: 30px !important;
            line-height: 1.2 !important;
        }
}

@media (min-width: 901px) and (max-width: 1250px) {
    html body .agenda-master-content {
        padding: 118px 24px 36px 24px !important;
    }

    html body .agenda-selector-card,
    html body .agenda-rut-card {
        max-width: min(640px, 100%) !important;
    }

    html body .agenda-horas-card {
        width: min(900px, 100%) !important;
        max-width: 900px !important;
        grid-template-columns: 160px minmax(260px, 1fr) 290px !important;
        column-gap: 18px !important;
        padding: 20px 22px !important;
    }

    html body .agenda-calendario-box,
    html body .agenda-calendario {
        width: 290px !important;
        max-width: 290px !important;
    }

    html body .agenda-btn-hora {
        min-width: 72px !important;
        font-size: 14px !important;
    }
}

/* =========================================================
   NORMALIZACIÓN FINAL CONTROLADA
   Una sola fuente de verdad para fuente, títulos y radius de botones.
   No afecta los botones de hora (.agenda-btn-hora).
   ========================================================= */
html body,
html body button,
html body input,
html body select,
html body textarea {
    font-family: var(--agenda-font-family) !important;
}

    html body .agenda-proceso-titulo h1,
    html body .agenda-rut-titulo h1,
    html body .agenda-horas-titulo h1 {
        color: var(--agenda-color-primary) !important;
        font-family: var(--agenda-font-family) !important;
        font-size: var(--agenda-title-main-size) !important;
        font-weight: var(--agenda-title-main-weight) !important;
        line-height: var(--agenda-title-main-line-height) !important;
        letter-spacing: var(--agenda-title-main-letter-spacing) !important;
        word-spacing: normal !important;
    }

    html body .agenda-proceso-titulo p,
    html body .agenda-rut-titulo p,
    html body .agenda-horas-titulo p {
        font-family: var(--agenda-font-family) !important;
        letter-spacing: 0 !important;
    }

    html body .agenda-selector-btn,
    html body .agenda-rut-btn-continuar,
    html body .agenda-disponibilidad-filtro-btn,
    html body .agenda-btn-primario,
    html body .agenda-btn-secundario,
    html body .agenda-profesional-btn,
    html body .agenda-datos-paciente-btn-guardar,
    html body .agenda-validacion-contacto-btn-volver,
    html body .agenda-validacion-contacto-btn-guardar,
    html body .agenda-info-medico-btn-volver,
    html body .agenda-master-action-btn {
        border-radius: var(--agenda-radius-button) !important;
    }

    /* Excepción explícita: los botones donde se escoge la hora mantienen su radio original. */
    html body .agenda-btn-hora,
    html body .agenda-horas-card-item .agenda-btn-hora {
        border-radius: var(--agenda-radius-hour-button) !important;
    }

    /* =========================================================
   AJUSTE CALENDARIO DISPONIBILIDAD - RESPONSIVO AGENDADEFAULT
   Corrige el calendario rígido: en escritorio ensancha/reduce
   según espacio disponible; en resoluciones medias compacta las
   3 columnas sin montar textos; en móvil conserva el layout actual.
   ========================================================= */

    /* Base calendario: evita que el inline style del CodeBehind deje el bloque rígido. */
    html body .agenda-horas-card.agenda-horas-card-item,
    html body .agenda-horas-card-item * {
        box-sizing: border-box !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        text-align: center !important;
        overflow: visible !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-titulo {
        display: block !important;
        width: 100% !important;
        margin: 0 0 8px 0 !important;
        color: #001b3f !important;
        font-size: 18px !important;
        font-weight: 400 !important;
        line-height: 1.2 !important;
        text-align: center !important;
        text-transform: uppercase !important;
        letter-spacing: 0 !important;
        white-space: nowrap !important;
    }

    html body .agenda-horas-card-item .agenda-calendario {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        border: 1px solid #cfcfcf !important;
        border-radius: 3px !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
        background: #ffffff !important;
        table-layout: fixed !important;
        overflow: hidden !important;
    }

        html body .agenda-horas-card-item .agenda-calendario table {
            width: 100% !important;
            table-layout: fixed !important;
            border-collapse: separate !important;
            border-spacing: 0 !important;
        }

    html body .agenda-horas-card-item .agenda-calendario-title {
        height: 31px !important;
        padding: 0 !important;
        background: #ffffff !important;
        color: #4b5fc7 !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        line-height: 31px !important;
        text-align: center !important;
        text-transform: none !important;
    }

    /* Flechas mes anterior / siguiente estilo AgendaDefault. */
    html body .agenda-horas-card-item .agenda-calendario-nav {
        width: 38px !important;
        height: 31px !important;
        padding: 0 !important;
        background: #ffffff !important;
        color: #001b3f !important;
        font-size: 0 !important;
        font-weight: 700 !important;
        line-height: 31px !important;
        text-align: center !important;
        vertical-align: middle !important;
    }

        html body .agenda-horas-card-item .agenda-calendario-nav a,
        html body .agenda-horas-card-item .agenda-calendario-nav a:hover,
        html body .agenda-horas-card-item .agenda-calendario-nav a:focus,
        html body .agenda-horas-card-item .agenda-calendario tr:first-child td:first-child a,
        html body .agenda-horas-card-item .agenda-calendario tr:first-child th:first-child a,
        html body .agenda-horas-card-item .agenda-calendario tr:first-child td:last-child a,
        html body .agenda-horas-card-item .agenda-calendario tr:first-child th:last-child a {
            display: block !important;
            width: 100% !important;
            height: 31px !important;
            min-width: 0 !important;
            padding: 0 !important;
            color: #001b3f !important;
            font-size: 17px !important;
            font-weight: 700 !important;
            line-height: 31px !important;
            text-align: center !important;
            text-decoration: none !important;
        }

            html body .agenda-horas-card-item .agenda-calendario-nav a:hover,
            html body .agenda-horas-card-item .agenda-calendario-nav a:focus {
                color: #4b5fc7 !important;
            }

    html body .agenda-horas-card-item .agenda-calendario-day-header {
        height: 34px !important;
        background: #e8e8e8 !important;
        color: #4b5fc7 !important;
        line-height: 34px !important;
    }

        html body .agenda-horas-card-item .agenda-calendario-day-header::after {
            color: #4b5fc7 !important;
            font-size: 15px !important;
            font-weight: 700 !important;
            line-height: 34px !important;
        }

    html body .agenda-horas-card-item .agenda-calendario-day,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-no-disponible,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-seleccionado {
        height: 34px !important;
        min-height: 34px !important;
        padding: 16px 0 4px 0 !important;
        font-size: 14px !important;
        line-height: 14px !important;
        text-align: center !important;
    }

    html body .agenda-horas-card-item .agenda-dia-disponible::before {
        top: 4px !important;
        width: 12px !important;
        height: 12px !important;
    }

    html body .agenda-horas-card-item .agenda-dia-seleccionado,
    html body .agenda-horas-card-item .agenda-calendario-selected {
        border-radius: 5px !important;
    }

/* Escritorio ancho: comportamiento como AgendaDefault expandido, con el calendario a la derecha. */
@media (min-width: 1260px) {
    html body .agenda-horas-card.agenda-horas-card-item {
        display: grid !important;
        grid-template-columns: minmax(170px, 210px) minmax(380px, 1fr) minmax(340px, 390px) !important;
        column-gap: 30px !important;
        align-items: start !important;
        justify-content: stretch !important;
        width: min(1120px, calc(100% - 32px)) !important;
        max-width: min(1120px, calc(100vw - var(--agenda-sidebar-width-desktop) - 70px)) !important;
        min-height: 0 !important;
        margin: 0 auto !important;
        padding: 24px 28px !important;
        overflow: hidden !important;
    }

    html body .agenda-horas-card-item .agenda-item-info-dinamico {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 210px !important;
    }

    html body .agenda-horas-card-item .agenda-item-img {
        width: 185px !important;
        max-width: 100% !important;
        height: 245px !important;
        margin: 0 auto 18px auto !important;
    }

    html body .agenda-horas-card-item .agenda-item-nombre {
        font-size: 18px !important;
        line-height: 1.28 !important;
    }

    html body .agenda-horas-card-item .agenda-item-especialidades {
        font-size: 13px !important;
        line-height: 1.25 !important;
    }

    html body .agenda-horas-card-item .agenda-item-horas-dinamico {
        width: 100% !important;
        min-width: 0 !important;
        padding-top: 2px !important;
    }

    html body .agenda-horas-card-item .agenda-proxima-hora-titulo {
        margin: 0 0 20px 0 !important;
        color: #13233D !important;
        font-size: 22px !important;
        line-height: 1.22 !important;
        letter-spacing: .06em !important;
        text-align: center !important;
        white-space: normal !important;
    }

    html body .agenda-horas-card-item .agenda-fecha-principal {
        margin: 0 0 16px 0 !important;
        color: #4b5fc7 !important;
        font-size: 21px !important;
        line-height: 1.25 !important;
        text-align: center !important;
        white-space: normal !important;
    }

    html body .agenda-horas-card-item .agenda-lista-horas-grupo {
        margin-bottom: 25px !important;
    }

    html body .agenda-horas-card-item .agenda-lista-horas-grupo-titulo,
    html body .agenda-horas-card-item .agenda-servicio {
        margin-bottom: 10px !important;
        color: #4b5fc7 !important;
        font-size: 17px !important;
        line-height: 1.3 !important;
        text-align: center !important;
        text-transform: none !important;
    }

    html body .agenda-horas-card-item .agenda-lista-horas,
    html body .agenda-horas-card-item .agenda-lista-horas-grupo-botones {
        justify-content: center !important;
        gap: 8px !important;
    }

    html body .agenda-horas-card-item .agenda-btn-hora {
        min-width: 76px !important;
        height: 34px !important;
        margin: 0 !important;
        padding: 0 12px !important;
        font-size: 15px !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 390px !important;
        justify-self: end !important;
    }
}

/* Escritorio medio: 3 columnas compactas, sin que el calendario se salga ni se monte. */
@media (min-width: 981px) and (max-width: 1259px) {
    html body .agenda-horas-card.agenda-horas-card-item {
        display: grid !important;
        grid-template-columns: minmax(145px, 170px) minmax(270px, 1fr) minmax(280px, 330px) !important;
        column-gap: 18px !important;
        align-items: start !important;
        justify-content: stretch !important;
        width: min(960px, calc(100% - 24px)) !important;
        max-width: min(960px, calc(100vw - var(--agenda-sidebar-width-desktop) - 52px)) !important;
        min-height: 0 !important;
        margin: 0 auto !important;
        padding: 20px 22px !important;
        overflow: hidden !important;
    }

    html body .agenda-horas-card-item .agenda-item-info-dinamico {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 170px !important;
    }

    html body .agenda-horas-card-item .agenda-item-img {
        width: 145px !important;
        max-width: 100% !important;
        height: 184px !important;
        margin: 0 auto 12px auto !important;
    }

    html body .agenda-horas-card-item .agenda-item-nombre {
        font-size: 16px !important;
        line-height: 1.28 !important;
    }

    html body .agenda-horas-card-item .agenda-item-especialidades {
        font-size: 14px !important;
        line-height: 1.25 !important;
    }

    html body .agenda-horas-card-item .agenda-item-horas-dinamico {
        width: 100% !important;
        min-width: 0 !important;
        padding-top: 0 !important;
    }

    html body .agenda-horas-card-item .agenda-proxima-hora-titulo {
        margin: 0 0 16px 0 !important;
        color: #13233D !important;
        font-size: 19px !important;
        line-height: 1.22 !important;
        letter-spacing: .05em !important;
        text-align: center !important;
        white-space: normal !important;
    }

    html body .agenda-horas-card-item .agenda-fecha-principal {
        margin: 0 0 14px 0 !important;
        color: #4b5fc7 !important;
        font-size: 18px !important;
        line-height: 1.25 !important;
        text-align: center !important;
        white-space: normal !important;
    }

    html body .agenda-horas-card-item .agenda-lista-horas-grupo {
        margin-bottom: 12px !important;
    }

    html body .agenda-horas-card-item .agenda-lista-horas-grupo-titulo,
    html body .agenda-horas-card-item .agenda-servicio {
        margin-bottom: 8px !important;
        color: #4b5fc7 !important;
        font-size: 15px !important;
        line-height: 1.3 !important;
        text-align: center !important;
        text-transform: none !important;
    }

    html body .agenda-horas-card-item .agenda-lista-horas,
    html body .agenda-horas-card-item .agenda-lista-horas-grupo-botones {
        justify-content: center !important;
        gap: 6px !important;
    }

    html body .agenda-horas-card-item .agenda-btn-hora {
        min-width: 66px !important;
        height: 31px !important;
        margin: 0 !important;
        padding: 0 9px !important;
        font-size: 13px !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 330px !important;
        justify-self: end !important;
    }
}

/* Resolución baja de escritorio / tablet horizontal: aún mantiene el calendario a la derecha como AgendaDefault. */
@media (min-width: 769px) and (max-width: 980px) {
    html body .agenda-horas-card.agenda-horas-card-item {
        display: grid !important;
        grid-template-columns: minmax(120px, 145px) minmax(200px, 1fr) minmax(245px, 285px) !important;
        column-gap: 12px !important;
        align-items: start !important;
        justify-content: stretch !important;
        width: min(860px, calc(100vw - 20px)) !important;
        max-width: min(860px, calc(100vw - 20px)) !important;
        min-height: 0 !important;
        margin: 0 auto !important;
        padding: 18px 16px !important;
        overflow: hidden !important;
    }

    html body .agenda-horas-card-item .agenda-item-info-dinamico {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 145px !important;
    }

    html body .agenda-horas-card-item .agenda-item-img {
        width: 118px !important;
        max-width: 100% !important;
        height: 128px !important;
        margin: 0 auto 10px auto !important;
        object-fit: cover !important;
    }

    html body .agenda-horas-card-item .agenda-item-nombre {
        font-size: 17px !important;
        line-height: 1.28 !important;
        text-align: center !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
    }

    html body .agenda-horas-card-item .agenda-item-especialidades {
        font-size: 12px !important;
        line-height: 1.25 !important;
        text-align: center !important;
    }

    html body .agenda-horas-card-item .agenda-item-info-medico {
        display: none !important;
    }

    html body .agenda-horas-card-item .agenda-item-horas-dinamico {
        width: 100% !important;
        min-width: 0 !important;
        padding-top: 0 !important;
        text-align: center !important;
    }

    html body .agenda-horas-card-item .agenda-proxima-hora-titulo {
        margin: 0 0 12px 0 !important;
        color: #13233D !important;
        font-size: 18px !important;
        line-height: 1.25 !important;
        letter-spacing: .04em !important;
        text-align: center !important;
        white-space: normal !important;
    }

    html body .agenda-horas-card-item .agenda-fecha-principal {
        margin: 0 0 12px 0 !important;
        color: #4b5fc7 !important;
        font-size: 17px !important;
        line-height: 1.25 !important;
        text-align: center !important;
        white-space: normal !important;
    }

    html body .agenda-horas-card-item .agenda-lista-horas-grupo {
        margin-bottom: 10px !important;
    }

    html body .agenda-horas-card-item .agenda-lista-horas-grupo-titulo,
    html body .agenda-horas-card-item .agenda-servicio {
        margin-bottom: 7px !important;
        color: #4b5fc7 !important;
        font-size: 14px !important;
        line-height: 1.25 !important;
        text-align: center !important;
        text-transform: none !important;
    }

    html body .agenda-horas-card-item .agenda-lista-horas,
    html body .agenda-horas-card-item .agenda-lista-horas-grupo-botones {
        justify-content: center !important;
        gap: 5px !important;
    }

    html body .agenda-horas-card-item .agenda-btn-hora {
        min-width: 60px !important;
        height: 29px !important;
        margin: 0 !important;
        padding: 0 8px !important;
        font-size: 12px !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 285px !important;
        justify-self: end !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-titulo {
        font-size: 16px !important;
        margin-bottom: 6px !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-title {
        height: 28px !important;
        font-size: 15px !important;
        line-height: 28px !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-nav,
    html body .agenda-horas-card-item .agenda-calendario-nav a {
        height: 28px !important;
        line-height: 28px !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-day-header {
        height: 30px !important;
        line-height: 30px !important;
    }

        html body .agenda-horas-card-item .agenda-calendario-day-header::after {
            font-size: 14px !important;
            line-height: 30px !important;
        }

    html body .agenda-horas-card-item .agenda-calendario-day,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-no-disponible,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-seleccionado {
        height: 31px !important;
        min-height: 31px !important;
        padding: 15px 0 4px 0 !important;
        font-size: 13px !important;
        line-height: 13px !important;
    }

    html body .agenda-horas-card-item .agenda-dia-disponible::before {
        top: 4px !important;
        width: 11px !important;
        height: 11px !important;
    }
}

/* Mobile/tablet chica: conserva la distribución actual aprobada y solo evita rigidez del Calendar. */
@media (max-width: 768px) {
    html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        justify-self: center !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-titulo {
        margin: 0 auto 12px auto !important;
        font-size: 18px !important;
        font-weight: 500 !important;
        color: #13233D !important;
        white-space: normal !important;
    }

    html body .agenda-horas-card-item .agenda-calendario {
        width: min(320px, 100%) !important;
        max-width: 100% !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-nav {
        width: 34px !important;
    }
}



/* =========================================================
   AJUSTE FINAL CALENDARIO - FLECHAS Y CARD RESPONSIVO
   Mantiene el calendario dentro del card y evita que títulos largos
   compriman o saquen el bloque del contenedor.
   ========================================================= */
html body .agenda-horas-card.agenda-horas-card-item {
    overflow: hidden !important;
}

html body .agenda-horas-card-item .agenda-item-horas-dinamico,
html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
    min-width: 0 !important;
    box-sizing: border-box !important;
}

html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
    overflow: hidden !important;
}

html body .agenda-horas-card-item .agenda-calendario-titulo {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
}

html body .agenda-horas-card-item .agenda-proxima-hora-titulo {
    max-width: 100% !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}

/* Flechas de cambio de mes: triángulo relleno, no glifo lineal. */
html body .agenda-horas-card-item .agenda-calendario-nav {
    position: relative !important;
    width: 34px !important;
    min-width: 34px !important;
    color: transparent !important;
    font-size: 0 !important;
    text-align: center !important;
}

    html body .agenda-horas-card-item .agenda-calendario-nav a {
        position: relative !important;
        display: block !important;
        width: 28px !important;
        height: 28px !important;
        margin: 1px auto !important;
        padding: 0 !important;
        border-radius: 5px !important;
        color: transparent !important;
        font-size: 0 !important;
        line-height: 28px !important;
        text-decoration: none !important;
    }

        html body .agenda-horas-card-item .agenda-calendario-nav a:hover,
        html body .agenda-horas-card-item .agenda-calendario-nav a:focus {
            background: #b9eaf4 !important;
            outline: none !important;
        }

html body .agenda-horas-card-item .agenda-calendario tr:first-child td:first-child.agenda-calendario-nav a::before,
html body .agenda-horas-card-item .agenda-calendario tr:first-child th:first-child.agenda-calendario-nav a::before {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 0 !important;
    height: 0 !important;
    border-top: 7px solid transparent !important;
    border-bottom: 7px solid transparent !important;
    border-right: 7px solid #001b3f !important;
    transform: translate(-55%, -50%) !important;
}

html body .agenda-horas-card-item .agenda-calendario tr:first-child td:last-child.agenda-calendario-nav a::before,
html body .agenda-horas-card-item .agenda-calendario tr:first-child th:last-child.agenda-calendario-nav a::before {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 0 !important;
    height: 0 !important;
    border-top: 7px solid transparent !important;
    border-bottom: 7px solid transparent !important;
    border-left: 7px solid #001b3f !important;
    transform: translate(-45%, -50%) !important;
}

html body .agenda-horas-card-item .agenda-calendario tr:first-child td:first-child.agenda-calendario-nav a:hover::before,
html body .agenda-horas-card-item .agenda-calendario tr:first-child th:first-child.agenda-calendario-nav a:hover::before,
html body .agenda-horas-card-item .agenda-calendario tr:first-child td:first-child.agenda-calendario-nav a:focus::before,
html body .agenda-horas-card-item .agenda-calendario tr:first-child th:first-child.agenda-calendario-nav a:focus::before {
    border-right-color: #4b5fc7 !important;
}

html body .agenda-horas-card-item .agenda-calendario tr:first-child td:last-child.agenda-calendario-nav a:hover::before,
html body .agenda-horas-card-item .agenda-calendario tr:first-child th:last-child.agenda-calendario-nav a:hover::before,
html body .agenda-horas-card-item .agenda-calendario tr:first-child td:last-child.agenda-calendario-nav a:focus::before,
html body .agenda-horas-card-item .agenda-calendario tr:first-child th:last-child.agenda-calendario-nav a:focus::before {
    border-left-color: #4b5fc7 !important;
}

/* Mes sin navegación: triángulo gris, igual que AgendaDefault cuando no corresponde avanzar/retroceder. */
html body .agenda-horas-card-item .agenda-calendario tr:first-child td:first-child.agenda-calendario-nav:not(:has(a))::before,
html body .agenda-horas-card-item .agenda-calendario tr:first-child th:first-child.agenda-calendario-nav:not(:has(a))::before {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 0 !important;
    height: 0 !important;
    border-top: 7px solid transparent !important;
    border-bottom: 7px solid transparent !important;
    border-right: 7px solid #b7b7b7 !important;
    transform: translate(-55%, -50%) !important;
}

html body .agenda-horas-card-item .agenda-calendario tr:first-child td:last-child.agenda-calendario-nav:not(:has(a))::before,
html body .agenda-horas-card-item .agenda-calendario tr:first-child th:last-child.agenda-calendario-nav:not(:has(a))::before {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 0 !important;
    height: 0 !important;
    border-top: 7px solid transparent !important;
    border-bottom: 7px solid transparent !important;
    border-left: 7px solid #b7b7b7 !important;
    transform: translate(-45%, -50%) !important;
}

/* Desktop ancho: similar a AgendaDefault, pero sin sacar el calendario del card. */
@media (min-width: 1260px) {
    html body .agenda-horas-card.agenda-horas-card-item {
        grid-template-columns: minmax(185px, 230px) minmax(360px, 1fr) minmax(350px, 390px) !important;
        column-gap: 34px !important;
        width: min(1280px, calc(100% - 32px)) !important;
        max-width: min(1280px, calc(100% - 32px)) !important;
        padding: 24px 34px !important;
    }

    html body .agenda-horas-card-item .agenda-proxima-hora-titulo {
        font-size: 21px !important;
        line-height: 1.2 !important;
        letter-spacing: .045em !important;
        white-space: normal !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        width: min(390px, 100%) !important;
        max-width: 390px !important;
        justify-self: end !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-titulo {
        font-size: 18px !important;
    }
}

/* Desktop medio: compacta textos antes de dejar que el calendario toque el borde. */
@media (min-width: 981px) and (max-width: 1259px) {
    html body .agenda-horas-card.agenda-horas-card-item {
        grid-template-columns: minmax(145px, 170px) minmax(240px, 1fr) minmax(285px, 320px) !important;
        column-gap: 16px !important;
        width: min(1060px, calc(100% - 24px)) !important;
        max-width: min(1060px, calc(100% - 24px)) !important;
        padding: 20px 22px !important;
    }

    html body .agenda-horas-card-item .agenda-proxima-hora-titulo {
        font-size: 17px !important;
        line-height: 1.24 !important;
        letter-spacing: .025em !important;
        white-space: normal !important;
    }

    html body .agenda-horas-card-item .agenda-fecha-principal {
        font-size: 17px !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        width: min(320px, 100%) !important;
        max-width: 320px !important;
        justify-self: end !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-titulo {
        font-size: 16px !important;
    }
}

/* Resolución baja de escritorio/tablet horizontal: mantiene 3 columnas sin montar títulos. */
@media (min-width: 769px) and (max-width: 980px) {
    html body .agenda-horas-card.agenda-horas-card-item {
        grid-template-columns: minmax(112px, 132px) minmax(0, 1fr) minmax(230px, 260px) !important;
        column-gap: 10px !important;
        width: min(860px, calc(100% - 16px)) !important;
        max-width: min(860px, calc(100% - 16px)) !important;
        padding: 16px 14px !important;
    }

    html body .agenda-horas-card-item .agenda-proxima-hora-titulo {
        font-size: 15px !important;
        line-height: 1.24 !important;
        letter-spacing: .015em !important;
        white-space: normal !important;
    }

    html body .agenda-horas-card-item .agenda-fecha-principal {
        font-size: 15px !important;
    }

    html body .agenda-horas-card-item .agenda-lista-horas-grupo-titulo,
    html body .agenda-horas-card-item .agenda-servicio {
        font-size: 13px !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        width: min(260px, 100%) !important;
        max-width: 260px !important;
        justify-self: end !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-titulo {
        font-size: 14px !important;
        margin-bottom: 6px !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-nav {
        width: 30px !important;
        min-width: 30px !important;
    }

        html body .agenda-horas-card-item .agenda-calendario-nav a {
            width: 26px !important;
            height: 26px !important;
            line-height: 26px !important;
        }
}


/* =========================================================
   AJUSTE CALENDARIO - COMPRESIÓN ANTICIPADA DE TÍTULO
   Mantiene el título compacto antes de resoluciones medias para
   evitar que el calendario se salga del card.
   ========================================================= */
@media (min-width: 1260px) and (max-width: 1440px) {
    html body .agenda-horas-card.agenda-horas-card-item {
        grid-template-columns: minmax(170px, 210px) minmax(310px, 1fr) minmax(330px, 360px) !important;
        column-gap: 24px !important;
        width: min(1180px, calc(100% - 64px)) !important;
        max-width: min(1180px, calc(100% - 64px)) !important;
        padding: 22px 26px !important;
    }

    html body .agenda-horas-card-item .agenda-proxima-hora-titulo {
        max-width: 100% !important;
        font-size: 18px !important;
        line-height: 1.22 !important;
        letter-spacing: .03em !important;
        white-space: normal !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
    }

    html body .agenda-horas-card-item .agenda-fecha-principal {
        font-size: 20px !important;
        line-height: 1.25 !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        width: min(360px, 100%) !important;
        max-width: 360px !important;
        justify-self: end !important;
        overflow: hidden !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-titulo {
        max-width: 100% !important;
        font-size: 16px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
    }
}

@media (min-width: 981px) and (max-width: 1320px) {
    html body .agenda-horas-card-item .agenda-proxima-hora-titulo {
        font-size: 16px !important;
        line-height: 1.22 !important;
        letter-spacing: .02em !important;
        white-space: normal !important;
    }
}


/* =========================================================
   AJUSTE CALENDARIO - CONTENCIÓN ENTRE 980px Y 1080px
   Evita que el calendario se salga del card cuando el ancho útil
   queda reducido por el sidebar. Solo CSS, sin tocar el flujo.
   ========================================================= */
@media (min-width: 769px) and (max-width: 1080px) {
    html body .agenda-horas-card.agenda-horas-card-item {
        grid-template-columns: minmax(96px, 122px) minmax(0, 1fr) minmax(210px, 236px) !important;
        column-gap: 8px !important;
        width: calc(100% - 16px) !important;
        max-width: calc(100% - 16px) !important;
        padding: 14px 12px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    html body .agenda-horas-card-item .agenda-item-info-dinamico,
    html body .agenda-horas-card-item .agenda-item-horas-dinamico,
    html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    html body .agenda-horas-card-item .agenda-item-img {
        width: 96px !important;
        max-width: 100% !important;
        height: 118px !important;
        margin-bottom: 8px !important;
        object-fit: cover !important;
    }

    html body .agenda-horas-card-item .agenda-item-nombre {
        font-size: 15px !important;
        line-height: 1.24 !important;
        overflow-wrap: break-word !important;
    }

    html body .agenda-horas-card-item .agenda-item-especialidades {
        font-size: 11px !important;
        line-height: 1.2 !important;
    }

    html body .agenda-horas-card-item .agenda-proxima-hora-titulo {
        max-width: 100% !important;
        margin-bottom: 8px !important;
        font-size: 13px !important;
        line-height: 1.22 !important;
        letter-spacing: .01em !important;
        white-space: normal !important;
        overflow: visible !important;
        text-align: center !important;
    }

    html body .agenda-horas-card-item .agenda-fecha-principal {
        margin-bottom: 8px !important;
        font-size: 14px !important;
        line-height: 1.22 !important;
    }

    html body .agenda-horas-card-item .agenda-lista-horas-grupo-titulo,
    html body .agenda-horas-card-item .agenda-servicio {
        margin-bottom: 6px !important;
        font-size: 12px !important;
        line-height: 1.22 !important;
    }

    html body .agenda-horas-card-item .agenda-lista-horas,
    html body .agenda-horas-card-item .agenda-lista-horas-grupo-botones {
        gap: 4px !important;
    }

    html body .agenda-horas-card-item .agenda-btn-hora {
        min-width: 50px !important;
        height: 27px !important;
        padding: 0 6px !important;
        font-size: 11px !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        width: 100% !important;
        max-width: 236px !important;
        justify-self: end !important;
        overflow: hidden !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-titulo {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 5px !important;
        font-size: 13px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: clip !important;
    }

    html body .agenda-horas-card-item .agenda-calendario {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
        box-sizing: border-box !important;
    }

        html body .agenda-horas-card-item .agenda-calendario table {
            width: 100% !important;
            max-width: 100% !important;
            table-layout: fixed !important;
        }

    html body .agenda-horas-card-item .agenda-calendario-title {
        height: 27px !important;
        font-size: 13px !important;
        line-height: 27px !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-nav {
        width: 27px !important;
        min-width: 27px !important;
    }

        html body .agenda-horas-card-item .agenda-calendario-nav a {
            width: 24px !important;
            height: 24px !important;
            margin: 1px auto !important;
            line-height: 24px !important;
        }

    html body .agenda-horas-card-item .agenda-calendario tr:first-child td:first-child.agenda-calendario-nav a::before,
    html body .agenda-horas-card-item .agenda-calendario tr:first-child th:first-child.agenda-calendario-nav a::before {
        border-top-width: 6px !important;
        border-bottom-width: 6px !important;
        border-right-width: 6px !important;
    }

    html body .agenda-horas-card-item .agenda-calendario tr:first-child td:last-child.agenda-calendario-nav a::before,
    html body .agenda-horas-card-item .agenda-calendario tr:first-child th:last-child.agenda-calendario-nav a::before {
        border-top-width: 6px !important;
        border-bottom-width: 6px !important;
        border-left-width: 6px !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-day-header {
        height: 27px !important;
        line-height: 27px !important;
    }

        html body .agenda-horas-card-item .agenda-calendario-day-header::after {
            font-size: 12px !important;
            line-height: 27px !important;
        }

    html body .agenda-horas-card-item .agenda-calendario-day,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-no-disponible,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-seleccionado {
        height: 28px !important;
        min-height: 28px !important;
        padding: 14px 0 3px 0 !important;
        font-size: 12px !important;
        line-height: 12px !important;
    }

        html body .agenda-horas-card-item .agenda-calendario-day a,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible a,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-no-disponible a,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-seleccionado a {
            height: 12px !important;
            min-height: 12px !important;
            line-height: 12px !important;
        }

    html body .agenda-horas-card-item .agenda-dia-disponible::before {
        top: 4px !important;
        width: 10px !important;
        height: 10px !important;
    }
}


/* =========================================================
   AJUSTE FINAL CALENDARIO - CONTENCIÓN RESPONSIVA DESKTOP/TABLET
   Objetivo:
   - Evitar que el calendario se salga del card cuando el ancho útil
     se reduce por sidebar o resoluciones intermedias.
   - Mantener 3 columnas en escritorio cuando cabe.
   - Pasar el calendario a una segunda fila solo en tablet angosta.
   ========================================================= */

@media (min-width: 769px) {
    html body .agenda-horas-card.agenda-horas-card-item {
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    html body .agenda-horas-card-item .agenda-item-info-dinamico,
    html body .agenda-horas-card-item .agenda-item-horas-dinamico,
    html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        overflow: hidden !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-titulo {
        max-width: 100% !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: clip !important;
    }

    html body .agenda-horas-card-item .agenda-calendario,
    html body .agenda-horas-card-item .agenda-calendario table {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
        box-sizing: border-box !important;
    }
}

/* Escritorio medio con sidebar: conserva 3 columnas, pero baja el ancho del calendario. */
@media (min-width: 1441px) and (max-width: 1700px) {
    html body .agenda-horas-card.agenda-horas-card-item {
        grid-template-columns: minmax(175px, 210px) minmax(0, 1fr) minmax(315px, 350px) !important;
        column-gap: 24px !important;
        width: min(1140px, calc(100% - 48px)) !important;
        max-width: min(1140px, calc(100% - 48px)) !important;
        padding: 22px 26px !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        width: 100% !important;
        max-width: 350px !important;
        justify-self: end !important;
    }

    html body .agenda-horas-card-item .agenda-proxima-hora-titulo {
        font-size: 22px !important;
        line-height: 1.18 !important;
        letter-spacing: .04em !important;
        white-space: normal !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-titulo {
        font-size: 18px !important;
    }
}

/* Rango donde antes se salía por falta de ancho útil. */
@media (min-width: 1281px) and (max-width: 1440px) {
    html body .agenda-horas-card.agenda-horas-card-item {
        grid-template-columns: minmax(155px, 185px) minmax(0, 1fr) minmax(285px, 320px) !important;
        column-gap: 18px !important;
        width: min(1060px, calc(100% - 32px)) !important;
        max-width: min(1060px, calc(100% - 32px)) !important;
        padding: 20px 22px !important;
    }

    html body .agenda-horas-card-item .agenda-item-img {
        width: 150px !important;
        height: 190px !important;
        max-width: 100% !important;
        object-fit: cover !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        width: 100% !important;
        max-width: 320px !important;
        justify-self: end !important;
    }

    html body .agenda-horas-card-item .agenda-proxima-hora-titulo {
        font-size: 18px !important;
        line-height: 1.2 !important;
        letter-spacing: .03em !important;
        white-space: normal !important;
    }

    html body .agenda-horas-card-item .agenda-fecha-principal {
        font-size: 19px !important;
        line-height: 1.22 !important;
    }

    html body .agenda-horas-card-item .agenda-lista-horas-grupo-titulo,
    html body .agenda-horas-card-item .agenda-servicio {
        font-size: 16px !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-titulo {
        font-size: 16px !important;
        line-height: 1.2 !important;
    }
}

/* Tablet horizontal / escritorio angosto: 3 columnas compactas sin overflow. */
@media (min-width: 1081px) and (max-width: 1280px) {
    html body .agenda-horas-card.agenda-horas-card-item {
        grid-template-columns: minmax(130px, 150px) minmax(0, 1fr) minmax(255px, 285px) !important;
        column-gap: 14px !important;
        width: calc(100% - 24px) !important;
        max-width: calc(100% - 24px) !important;
        padding: 18px 16px !important;
    }

    html body .agenda-horas-card-item .agenda-item-img {
        width: 126px !important;
        height: 160px !important;
        max-width: 100% !important;
        object-fit: cover !important;
    }

    html body .agenda-horas-card-item .agenda-item-nombre {
        font-size: 17px !important;
        line-height: 1.22 !important;
    }

    html body .agenda-horas-card-item .agenda-item-especialidades {
        font-size: 11px !important;
        line-height: 1.18 !important;
    }

    html body .agenda-horas-card-item .agenda-proxima-hora-titulo {
        font-size: 16px !important;
        line-height: 1.22 !important;
        letter-spacing: .02em !important;
        white-space: normal !important;
    }

    html body .agenda-horas-card-item .agenda-fecha-principal {
        font-size: 17px !important;
        line-height: 1.22 !important;
    }

    html body .agenda-horas-card-item .agenda-lista-horas-grupo-titulo,
    html body .agenda-horas-card-item .agenda-servicio {
        font-size: 14px !important;
        line-height: 1.2 !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        width: 100% !important;
        max-width: 285px !important;
        justify-self: end !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-titulo {
        font-size: 14px !important;
        margin-bottom: 6px !important;
    }

    html body .agenda-horas-card-item .agenda-btn-hora {
        min-width: 54px !important;
        height: 28px !important;
        padding: 0 7px !important;
        font-size: 12px !important;
    }
}

/* Rango crítico 980-1080 aprox.: se compactan columnas y calendario. */
@media (min-width: 901px) and (max-width: 1080px) {
    html body .agenda-horas-card.agenda-horas-card-item {
        grid-template-columns: minmax(102px, 122px) minmax(0, 1fr) minmax(218px, 246px) !important;
        column-gap: 8px !important;
        width: calc(100% - 14px) !important;
        max-width: calc(100% - 14px) !important;
        padding: 14px 12px !important;
    }

    html body .agenda-horas-card-item .agenda-item-img {
        width: 96px !important;
        height: 122px !important;
        max-width: 100% !important;
        object-fit: cover !important;
    }

    html body .agenda-horas-card-item .agenda-item-nombre {
        font-size: 15px !important;
        line-height: 1.2 !important;
    }

    html body .agenda-horas-card-item .agenda-item-especialidades {
        font-size: 10px !important;
        line-height: 1.15 !important;
    }

    html body .agenda-horas-card-item .agenda-proxima-hora-titulo {
        font-size: 13px !important;
        line-height: 1.2 !important;
        letter-spacing: .01em !important;
        white-space: normal !important;
    }

    html body .agenda-horas-card-item .agenda-fecha-principal {
        font-size: 14px !important;
        line-height: 1.2 !important;
    }

    html body .agenda-horas-card-item .agenda-lista-horas-grupo-titulo,
    html body .agenda-horas-card-item .agenda-servicio {
        font-size: 12px !important;
        line-height: 1.18 !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        width: 100% !important;
        max-width: 246px !important;
        justify-self: end !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-titulo {
        font-size: 13px !important;
        margin-bottom: 5px !important;
    }

    html body .agenda-horas-card-item .agenda-btn-hora {
        min-width: 48px !important;
        height: 26px !important;
        padding: 0 5px !important;
        font-size: 11px !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-title {
        height: 26px !important;
        font-size: 13px !important;
        line-height: 26px !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-day-header {
        height: 26px !important;
        line-height: 26px !important;
    }

        html body .agenda-horas-card-item .agenda-calendario-day-header::after {
            font-size: 12px !important;
            line-height: 26px !important;
        }

    html body .agenda-horas-card-item .agenda-calendario-day,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-no-disponible,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-seleccionado {
        height: 27px !important;
        min-height: 27px !important;
        padding: 14px 0 3px 0 !important;
        font-size: 12px !important;
        line-height: 12px !important;
    }

    html body .agenda-horas-card-item .agenda-dia-disponible::before {
        top: 4px !important;
        width: 10px !important;
        height: 10px !important;
    }
}

/* Tablet angosta: si 3 columnas ya no caben, el calendario baja centrado. */
@media (min-width: 769px) and (max-width: 900px) {
    html body .agenda-horas-card.agenda-horas-card-item {
        grid-template-columns: minmax(112px, 140px) minmax(0, 1fr) !important;
        grid-template-areas:
            "info horas"
            "calendario calendario"
            "acciones acciones" !important;
        column-gap: 14px !important;
        row-gap: 16px !important;
        width: calc(100% - 14px) !important;
        max-width: calc(100% - 14px) !important;
        padding: 16px 14px 18px 14px !important;
    }

    html body .agenda-horas-card-item .agenda-item-info-dinamico {
        grid-area: info !important;
    }

    html body .agenda-horas-card-item .agenda-item-horas-dinamico {
        grid-area: horas !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        grid-area: calendario !important;
        width: min(330px, 100%) !important;
        max-width: 330px !important;
        justify-self: center !important;
        margin-top: 4px !important;
        overflow: hidden !important;
    }

    html body .agenda-horas-card-item .agenda-acciones {
        grid-area: acciones !important;
    }

    html body .agenda-horas-card-item .agenda-proxima-hora-titulo {
        font-size: 16px !important;
        line-height: 1.2 !important;
        white-space: normal !important;
    }

    html body .agenda-horas-card-item .agenda-fecha-principal {
        font-size: 17px !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-titulo {
        font-size: 16px !important;
    }
}

/* =========================================================
   AJUSTE RESPONSIVO - PANEL VALIDACIÓN CONTACTO
   Evita que el panel de e-mail/teléfono quede fuera del viewport
   en resoluciones intermedias y pantallas con poca altura.
   ========================================================= */
html body .agenda-proceso-wrapper:has(.agenda-validacion-contacto-card) {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

    html body .agenda-proceso-wrapper:has(.agenda-validacion-contacto-card) .agenda-proceso-titulo {
        margin-bottom: clamp(24px, 4vh, 42px) !important;
    }

html body .agenda-validacion-contacto-card {
    width: min(1080px, 100%) !important;
    max-width: calc(100% - 24px) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: clamp(38px, 6vh, 70px) clamp(24px, 5vw, 72px) clamp(32px, 5vh, 44px) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

html body .agenda-validacion-contacto-contenido,
html body .agenda-validacion-contacto-mensaje,
html body .agenda-validacion-contacto-grid,
html body .agenda-validacion-contacto-campo {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

html body .agenda-validacion-contacto-seccion {
    margin-bottom: clamp(16px, 2.6vh, 24px) !important;
    font-size: clamp(20px, 1.6vw, 24px) !important;
    line-height: 1.22 !important;
    overflow-wrap: anywhere !important;
}

html body .agenda-validacion-contacto-control {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

html body .agenda-validacion-contacto-acciones {
    display: grid !important;
    grid-template-columns: minmax(180px, 320px) minmax(260px, 1fr) !important;
    gap: 16px !important;
    width: 100% !important;
    margin-top: 14px !important;
    align-items: stretch !important;
    box-sizing: border-box !important;
}

html body .agenda-validacion-contacto-btn-volver,
html body .agenda-validacion-contacto-btn-guardar {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    white-space: normal !important;
    line-height: 1.15 !important;
    box-sizing: border-box !important;
}

@media (min-width: 901px) and (max-width: 1250px) {
    html body .agenda-validacion-contacto-card {
        width: 100% !important;
        max-width: calc(100% - 16px) !important;
        padding: 46px 34px 38px 34px !important;
    }

    html body .agenda-validacion-contacto-acciones {
        grid-template-columns: minmax(160px, 300px) minmax(240px, 1fr) !important;
    }
}

@media (min-width: 901px) and (max-height: 800px) {
    html body .agenda-proceso-wrapper:has(.agenda-validacion-contacto-card) .agenda-proceso-titulo {
        margin-bottom: 22px !important;
    }

        html body .agenda-proceso-wrapper:has(.agenda-validacion-contacto-card) .agenda-proceso-titulo h1 {
            font-size: 28px !important;
        }

        html body .agenda-proceso-wrapper:has(.agenda-validacion-contacto-card) .agenda-proceso-titulo p {
            font-size: 20px !important;
        }

    html body .agenda-validacion-contacto-card {
        padding-top: 32px !important;
        padding-bottom: 28px !important;
    }

    html body .agenda-validacion-contacto-seccion {
        margin-bottom: 14px !important;
        font-size: 20px !important;
    }

    html body .agenda-validacion-contacto-control {
        height: 44px !important;
        line-height: 44px !important;
    }

    html body .agenda-validacion-contacto-btn-volver,
    html body .agenda-validacion-contacto-btn-guardar {
        height: 44px !important;
        font-size: 20px !important;
    }
}

@media (max-width: 900px) {
    html body .agenda-proceso-wrapper:has(.agenda-validacion-contacto-card) .agenda-proceso-titulo {
        margin-bottom: 26px !important;
    }

    html body .agenda-validacion-contacto-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 34px 18px 30px 18px !important;
        border-radius: 14px !important;
    }

    html body .agenda-validacion-contacto-seccion {
        font-size: 19px !important;
    }

    html body .agenda-validacion-contacto-acciones {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        margin-top: 12px !important;
    }

    html body .agenda-validacion-contacto-btn-volver,
    html body .agenda-validacion-contacto-btn-guardar {
        height: 45px !important;
        font-size: 19px !important;
    }
}

@media (max-width: 420px) {
    html body .agenda-validacion-contacto-card {
        padding: 28px 12px 26px 12px !important;
    }

    html body .agenda-validacion-contacto-seccion {
        font-size: 17px !important;
        line-height: 1.25 !important;
    }

    html body .agenda-validacion-contacto-icono {
        left: 12px !important;
        width: 17px !important;
        height: 17px !important;
    }

    html body .agenda-validacion-contacto-control {
        height: 44px !important;
        padding: 0 38px !important;
        font-size: 15px !important;
        line-height: 44px !important;
    }

    html body .agenda-validacion-contacto-btn-volver,
    html body .agenda-validacion-contacto-btn-guardar {
        font-size: 18px !important;
    }
}

/* =========================================================
   AJUSTE RESPONSIVO - PANEL DATOS PACIENTE
   Compacta el formulario de actualización/creación de paciente
   para que no se corte en resoluciones intermedias o con poca altura.
   ========================================================= */
html body .agenda-proceso-wrapper:has(.agenda-datos-paciente-card) {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

    html body .agenda-proceso-wrapper:has(.agenda-datos-paciente-card) .agenda-proceso-titulo {
        margin-bottom: clamp(24px, 4vh, 42px) !important;
    }

html body .agenda-datos-paciente-card {
    width: min(1120px, 100%) !important;
    max-width: calc(100% - 24px) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: clamp(26px, 4vh, 42px) clamp(24px, 4vw, 46px) clamp(28px, 4vh, 40px) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

html body .agenda-datos-paciente-titulo {
    margin: 0 0 clamp(18px, 2.6vh, 26px) 0 !important;
    font-size: clamp(30px, 2.6vw, 38px) !important;
    line-height: 1.15 !important;
    overflow-wrap: anywhere !important;
}

html body .agenda-datos-paciente-mensaje,
html body .agenda-datos-paciente-documento-grid,
html body .agenda-datos-paciente-grid,
html body .agenda-datos-paciente-acciones {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

html body .agenda-datos-paciente-documento-grid,
html body .agenda-datos-paciente-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

html body .agenda-datos-paciente-documento-grid {
    gap: clamp(14px, 2.2vw, 28px) !important;
    margin-bottom: clamp(20px, 3vh, 32px) !important;
}

html body .agenda-datos-paciente-grid {
    gap: clamp(14px, 2vh, 22px) clamp(18px, 2.4vw, 28px) !important;
}

html body .agenda-datos-paciente-seccion {
    margin: 0 0 clamp(10px, 1.8vh, 14px) 0 !important;
    font-size: clamp(22px, 2vw, 24px) !important;
    line-height: 1.2 !important;
}

html body .agenda-datos-paciente-control {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: clamp(52px, 6vh, 60px) !important;
    padding: 0 clamp(18px, 2.4vw, 28px) !important;
    font-size: clamp(16px, 1.4vw, 18px) !important;
    line-height: clamp(52px, 6vh, 60px) !important;
    box-sizing: border-box !important;
}

html body .agenda-datos-paciente-acciones {
    margin-top: clamp(16px, 2.4vh, 24px) !important;
    display: flex !important;
    justify-content: flex-end !important;
}

html body .agenda-datos-paciente-btn-guardar {
    width: min(382px, 100%) !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 43px !important;
    margin: 0 !important;
    white-space: normal !important;
    line-height: 1.15 !important;
    box-sizing: border-box !important;
}

@media (min-width: 901px) and (max-width: 1250px) {
    html body .agenda-datos-paciente-card {
        width: 100% !important;
        max-width: calc(100% - 16px) !important;
        padding: 34px 34px 36px 34px !important;
    }

    html body .agenda-datos-paciente-documento-grid,
    html body .agenda-datos-paciente-grid {
        gap: 16px 24px !important;
    }
}

@media (min-width: 901px) and (max-height: 860px) {
    html body .agenda-proceso-wrapper:has(.agenda-datos-paciente-card) .agenda-proceso-titulo {
        margin-bottom: 22px !important;
    }

        html body .agenda-proceso-wrapper:has(.agenda-datos-paciente-card) .agenda-proceso-titulo h1 {
            font-size: 28px !important;
        }

        html body .agenda-proceso-wrapper:has(.agenda-datos-paciente-card) .agenda-proceso-titulo p {
            font-size: 20px !important;
        }

    html body .agenda-datos-paciente-card {
        padding-top: 24px !important;
        padding-bottom: 28px !important;
    }

    html body .agenda-datos-paciente-titulo {
        margin-bottom: 16px !important;
        font-size: 30px !important;
    }

    html body .agenda-datos-paciente-documento-grid {
        margin-bottom: 16px !important;
    }

    html body .agenda-datos-paciente-grid {
        gap: 12px 20px !important;
    }

    html body .agenda-datos-paciente-seccion {
        margin-bottom: 10px !important;
        font-size: 22px !important;
    }

    html body .agenda-datos-paciente-control {
        height: 48px !important;
        line-height: 48px !important;
        font-size: 16px !important;
    }

    html body .agenda-datos-paciente-acciones {
        margin-top: 14px !important;
    }

    html body .agenda-datos-paciente-btn-guardar {
        height: 42px !important;
        font-size: 20px !important;
    }
}

@media (min-width: 901px) and (max-height: 760px) {
    html body .agenda-proceso-wrapper:has(.agenda-datos-paciente-card) .agenda-proceso-titulo {
        margin-bottom: 16px !important;
    }

    html body .agenda-datos-paciente-card {
        padding: 20px 30px 24px 30px !important;
    }

    html body .agenda-datos-paciente-titulo {
        margin-bottom: 12px !important;
        font-size: 28px !important;
    }

    html body .agenda-datos-paciente-documento-grid {
        margin-bottom: 12px !important;
    }

    html body .agenda-datos-paciente-grid {
        gap: 10px 18px !important;
    }

    html body .agenda-datos-paciente-seccion {
        margin-bottom: 8px !important;
        font-size: 20px !important;
    }

    html body .agenda-datos-paciente-control {
        height: 44px !important;
        line-height: 44px !important;
        font-size: 15px !important;
    }

    html body .agenda-datos-paciente-acciones {
        margin-top: 12px !important;
    }

    html body .agenda-datos-paciente-btn-guardar {
        height: 40px !important;
        font-size: 18px !important;
    }
}

@media (max-width: 900px) {
    html body .agenda-proceso-wrapper:has(.agenda-datos-paciente-card) .agenda-proceso-titulo {
        margin-bottom: 26px !important;
    }

    html body .agenda-datos-paciente-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 32px 18px 30px 18px !important;
        border-radius: 14px !important;
    }

    html body .agenda-datos-paciente-titulo {
        font-size: 28px !important;
    }

    html body .agenda-datos-paciente-documento-grid,
    html body .agenda-datos-paciente-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    html body .agenda-datos-paciente-documento-grid {
        margin-bottom: 20px !important;
    }

    html body .agenda-datos-paciente-control {
        height: 52px !important;
        line-height: 52px !important;
        font-size: 16px !important;
    }

    html body .agenda-datos-paciente-acciones {
        display: grid !important;
        grid-template-columns: 1fr !important;
        margin-top: 16px !important;
    }

    html body .agenda-datos-paciente-btn-guardar {
        width: 100% !important;
        height: 45px !important;
        font-size: 18px !important;
    }
}

@media (max-width: 420px) {
    html body .agenda-datos-paciente-card {
        padding: 28px 12px 26px 12px !important;
    }

    html body .agenda-datos-paciente-titulo {
        font-size: 24px !important;
        line-height: 1.2 !important;
    }

    html body .agenda-datos-paciente-seccion {
        font-size: 19px !important;
    }

    html body .agenda-datos-paciente-control {
        height: 46px !important;
        padding: 0 14px !important;
        font-size: 15px !important;
        line-height: 46px !important;
    }

    html body .agenda-datos-paciente-btn-guardar {
        font-size: 17px !important;
    }
}

/* =========================================================
   AJUSTE FINAL CALENDARIO - HOVER REAL EN FLECHAS MES
   Requiere en CodeBehind:
   calendario.NextPrevFormat = NextPrevFormat.CustomText;
   calendario.PrevMonthText = "◀";
   calendario.NextMonthText = "▶";

   Este bloque NO redibuja las flechas con pseudo-elementos.
   Solo achica el glifo y agrega hover tipo botón al <a> real
   que genera el Calendar de WebForms.
   ========================================================= */

/* Evita residuos de intentos anteriores con pseudo-elementos. */
html body .agenda-horas-card-item .agenda-calendario tr:first-child td:first-child a::before,
html body .agenda-horas-card-item .agenda-calendario tr:first-child td:first-child a::after,
html body .agenda-horas-card-item .agenda-calendario tr:first-child th:first-child a::before,
html body .agenda-horas-card-item .agenda-calendario tr:first-child th:first-child a::after,
html body .agenda-calendario .agenda-calendario-title a::before,
html body .agenda-calendario .agenda-calendario-title a::after {
    content: none !important;
    display: none !important;
    border: 0 !important;
}

/* Flechas reales del Calendar: aplica aunque WebForms las deje dentro del td de título. */
html body .agenda-horas-card-item .agenda-calendario tr:first-child td:first-child a,
html body .agenda-horas-card-item .agenda-calendario tr:first-child th:first-child a,
html body .agenda-calendario .agenda-calendario-title a,
html body .agenda-calendario .agenda-calendario-title a:link,
html body .agenda-calendario .agenda-calendario-title a:visited {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 6px !important;
    background-color: transparent !important;
    background-image: none !important;
    color: #001b3f !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-indent: 0 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    transition: background-color .15s ease, box-shadow .15s ease, color .15s ease !important;
}

    /* Hover/focus visible como botón. */
    html body .agenda-horas-card-item .agenda-calendario tr:first-child td:first-child a:hover,
    html body .agenda-horas-card-item .agenda-calendario tr:first-child th:first-child a:hover,
    html body .agenda-horas-card-item .agenda-calendario tr:first-child td:first-child a:focus,
    html body .agenda-horas-card-item .agenda-calendario tr:first-child th:first-child a:focus,
    html body .agenda-calendario .agenda-calendario-title a:hover,
    html body .agenda-calendario .agenda-calendario-title a:focus,
    html body .agenda-calendario .agenda-calendario-title a:active {
        background-color: #b9eaf4 !important;
        background-image: none !important;
        color: #001b3f !important;
        box-shadow: inset 0 0 0 1px rgba(75, 95, 199, .12) !important;
        outline: none !important;
    }

@media (max-width: 600px) {
    html body .agenda-horas-card-item .agenda-calendario tr:first-child td:first-child a,
    html body .agenda-horas-card-item .agenda-calendario tr:first-child th:first-child a,
    html body .agenda-calendario .agenda-calendario-title a,
    html body .agenda-calendario .agenda-calendario-title a:link,
    html body .agenda-calendario .agenda-calendario-title a:visited {
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
        min-height: 22px !important;
        max-width: 22px !important;
        max-height: 22px !important;
        font-size: 11px !important;
        border-radius: 5px !important;
    }
}

/* =========================================================
   PANEL RESERVA EXISTENTE
   Reutiliza el panel de consulta/anulación de reserva dentro
   del flujo principal de Default.aspx.
   ========================================================= */
.agenda-reserva-existente-wrapper {
    max-width: 1180px;
}

    .agenda-reserva-existente-wrapper .agenda-confirmacion-header {
        text-align: center;
    }

        .agenda-reserva-existente-wrapper .agenda-confirmacion-header h2 {
            color: var(--agenda-color-title);
            font-size: 30px;
            font-weight: 700;
        }

    .agenda-reserva-existente-wrapper .agenda-consulta-reserva-mensaje-ok {
        width: min(760px, 100%);
        margin-bottom: 30px;
        border-color: #d9def6;
        background: #f4f6ff;
        color: var(--agenda-color-primary);
    }

    .agenda-reserva-existente-wrapper .agenda-consulta-reserva-card {
        padding: 22px;
        border: 1px solid #e8eaf5;
        border-radius: 14px;
        background: #ffffff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    }

    .agenda-reserva-existente-wrapper .agenda-consulta-reserva-acciones {
        margin-top: 34px;
    }

@media (max-width: 768px) {
    .agenda-reserva-existente-wrapper {
        padding: 30px 22px;
    }

        .agenda-reserva-existente-wrapper .agenda-confirmacion-header h2 {
            font-size: 26px;
        }

        .agenda-reserva-existente-wrapper .agenda-consulta-reserva-card {
            padding: 16px;
        }
}


/* =========================================================
   PANEL RESERVA EXISTENTE ANTES DE HORAS
   ========================================================= */
.agenda-reserva-existente-wrapper {
    width: min(980px, 94vw);
    margin: 0 auto;
    box-sizing: border-box;
}

.agenda-reserva-existente-card {
    width: 100%;
    padding: 42px 46px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .16);
    box-sizing: border-box;
    text-align: left;
}

.agenda-reserva-existente-header {
    margin-bottom: 28px;
    text-align: center;
}

.agenda-reserva-existente-badge {
    display: inline-block;
    margin-bottom: 14px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #f4f6ff;
    color: #4b5fc7;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.agenda-reserva-existente-header h2 {
    margin: 0 0 10px 0;
    color: #001b3f;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.18;
}

.agenda-reserva-existente-descripcion {
    display: block;
    width: 100%;
    margin: 18px auto 0 auto;
    padding: 13px 18px;
    border: 1px solid #dbe1f4;
    border-radius: 10px;
    background: #f7f8ff;
    color: #4b5fc7;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    box-sizing: border-box;
}

.agenda-reserva-existente-header p {
    width: min(680px, 100%);
    margin: 0 auto;
    color: #13233D;
    font-size: 17px;
    line-height: 1.45;
}

.agenda-reserva-existente-mensaje {
    width: 100%;
    margin: 0 0 22px 0;
    padding: 14px 18px;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}

.agenda-reserva-existente-mensaje-info {
    border: 1px solid #dbe1f4;
    background: #f7f8ff;
    color: #4b5fc7;
}

.agenda-reserva-existente-mensaje-error {
    border: 1px solid #f0b9b9;
    background: #fff2f2;
    color: #b00020;
}

.agenda-reserva-existente-item {
    width: 100%;
    padding: 26px 28px;
    border: 1px solid #dfe3f1;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    box-sizing: border-box;
}

    .agenda-reserva-existente-item + .agenda-reserva-existente-item {
        margin-top: 20px;
    }

.agenda-reserva-existente-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e8eaf5;
}

.agenda-reserva-existente-item-label {
    display: block;
    margin-bottom: 4px;
    color: #26304f;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
}

.agenda-reserva-existente-item-header strong {
    display: block;
    color: #4b5fc7;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.agenda-reserva-existente-origen {
    display: inline-block;
    max-width: 240px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #f4f6ff;
    color: #4b5fc7;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

.agenda-reserva-existente-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}

.agenda-reserva-existente-row {
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid #dfe3f1;
    border-radius: 10px;
    background: #ffffff;
    box-sizing: border-box;
}

.agenda-reserva-existente-row-full {
    grid-column: 1 / -1;
}

.agenda-reserva-existente-row-label {
    display: block;
    margin-bottom: 4px;
    color: #26304f;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
}

.agenda-reserva-existente-row-value {
    display: block;
    color: #4b5fc7;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
}

.agenda-reserva-existente-acciones,
.agenda-reserva-existente-footer {
    display: flex;
    justify-content: center;
    gap: 14px;
    width: 100%;
    margin-top: 26px;
}

.agenda-reserva-existente-btn {
    width: min(320px, 100%);
    min-height: 48px;
    padding: 10px 22px;
    border: 1px solid #4b5fc7;
    border-radius: 0 10px 10px 10px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    box-sizing: border-box;
    text-align: center;
    transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.agenda-reserva-existente-btn-primario {
    background: #4b5fc7;
    color: #ffffff;
    box-shadow: 0 4px 0 #2e3f9a;
}

.agenda-reserva-existente-btn-secundario {
    background: #ffffff;
    color: #4b5fc7;
}

.agenda-reserva-existente-btn-primario:hover,
.agenda-reserva-existente-btn-primario:focus {
    background: #4054bd;
    border-color: #4054bd;
    color: #ffffff;
}

.agenda-reserva-existente-btn-secundario:hover,
.agenda-reserva-existente-btn-secundario:focus {
    background: #f4f6ff;
    color: #4054bd;
    border-color: #4054bd;
}

.agenda-reserva-existente-modal .agenda-consulta-reserva-modal-acciones {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .agenda-reserva-existente-wrapper {
        width: 100%;
    }

    .agenda-reserva-existente-card {
        padding: 30px 20px;
        border-radius: 18px;
    }

    .agenda-reserva-existente-header h2 {
        font-size: 26px;
    }

    .agenda-reserva-existente-descripcion {
        font-size: 14px;
        padding: 12px 14px;
    }

    .agenda-reserva-existente-header p {
        font-size: 16px;
    }

    .agenda-reserva-existente-item {
        padding: 22px 16px;
    }

    .agenda-reserva-existente-item-header {
        display: block;
    }

        .agenda-reserva-existente-item-header strong {
            font-size: 24px;
        }

    .agenda-reserva-existente-origen {
        max-width: 100%;
        margin-top: 14px;
    }

    .agenda-reserva-existente-grid {
        grid-template-columns: 1fr;
    }

    .agenda-reserva-existente-acciones,
    .agenda-reserva-existente-footer {
        display: block;
    }

    .agenda-reserva-existente-btn {
        width: 100%;
        margin-bottom: 12px;
        box-shadow: none !important;
    }
}



/* =========================================================
   AJUSTE RESERVA EXISTENTE / MODAL RESPONSIVE
   Mantiene ancho controlado, sin limitar el alto del modal
   ni de la tarjeta. El scroll queda en el contenedor externo.
   ========================================================= */
.agenda-reserva-existente-wrapper {
    width: min(1220px, 100%);
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 20px clamp(36px, 6vh, 72px) 20px;
    box-sizing: border-box;
    overflow: visible;
}

.agenda-reserva-existente-card {
    height: auto;
    max-height: none;
    margin-bottom: 0;
    overflow: visible;
    box-sizing: border-box;
}

/* Modal de anulación dentro del PanelReservaExistenteAgenda */
.agenda-reserva-existente-wrapper .agenda-consulta-reserva-modal-overlay {
    align-items: center;
    justify-content: center;
    height: 100vh;
    min-height: 100vh;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 24px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.agenda-reserva-existente-wrapper .agenda-consulta-reserva-modal {
    width: min(700px, calc(100vw - 48px));
    height: auto;
    max-height: none;
    margin: 0 auto;
    overflow: visible;
    box-sizing: border-box;
}

@supports (height: 100dvh) {
    .agenda-reserva-existente-wrapper .agenda-consulta-reserva-modal-overlay {
        height: 100dvh;
        min-height: 100dvh;
    }
}

/* Compacta espaciados en resoluciones bajas, sin limitar altura */
@media (max-height: 850px) and (min-width: 769px) {
    .agenda-reserva-existente-card {
        padding: 28px 38px 30px 38px;
    }

    .agenda-reserva-existente-header {
        margin-bottom: 18px;
    }

    .agenda-reserva-existente-badge {
        margin-bottom: 10px;
        padding: 6px 13px;
    }

    .agenda-reserva-existente-header h2 {
        margin-bottom: 8px;
        font-size: clamp(24px, 3.5vh, 28px);
        line-height: 1.15;
    }

    .agenda-reserva-existente-descripcion {
        margin-top: 10px;
        padding: 10px 16px;
        font-size: 15px;
        line-height: 1.28;
    }

    .agenda-reserva-existente-item {
        padding: 18px 24px;
    }

    .agenda-reserva-existente-item-header {
        margin-bottom: 14px;
        padding-bottom: 14px;
    }

        .agenda-reserva-existente-item-header strong {
            font-size: 24px;
        }

    .agenda-reserva-existente-grid {
        gap: 10px 14px;
    }

    .agenda-reserva-existente-row {
        padding: 9px 14px;
    }

    .agenda-reserva-existente-acciones,
    .agenda-reserva-existente-footer {
        margin-top: 16px;
    }

    .agenda-reserva-existente-btn {
        min-height: 44px;
    }
}

@media (max-height: 650px) and (min-width: 769px) {
    .agenda-reserva-existente-card {
        padding: 22px 30px 26px 30px;
    }

    .agenda-reserva-existente-header {
        margin-bottom: 14px;
    }

    .agenda-reserva-existente-descripcion {
        margin-top: 8px;
    }

    .agenda-reserva-existente-item {
        padding: 16px 20px;
    }
}

@media (max-height: 620px) {
    .agenda-reserva-existente-wrapper .agenda-consulta-reserva-modal-overlay {
        padding: 12px;
    }

    .agenda-reserva-existente-wrapper .agenda-consulta-reserva-modal {
        padding: 24px 24px 28px 24px;
    }

        .agenda-reserva-existente-wrapper .agenda-consulta-reserva-modal h2 {
            margin-bottom: 16px;
            font-size: 24px;
        }

    .agenda-reserva-existente-wrapper .agenda-consulta-reserva-modal-texto {
        margin-bottom: 18px;
    }

    .agenda-reserva-existente-wrapper .agenda-consulta-reserva-modal-acciones {
        margin-top: 12px;
    }
}

@media (max-width: 600px) {
    .agenda-reserva-existente-wrapper {
        width: 100%;
        padding: 0 12px 44px 12px;
        overflow: visible;
    }

    .agenda-reserva-existente-card {
        max-height: none;
        overflow: visible;
        padding: 26px 16px 28px 16px;
    }

    .agenda-reserva-existente-wrapper .agenda-consulta-reserva-modal-overlay {
        padding: 12px;
    }

    .agenda-reserva-existente-wrapper .agenda-consulta-reserva-modal {
        width: 100%;
        max-height: none;
    }
}
/* =========================================================
   AJUSTE SOMBRA INFERIOR - PANELES INFORMATIVOS CHICOS
   Evita que el box-shadow inferior quede cortado sin agrandar
   el contenido real de las tarjetas.
   ========================================================= */

html body .agenda-proceso-wrapper {
    padding-bottom: clamp(58px, 7vh, 86px) !important;
    overflow-y: visible !important;
}

    /* Espaciador técnico al final del flujo WebForms.
   No agranda las tarjetas, solo deja respirar el sombreado inferior. */
    html body .agenda-proceso-wrapper::after {
        content: "";
        display: block;
        height: 18px;
        clear: both;
    }

/* Tarjetas chicas del flujo principal */
html body .agenda-selector-card,
html body .agenda-rut-card,
html body .agenda-intermedio-card,
html body .agenda-confirmacion-card,
html body .agenda-validacion-contacto-card {
    margin-bottom: 18px !important;
}

/* Mantiene el ancho controlado sin crear corte vertical por overflow */
@supports (overflow: clip) {
    html body .agenda-proceso-wrapper,
    html body .agenda-proceso-wrapper:has(.agenda-selector-card),
    html body .agenda-proceso-wrapper:has(.agenda-rut-card),
    html body .agenda-proceso-wrapper:has(.agenda-intermedio-card),
    html body .agenda-proceso-wrapper:has(.agenda-confirmacion-card),
    html body .agenda-proceso-wrapper:has(.agenda-validacion-contacto-card) {
        overflow-x: clip !important;
        overflow-y: visible !important;
    }
}

/* =========================================================
   AJUSTE FINAL - CALENDARIO ALINEACIÓN FECHA / INDICADOR
   Mantiene todas las fechas alineadas abajo y deja el bloque
   azul disponible separado arriba del número.
   ========================================================= */

.agenda-calendario td.agenda-calendario-day,
.agenda-calendario td.agenda-dia-disponible,
.agenda-calendario td.agenda-dia-no-disponible,
.agenda-calendario td.agenda-dia-seleccionado {
    position: relative !important;
    padding: 0 0 6px 0 !important;
    vertical-align: bottom !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

    /* El número clickeable ocupa la celda, pero se alinea abajo igual que los días no clickeables */
    .agenda-calendario td.agenda-dia-disponible a,
    .agenda-calendario td.agenda-dia-disponible a:hover,
    .agenda-calendario td.agenda-dia-disponible a:focus,
    .agenda-calendario td.agenda-dia-no-disponible a,
    .agenda-calendario td.agenda-dia-no-disponible a:hover,
    .agenda-calendario td.agenda-dia-no-disponible a:focus,
    .agenda-calendario td.agenda-dia-seleccionado a,
    .agenda-calendario td.agenda-dia-seleccionado a:hover,
    .agenda-calendario td.agenda-dia-seleccionado a:focus {
        position: absolute !important;
        inset: 0 !important;
        z-index: 3 !important;
        display: flex !important;
        align-items: flex-end !important;
        justify-content: center !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 100% !important;
        padding: 0 0 6px 0 !important;
        color: inherit !important;
        font-size: inherit !important;
        font-weight: inherit !important;
        line-height: inherit !important;
        text-align: center !important;
        text-decoration: none !important;
        box-sizing: border-box !important;
    }

    /* Indicador azul de día disponible: queda arriba, separado del número */
    .agenda-calendario td.agenda-dia-disponible::before {
        top: 4px !important;
        left: 50% !important;
        z-index: 2 !important;
        width: 11px !important;
        height: 11px !important;
        transform: translateX(-50%) !important;
    }

    /* Si por flujo queda seleccionado un día no disponible, no debe mostrar indicador azul */
    .agenda-calendario td.agenda-dia-no-disponible.agenda-dia-seleccionado::before {
        display: none !important;
    }

/* Calendarios compactos dentro de tarjeta: evita que el indicador toque el número */
@media (min-width: 769px) {
    html body .agenda-horas-card-item .agenda-calendario td.agenda-calendario-day,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-no-disponible,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-seleccionado {
        padding: 0 0 3px 0 !important;
    }

        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible a,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible a:hover,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible a:focus,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-no-disponible a,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-no-disponible a:hover,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-no-disponible a:focus,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-seleccionado a,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-seleccionado a:hover,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-seleccionado a:focus {
            padding: 0 0 3px 0 !important;
        }

        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible::before {
            top: 3px !important;
            width: 10px !important;
            height: 10px !important;
        }
}
/* =========================================================
   AJUSTE FINO - CALENDARIO ALINEACIÓN NÚMERO DISPONIBLE
   Sube levemente el número del día disponible para igualarlo
   visualmente con los días normales, sin mover el bloque azul.
   ========================================================= */

.agenda-calendario td.agenda-dia-disponible a,
.agenda-calendario td.agenda-dia-disponible a:hover,
.agenda-calendario td.agenda-dia-disponible a:focus,
.agenda-calendario td.agenda-dia-seleccionado a,
.agenda-calendario td.agenda-dia-seleccionado a:hover,
.agenda-calendario td.agenda-dia-seleccionado a:focus {
    padding-bottom: 8px !important;
}

/* Mantiene el indicador azul arriba, separado del número */
.agenda-calendario td.agenda-dia-disponible::before {
    top: 3px !important;
    width: 11px !important;
    height: 11px !important;
}
/* =========================================================
   AJUSTE FINAL MOBILE - CALENDARIO DÍAS DISPONIBLES
   Aumenta el bloque azul y da más alto a la celda para que
   el indicador quede arriba sin tocar la fecha.
   ========================================================= */

@media (max-width: 768px) {
    html body .agenda-horas-card-item .agenda-calendario td.agenda-calendario-day,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-no-disponible,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-seleccionado {
        position: relative !important;
        height: 38px !important;
        min-height: 38px !important;
        padding: 0 0 5px 0 !important;
        font-size: 15px !important;
        line-height: 15px !important;
        vertical-align: bottom !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible a,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible a:hover,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible a:focus,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-no-disponible a,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-no-disponible a:hover,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-no-disponible a:focus,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-seleccionado a,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-seleccionado a:hover,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-seleccionado a:focus {
            position: absolute !important;
            inset: 0 !important;
            z-index: 3 !important;
            display: flex !important;
            align-items: flex-end !important;
            justify-content: center !important;
            width: 100% !important;
            height: 100% !important;
            min-height: 100% !important;
            padding: 0 0 5px 0 !important;
            font-size: inherit !important;
            line-height: inherit !important;
            text-align: center !important;
            box-sizing: border-box !important;
        }

        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible::before {
            top: 5px !important;
            width: 13px !important;
            height: 13px !important;
        }
}

@media (max-width: 390px) {
    html body .agenda-horas-card-item .agenda-calendario td.agenda-calendario-day,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-no-disponible,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-seleccionado {
        height: 36px !important;
        min-height: 36px !important;
        padding-bottom: 4px !important;
        font-size: 14px !important;
        line-height: 14px !important;
    }

        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible a,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-no-disponible a,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-seleccionado a {
            padding-bottom: 4px !important;
        }

        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible::before {
            top: 5px !important;
            width: 12px !important;
            height: 12px !important;
        }
}

/* =========================================================
   AJUSTE TABLET / RESOLUCIONES INTERMEDIAS
   Corrige layout entre 769px y 1080px evitando que las 3
   columnas flex generadas desde CodeBehind se compriman.
   ========================================================= */

@media (min-width: 769px) and (max-width: 1080px) {
    html body .agenda-horas-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    html body .agenda-horas-card.agenda-horas-card-item {
        display: grid !important;
        grid-template-columns: minmax(150px, 190px) minmax(0, 1fr) !important;
        grid-template-areas:
            "info horas"
            "calendario calendario"
            "acciones acciones" !important;
        column-gap: 28px !important;
        row-gap: 26px !important;
        align-items: start !important;
        justify-content: stretch !important;
        width: min(94vw, 920px) !important;
        max-width: min(94vw, 920px) !important;
        min-width: 0 !important;
        margin: 0 auto !important;
        padding: 26px 30px 32px 30px !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }

    html body .agenda-horas-card-item .agenda-item-info-dinamico {
        grid-area: info !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 190px !important;
        justify-self: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    html body .agenda-horas-card-item .agenda-item-img {
        width: 130px !important;
        max-width: 130px !important;
        height: 170px !important;
        margin: 0 auto 12px auto !important;
        object-fit: cover !important;
        border-radius: 10px !important;
    }

    html body .agenda-horas-card-item .agenda-item-nombre {
        margin-top: 8px !important;
        font-size: 14px !important;
        line-height: 1.2 !important;
        text-align: center !important;
    }

    html body .agenda-horas-card-item .agenda-item-especialidades,
    html body .agenda-horas-card-item .agenda-item-info-medico {
        max-height: none !important;
        font-size: 11px !important;
        line-height: 1.25 !important;
        text-align: center !important;
    }

    html body .agenda-horas-card-item .agenda-item-horas-dinamico {
        grid-area: horas !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        justify-self: stretch !important;
        align-self: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    html body .agenda-horas-card-item .agenda-proxima-hora-titulo {
        display: block !important;
        margin: 0 auto 14px auto !important;
        font-size: 20px !important;
        line-height: 1.2 !important;
        text-align: center !important;
        text-transform: uppercase !important;
    }

    html body .agenda-horas-card-item .agenda-fecha-principal {
        display: block !important;
        margin: 0 auto 14px auto !important;
        font-size: 20px !important;
        line-height: 1.3 !important;
        text-align: center !important;
    }

    html body .agenda-horas-card-item .agenda-lista-horas-grupo {
        width: 100% !important;
        margin: 0 auto 12px auto !important;
        align-items: center !important;
    }

    html body .agenda-horas-card-item .agenda-lista-horas-grupo-titulo {
        width: 100% !important;
        margin: 0 auto 8px auto !important;
        font-size: 15px !important;
        line-height: 1.3 !important;
        justify-content: center !important;
        text-align: center !important;
    }

    html body .agenda-horas-card-item .agenda-lista-horas-grupo-botones {
        width: 100% !important;
        justify-content: center !important;
    }

    html body .agenda-horas-card-item .agenda-btn-hora {
        min-width: 66px !important;
        height: 32px !important;
        margin: 0 !important;
        padding: 0 10px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        grid-area: calendario !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 4px auto 0 auto !important;
        padding: 0 !important;
        justify-self: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-titulo {
        display: block !important;
        margin: 0 auto 14px auto !important;
        font-size: 20px !important;
        line-height: 1.2 !important;
        text-align: center !important;
        text-transform: uppercase !important;
    }

    html body .agenda-horas-card-item .agenda-calendario {
        width: min(380px, 100%) !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        table-layout: fixed !important;
    }

    html body .agenda-horas-card-item .agenda-acciones,
    html body .agenda-horas-card-item + .agenda-acciones,
    html body .agenda-acciones {
        grid-area: acciones !important;
        grid-column: 1 / -1 !important;
        width: 100% !important;
        justify-content: center !important;
        margin-top: 0 !important;
        box-sizing: border-box !important;
    }
}

/* =========================================================
   AJUSTE DEFINITIVO - HORAS DISPONIBLES TABLET / INTERMEDIO
   Corrige corte horizontal entre 770px y 1080px y también
   cuando el ancho útil queda reducido por sidebar.
   ========================================================= */

html body .agenda-horas-wrapper {
    container-type: inline-size;
    container-name: agenda-horas-disponibles;
}

/* Fallback por viewport: 770px hasta 1080px */
@media (min-width: 769px) and (max-width: 1080px) {
    html body .agenda-horas-card.agenda-horas-card-item {
        display: grid !important;
        grid-template-columns: minmax(112px, 140px) minmax(0, 1fr) !important;
        grid-template-areas:
            "info horas"
            "calendario calendario"
            "acciones acciones" !important;
        column-gap: 16px !important;
        row-gap: 22px !important;
        align-items: start !important;
        justify-content: stretch !important;
        width: calc(100% - 14px) !important;
        max-width: calc(100% - 14px) !important;
        min-width: 0 !important;
        margin: 0 auto !important;
        padding: 18px 16px 22px 16px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    html body .agenda-horas-card-item .agenda-item-info-dinamico {
        grid-area: info !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 140px !important;
        justify-self: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    html body .agenda-horas-card-item .agenda-item-img {
        width: 110px !important;
        max-width: 110px !important;
        height: 145px !important;
        margin: 0 auto 10px auto !important;
        object-fit: cover !important;
    }

    html body .agenda-horas-card-item .agenda-item-nombre {
        font-size: 13px !important;
        line-height: 1.2 !important;
        text-align: center !important;
        overflow-wrap: break-word !important;
    }

    html body .agenda-horas-card-item .agenda-item-especialidades,
    html body .agenda-horas-card-item .agenda-item-info-medico {
        font-size: 10px !important;
        line-height: 1.2 !important;
        text-align: center !important;
    }

    html body .agenda-horas-card-item .agenda-item-horas-dinamico {
        grid-area: horas !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        justify-self: stretch !important;
        align-self: center !important;
        padding-top: 4px !important;
        overflow: visible !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    html body .agenda-horas-card-item .agenda-proxima-hora-titulo {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto 10px auto !important;
        color: #13233D !important;
        font-size: 17px !important;
        font-weight: 700 !important;
        line-height: 1.18 !important;
        letter-spacing: 0 !important;
        text-align: center !important;
        text-transform: uppercase !important;
        white-space: normal !important;
        overflow: visible !important;
        overflow-wrap: break-word !important;
        word-break: normal !important;
        box-sizing: border-box !important;
    }

    html body .agenda-horas-card-item .agenda-fecha-principal {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto 10px auto !important;
        font-size: 17px !important;
        line-height: 1.25 !important;
        text-align: center !important;
        white-space: normal !important;
        overflow: visible !important;
    }

    html body .agenda-horas-card-item .agenda-lista-horas-grupo {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto 8px auto !important;
        align-items: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    html body .agenda-horas-card-item .agenda-lista-horas-grupo-titulo,
    html body .agenda-horas-card-item .agenda-servicio {
        width: 100% !important;
        margin: 0 auto 8px auto !important;
        font-size: 13px !important;
        line-height: 1.25 !important;
        text-align: center !important;
        justify-content: center !important;
        white-space: normal !important;
    }

    html body .agenda-horas-card-item .agenda-lista-horas-grupo-botones {
        width: 100% !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
    }

    html body .agenda-horas-card-item .agenda-btn-hora {
        min-width: 58px !important;
        height: 30px !important;
        margin: 0 !important;
        padding: 0 8px !important;
        font-size: 12px !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        grid-area: calendario !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        justify-self: center !important;
        margin: 2px auto 0 auto !important;
        overflow: hidden !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-titulo {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto 10px auto !important;
        font-size: 18px !important;
        line-height: 1.2 !important;
        text-align: center !important;
        white-space: normal !important;
        overflow: visible !important;
    }

    html body .agenda-horas-card-item .agenda-calendario {
        width: min(360px, 100%) !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        table-layout: fixed !important;
    }

    html body .agenda-horas-card-item .agenda-acciones,
    html body .agenda-horas-card-item + .agenda-acciones {
        grid-area: acciones !important;
        grid-column: 1 / -1 !important;
        width: 100% !important;
        justify-content: center !important;
        margin-top: 0 !important;
    }
}
/* =========================================================
   AJUSTE POR ANCHO REAL DEL CONTENEDOR
   Aplica aunque el viewport sea mayor, si el panel disponible
   queda angosto por sidebar/layout padre.
   ========================================================= */

@media (min-width: 769px) {
    @container agenda-horas-disponibles (max-width: 760px) {
        html body .agenda-horas-card.agenda-horas-card-item {
            display: grid !important;
            grid-template-columns: minmax(112px, 140px) minmax(0, 1fr) !important;
            grid-template-areas:
                "info horas"
                "calendario calendario"
                "acciones acciones" !important;
            column-gap: 16px !important;
            row-gap: 22px !important;
            width: calc(100% - 14px) !important;
            max-width: calc(100% - 14px) !important;
            min-width: 0 !important;
            padding: 18px 16px 22px 16px !important;
            overflow: hidden !important;
            box-sizing: border-box !important;
        }

        html body .agenda-horas-card-item .agenda-item-info-dinamico {
            grid-area: info !important;
            width: 100% !important;
            min-width: 0 !important;
            max-width: 140px !important;
            justify-self: center !important;
        }

        html body .agenda-horas-card-item .agenda-item-horas-dinamico {
            grid-area: horas !important;
            width: 100% !important;
            min-width: 0 !important;
            max-width: 100% !important;
            overflow: visible !important;
            text-align: center !important;
        }

        html body .agenda-horas-card-item .agenda-proxima-hora-titulo {
            width: 100% !important;
            max-width: 100% !important;
            font-size: 17px !important;
            line-height: 1.18 !important;
            letter-spacing: 0 !important;
            white-space: normal !important;
            overflow: visible !important;
            overflow-wrap: break-word !important;
            word-break: normal !important;
            text-align: center !important;
        }

        html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
            grid-area: calendario !important;
            width: 100% !important;
            min-width: 0 !important;
            max-width: 100% !important;
            justify-self: center !important;
            overflow: hidden !important;
        }

        html body .agenda-horas-card-item .agenda-calendario {
            width: min(360px, 100%) !important;
            max-width: 100% !important;
            margin: 0 auto !important;
        }
    }
}

/* =========================================================
   CALENDARIO TABLET / RESOLUCIÓN INTERMEDIA
   Mantiene el indicador arriba y la fecha alineada abajo
   entre 769px y 1080px, sin depender de posiciones por bottom.
   ========================================================= */
@media (min-width: 769px) and (max-width: 1080px) {
    html body .agenda-horas-card-item .agenda-calendario-box.agenda-calendario-box-item {
        width: min(400px, 100%) !important;
        max-width: 400px !important;
        justify-self: center !important;
        overflow: visible !important;
    }

    html body .agenda-horas-card-item .agenda-calendario {
        width: 100% !important;
        max-width: 400px !important;
        font-size: 14px !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-titulo {
        margin-bottom: 10px !important;
        font-size: 18px !important;
        line-height: 1.2 !important;
    }

    html body .agenda-horas-card-item .agenda-calendario-title,
    html body .agenda-horas-card-item .agenda-calendario-nav {
        height: 36px !important;
        font-size: 15px !important;
        line-height: 36px !important;
    }

        html body .agenda-horas-card-item .agenda-calendario-nav a,
        html body .agenda-horas-card-item .agenda-calendario tr:first-child td:first-child a,
        html body .agenda-horas-card-item .agenda-calendario tr:first-child th:first-child a,
        html body .agenda-horas-card-item .agenda-calendario tr:first-child td:last-child a,
        html body .agenda-horas-card-item .agenda-calendario tr:first-child th:last-child a {
            height: 36px !important;
            line-height: 36px !important;
        }

    html body .agenda-horas-card-item .agenda-calendario-day-header {
        height: 34px !important;
        line-height: 34px !important;
    }

        html body .agenda-horas-card-item .agenda-calendario-day-header::after {
            font-size: 14px !important;
            line-height: 34px !important;
        }

    html body .agenda-horas-card-item .agenda-calendario td.agenda-calendario-day,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-no-disponible,
    html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-seleccionado {
        position: relative !important;
        height: 48px !important;
        min-height: 48px !important;
        padding: 24px 0 5px 0 !important;
        color: inherit;
        font-size: 14px !important;
        line-height: 14px !important;
        text-align: center !important;
        vertical-align: bottom !important;
        box-sizing: border-box !important;
    }

        /*
        El enlace permanece dentro del flujo de la celda.
        Así comparte la misma línea base que los días no seleccionables.
    */
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible a,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible a:hover,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible a:focus,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-no-disponible a,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-no-disponible a:hover,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-no-disponible a:focus,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-seleccionado a,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-seleccionado a:hover,
        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-seleccionado a:focus {
            position: relative !important;
            inset: auto !important;
            z-index: 2 !important;
            display: block !important;
            width: 100% !important;
            height: 14px !important;
            min-height: 14px !important;
            margin: 0 !important;
            padding: 0 !important;
            font-size: 14px !important;
            line-height: 14px !important;
            text-align: center !important;
            transform: none !important;
            box-sizing: border-box !important;
        }

        html body .agenda-horas-card-item .agenda-calendario td.agenda-dia-disponible::before {
            top: 6px !important;
            bottom: auto !important;
            left: 50% !important;
            width: 11px !important;
            height: 11px !important;
            transform: translateX(-50%) !important;
        }
}

/* =========================================================
   RESERVA CONFIRMADA - DIRECCIÓN DESPLEGABLE
   El botón permanece fijo a la derecha y el mapa crece debajo.
   ========================================================= */
.agenda-reserva-final-card .agenda-reserva-final-footer {
    position: relative;
    display: block !important;
    width: 100%;
    min-height: 42px;
    margin-top: 18px;
    box-sizing: border-box;
}

.agenda-reserva-final-card .agenda-reserva-final-mensaje {
    display: block;
    width: 100%;
    min-height: 42px;
    padding-right: 424px;
    box-sizing: border-box;
}

.agenda-reserva-final-card .agenda-reserva-final-direccion-desplegable {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.agenda-reserva-final-card .agenda-reserva-final-direccion-details {
    position: static;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-sizing: border-box;
}

.agenda-reserva-final-card .agenda-reserva-final-direccion-summary {
    position: absolute;
    top: 0;
    right: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 396px;
    max-width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 8px 18px;
    border: 1px solid #4b5fc7;
    border-radius: 0 10px 10px 10px;
    background: #ffffff;
    color: #4b5fc7;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
    list-style: none !important;
    cursor: pointer;
    user-select: none;
    box-sizing: border-box;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}

    .agenda-reserva-final-card .agenda-reserva-final-direccion-summary::-webkit-details-marker {
        display: none !important;
    }

    .agenda-reserva-final-card .agenda-reserva-final-direccion-summary::marker {
        content: "" !important;
        display: none !important;
        font-size: 0 !important;
    }

    .agenda-reserva-final-card .agenda-reserva-final-direccion-summary:hover,
    .agenda-reserva-final-card .agenda-reserva-final-direccion-summary:focus {
        background: #f4f6ff;
        color: #4054bd;
        border-color: #4054bd;
        outline: none;
    }

.agenda-reserva-final-card .agenda-reserva-final-direccion-icono {
    position: relative;
    display: inline-flex;
    flex: 0 0 16px;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: inherit;
    line-height: 1;
    transform: scaleY(1);
    transform-origin: 50% 50%;
    transition: transform .18s ease;
}

    .agenda-reserva-final-card .agenda-reserva-final-direccion-icono::before {
        content: "";
        display: block;
        width: 7px;
        height: 7px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg) translate(-1px, -1px);
        transform-origin: 50% 50%;
        box-sizing: border-box;
    }

.agenda-reserva-final-card .agenda-reserva-final-direccion-details[open] .agenda-reserva-final-direccion-icono {
    transform: scaleY(-1);
}

.agenda-reserva-final-card .agenda-reserva-final-direccion-contenido {
    display: block;
    width: 100%;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #d9deee;
    box-sizing: border-box;
    animation: agenda-reserva-final-direccion-aparecer .22s ease;
}

.agenda-reserva-final-card .agenda-reserva-final-direccion-details:not([open]) .agenda-reserva-final-direccion-contenido {
    display: none;
}

.agenda-reserva-final-card .agenda-reserva-final-direccion-contenido .agenda-reserva-final-mapa-card {
    width: 100%;
    margin: 0;
}

@keyframes agenda-reserva-final-direccion-aparecer {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .agenda-reserva-final-card .agenda-reserva-final-footer {
        min-height: 0;
        margin-top: 14px;
    }

    .agenda-reserva-final-card .agenda-reserva-final-mensaje {
        min-height: 0;
        padding-right: 0;
    }

    .agenda-reserva-final-card .agenda-reserva-final-direccion-desplegable {
        margin-top: 14px;
    }

    .agenda-reserva-final-card .agenda-reserva-final-direccion-summary {
        position: static;
        width: 100%;
        min-height: 44px;
        padding: 9px 14px;
        font-size: 17px;
    }

    .agenda-reserva-final-card .agenda-reserva-final-direccion-contenido {
        margin-top: 8px;
        padding-top: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .agenda-reserva-final-card .agenda-reserva-final-direccion-contenido {
        animation: none;
    }

    .agenda-reserva-final-card .agenda-reserva-final-direccion-icono {
        transition: none;
    }
}


/* =========================================================
   DISPONIBILIDAD - VOLVER DESDE MÉDICO/FECHA SELECCIONADA
   Variante compacta del selector principal.
   Funciona con agenda-btn-volver-listado sola o combinada.
   ========================================================= */
.agenda-listado-principal-acciones {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 1080px;
    margin: 10px auto 0 auto;
    padding: 0 18px;
    box-sizing: border-box;
}

    .agenda-listado-principal-acciones .agenda-btn-volver-listado {
        display: block;
        width: min(720px, 100%);
        min-height: 38px;
        margin: 0 auto;
        padding: 7px 18px;
        border: 1px solid rgba(255, 255, 255, .7);
        border-radius: 0 10px 10px 10px;
        background: #4d61c6;
        color: #ffffff;
        box-shadow: 2px 3px 0 #283b91;
        font-size: 17px;
        font-weight: 600;
        line-height: 1.15;
        text-align: center;
        cursor: pointer;
        box-sizing: border-box;
        transition: background .18s ease, box-shadow .18s ease;
    }

        .agenda-listado-principal-acciones .agenda-btn-volver-listado:hover,
        .agenda-listado-principal-acciones .agenda-btn-volver-listado:focus {
            background: #4054bd;
            color: #ffffff;
            text-decoration: none;
            outline: none;
        }

@media (max-width: 768px) {
    .agenda-listado-principal-acciones {
        padding: 0 10px;
    }

        .agenda-listado-principal-acciones .agenda-btn-volver-listado {
            width: 100%;
            min-height: 40px;
            padding: 8px 14px;
            font-size: 16px;
        }
}
/* Agregar al final de AgendaOnlineElements.css */

.agenda-doble-seleccion-detalles {
    display: block;
    align-self: stretch;
    width: 100%;
    max-width: 560px;
    margin: 24px auto;
    padding: 0 16px;
    box-sizing: border-box;
    color: #111827;
}

.agenda-doble-seleccion-detalle-titulo {
    display: block;
    width: 100%;
    margin: 0 0 22px;
    color: #111827 !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    box-sizing: border-box;
}

.agenda-doble-seleccion-detalle {
    display: flex !important;
    align-self: stretch;
    align-items: flex-start;
    width: 100%;
    margin: 0 0 10px;
    padding: 0;
    gap: 12px;
    box-sizing: border-box;
    color: #111827 !important;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.35;
    text-align: left !important;
}

.agenda-doble-seleccion-detalle-texto {
    display: block;
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: #111827 !important;
    line-height: 1.35;
    text-align: left !important;
}

.agenda-doble-seleccion-detalle-icono {
    display: inline-flex;
    flex: 0 0 20px;
    align-items: flex-start;
    justify-content: center;
    width: 20px;
    min-width: 20px;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}

.agenda-doble-seleccion-detalle-icono--incluido {
    color: #078b1a !important;
}

.agenda-doble-seleccion-detalle-icono--no-incluido {
    color: #e00000 !important;
}

@media (max-width: 767px) {
    .agenda-doble-seleccion-detalles {
        margin: 18px auto;
        padding: 0;
    }

    .agenda-doble-seleccion-detalle-titulo,
    .agenda-doble-seleccion-detalle {
        font-size: 15px;
    }
}

/* =========================================================
   PANEL SIN HORAS DISPONIBLES
   ========================================================= */
.agenda-horas-card.agenda-sin-horas-card {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: min(760px, calc(100% - 32px)) !important;
    max-width: 900px !important;
    min-width: 0 !important;
    min-height: 100px !important;
    margin: 0 auto !important;
    padding: 42px 28px !important;
    box-sizing: border-box !important;
}

.agenda-sin-horas-contenido {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    color: #777777;
    text-align: center;
    box-sizing: border-box;
}

/* Icono calendario sin dependencia externa */
.agenda-sin-horas-icono {
    position: relative;
    display: block;
    width: 92px;
    height: 76px;
    margin: 8px auto 24px auto;
    border: 6px solid currentColor;
    border-radius: 9px;
    color: #777777;
    box-sizing: border-box;
}

    .agenda-sin-horas-icono::before {
        content: "";
        position: absolute;
        top: 18px;
        left: -6px;
        width: calc(100% + 12px);
        border-top: 6px solid currentColor;
        box-sizing: border-box;
    }

    .agenda-sin-horas-icono::after {
        content: "";
        position: absolute;
        top: -14px;
        left: 20px;
        width: 6px;
        height: 25px;
        border-radius: 6px;
        background: currentColor;
        box-shadow: 40px 0 0 currentColor;
    }

.agenda-sin-horas-titulo {
    display: block;
    margin: 0 0 8px 0;
    color: #777777;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.agenda-sin-horas-card .agenda-sin-horas {
    display: block;
    margin: 0;
    color: #777777;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
}

@media (max-width: 600px) {
    .agenda-horas-card.agenda-sin-horas-card {
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        min-height: 250px !important;
        padding: 34px 20px !important;
    }

    .agenda-sin-horas-icono {
        width: 72px;
        height: 62px;
        margin-bottom: 20px;
        border-width: 5px;
        border-radius: 8px;
    }

        .agenda-sin-horas-icono::before {
            top: 15px;
            left: -5px;
            width: calc(100% + 10px);
            border-top-width: 5px;
        }

        .agenda-sin-horas-icono::after {
            top: -12px;
            left: 15px;
            width: 5px;
            height: 21px;
            box-shadow: 32px 0 0 currentColor;
        }

    .agenda-sin-horas-titulo {
        font-size: 23px;
    }

    .agenda-sin-horas-card .agenda-sin-horas {
        font-size: 16px;
    }
}

/* =========================================================
   DISPONIBILIDAD - NAVEGACIÓN RESPONSIVE Y SUBESPECIALIDADES
   Escritorio conserva la barra horizontal. Hasta 1100px se
   reemplaza únicamente la navegación por un menú desplegable.
   Los paneles funcionales permanecen compartidos.
   ========================================================= */
html body .agenda-disponibilidad-filtros {
    display: block !important;
    width: min(1120px, calc(100% - 32px)) !important;
    max-width: 1120px !important;
    min-width: 0 !important;
    margin: 0 auto 34px auto !important;
    box-sizing: border-box !important;
}

html body .agenda-disponibilidad-filtros-desktop {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: clamp(8px, 1vw, 18px);
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

    html body .agenda-disponibilidad-filtros-desktop .agenda-disponibilidad-filtro-btn {
        flex: 0 1 214px;
        width: 214px !important;
        min-width: 0 !important;
        max-width: none !important;
        height: clamp(34px, 2.6vw, 42px) !important;
        margin: 0 !important;
        padding: 0 clamp(6px, .8vw, 12px) !important;
        font-size: clamp(14px, .75vw, 14px) !important;
        line-height: 1 !important;
        white-space: nowrap !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    html body .agenda-disponibilidad-filtros-desktop > .agenda-disponibilidad-filtro-btn:first-child {
        flex-basis: 310px;
        width: 310px !important;
    }

.agenda-disponibilidad-filtro-btn-deshabilitado,
.agenda-disponibilidad-filtro-btn-deshabilitado:hover,
.agenda-disponibilidad-filtro-btn-deshabilitado:focus {
    border-color: #b9bfdc !important;
    background: #f5f6fb !important;
    color: #999999 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: .78;
}

.agenda-disponibilidad-menu-mobile {
    display: none;
}

.agenda-subespecialidades-disponibilidad {
    width: min(760px, calc(100% - 32px)) !important;
    max-width: 760px !important;
    margin: 0 auto 28px auto !important;
    box-sizing: border-box !important;
}

    .agenda-subespecialidades-disponibilidad .agenda-subespecialidad-disponibilidad-btn {
        border-radius: 0 10px 10px 10px;
    }

        .agenda-subespecialidades-disponibilidad .agenda-subespecialidad-disponibilidad-btn small:empty {
            display: none;
        }

@media (max-width: 1100px) {
    html body .agenda-disponibilidad-filtros {
        width: min(560px, calc(100% - 20px)) !important;
        margin-bottom: 24px !important;
    }

    html body .agenda-disponibilidad-filtros-desktop {
        display: none !important;
    }

    .agenda-disponibilidad-menu-mobile {
        display: block !important;
        width: 100%;
        margin: 0;
        padding: 0;
        border: 0;
        box-sizing: border-box;
    }

    .agenda-disponibilidad-menu-mobile-resumen {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 46px;
        padding: 10px 48px 10px 18px;
        border: 1px solid #4b5fc7;
        border-radius: 10px;
        background: #ffffff;
        color: #4b5fc7;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.25;
        text-align: center;
        cursor: pointer;
        list-style: none;
        box-sizing: border-box;
    }

        .agenda-disponibilidad-menu-mobile-resumen::-webkit-details-marker {
            display: none;
        }

        .agenda-disponibilidad-menu-mobile-resumen::after {
            content: "";
            position: absolute;
            top: 50%;
            right: 18px;
            width: 12px;
            height: 12px;
            border-right: 2px solid #26304f;
            border-bottom: 2px solid #26304f;
            transform: translateY(-65%) rotate(45deg);
            transition: transform .15s ease;
            pointer-events: none;
        }

    .agenda-disponibilidad-menu-mobile[open] .agenda-disponibilidad-menu-mobile-resumen {
        border-radius: 10px 10px 0 0;
    }

        .agenda-disponibilidad-menu-mobile[open] .agenda-disponibilidad-menu-mobile-resumen::after {
            transform: translateY(-25%) rotate(225deg);
        }

    .agenda-disponibilidad-menu-mobile-opciones {
        width: 100%;
        border-right: 1px solid #4b5fc7;
        border-bottom: 1px solid #4b5fc7;
        border-left: 1px solid #4b5fc7;
        border-radius: 0 0 10px 10px;
        background: #ffffff;
        overflow: hidden;
        box-sizing: border-box;
    }

    .agenda-disponibilidad-menu-mobile-opcion,
    .agenda-disponibilidad-menu-mobile-opcion:hover,
    .agenda-disponibilidad-menu-mobile-opcion:focus {
        display: block;
        width: 100%;
        min-height: 43px;
        margin: 0;
        padding: 11px 16px;
        border: 0;
        border-bottom: 1px solid #dfe3f1;
        background: #ffffff;
        color: #26304f;
        font-size: 16px;
        font-weight: 500;
        line-height: 1.25;
        text-align: center;
        text-decoration: none;
        box-sizing: border-box;
    }

        .agenda-disponibilidad-menu-mobile-opcion:last-child {
            border-bottom: 0;
        }

        .agenda-disponibilidad-menu-mobile-opcion.activo,
        .agenda-disponibilidad-menu-mobile-opcion.activo:hover,
        .agenda-disponibilidad-menu-mobile-opcion.activo:focus {
            background: #4b5fc7;
            color: #ffffff;
            font-weight: 700;
        }

    .agenda-disponibilidad-menu-mobile-opcion-deshabilitada,
    .agenda-disponibilidad-menu-mobile-opcion-deshabilitada:hover,
    .agenda-disponibilidad-menu-mobile-opcion-deshabilitada:focus {
        background: #f5f6fb !important;
        color: #999999 !important;
        cursor: not-allowed !important;
    }

    .agenda-subespecialidades-disponibilidad {
        width: calc(100% - 20px) !important;
        max-width: 560px !important;
        padding: 32px 20px !important;
    }

        .agenda-subespecialidades-disponibilidad h2 {
            margin-bottom: 20px;
            font-size: 23px;
        }

        .agenda-subespecialidades-disponibilidad p {
            margin-bottom: 20px;
            font-size: 20px;
        }

        .agenda-subespecialidades-disponibilidad .agenda-subespecialidad-disponibilidad-btn {
            width: 100%;
            margin-top: 14px;
            padding: 11px 14px;
            font-size: 19px;
            box-shadow: none;
        }

            .agenda-subespecialidades-disponibilidad .agenda-subespecialidad-disponibilidad-btn small {
                font-size: 16px;
            }
}

@media (max-width: 480px) {
    .agenda-disponibilidad-menu-mobile-resumen,
    .agenda-disponibilidad-menu-mobile-opcion,
    .agenda-disponibilidad-menu-mobile-opcion:hover,
    .agenda-disponibilidad-menu-mobile-opcion:focus {
        font-size: 15px;
    }

    .agenda-subespecialidades-disponibilidad {
        padding: 26px 16px !important;
    }

        .agenda-subespecialidades-disponibilidad h2 {
            font-size: 21px;
        }

        .agenda-subespecialidades-disponibilidad p {
            font-size: 18px;
        }

        .agenda-subespecialidades-disponibilidad .agenda-subespecialidad-disponibilidad-btn {
            font-size: 17px;
        }
}
