body{
    padding: 0px;
    margin: 0px;
}
.fondoApp{
    position: fixed;
    width: 100%;
    height: 100%;
    left: 0px;
    top: 0px;
    z-index: -1;
    display: none;
    object-fit: cover;
}
#tamCell{ display: none; }
#imgLogo{
    display: inline-block;
    max-width: 240px;
}
.cont_ppal{
    display: block;
    padding: 10px;
    text-align: center;
}

.btn_atras:hover{
    font-weight: normal;
    background-color: black;
}
#tit_pag,.lbl_text,#sub_titl{
    font-size: 1.5em;    
    font-weight: bold;
} 
#tit_pag,#sub_titl{
    max-width: 85%;
}
.lbl_text{
    font-size: 1.5em;
    opacity: 0.8;
}
#preloader_01{
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: black;
    opacity: 0.4;
    left: 0px;
    top: 0px;
    z-index: 10000;
    display: none;
}
#preloader_02{
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 10001;
    display: none;
    margin-left: -50px;
}
.buttDisabled{
    opacity: 0.3;
    font-weight: normal !important;
}
.btn_siguiente{
    font-weight: bold;   
}
#num_intentos{
    color: red;
}
.texOblig{
    color: red !important;
    font-size: 1.3em;
}
#msgErrgroup{
    display: none;
}
.widthAll{
    width: 96% !important;
    text-align: center;
    text-decoration: none !important;
}
.contListin{
    width: 100%;
    padding: 7px;
    margin-bottom: 10px;
}

/* ---------- Encabezado de clasificación + separador ornamental.
   Scopeado a ".contListin h2"/".contListin h2 + hr" (el <hr> que sigue
   inmediatamente al <h2> de cada clasificación en getServicios()) para
   no afectar ningún otro h2/hr de la aplicación. Sin cambios de HTML:
   el <hr> existente se reutiliza y se decora con su propio fondo +
   pseudo-elemento ::before. ---------- */
.contListin h2{
    text-align: center;
    font-size: clamp(15px, 3.5vw, 19px);
    font-weight: 500;
    margin: 0 0 4px;
}
.contListin h2 + hr{
    display: block;
    box-sizing: border-box;
    width: clamp(150px, 46vw, 220px);
    height: 22px;
    margin: 6px auto 12px;
    border: none;
    background:
        linear-gradient(to right, transparent, rgba(180,120,60,.55) 75%) left center / calc(50% - 20px) 1px no-repeat,
        linear-gradient(to left, transparent, rgba(180,120,60,.55) 75%) right center / calc(50% - 20px) 1px no-repeat;
    position: relative;
}
.contListin h2 + hr::before{
    content: "\f5bb"; /* fa-spa */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    line-height: 1;
}
/*----------------- ESTILOS CALENDARIO -------------------------*/
#cont_calendario{
    display: inline-block;
    width: 70%;
    margin-top: 1.5em;
    padding-top: 0.5em;
    padding: 1px;
    min-width: 320px;
}
#contMesSelect{
  display: block;
  width: 99.99%;
  height: auto;
  color: white;
  font-size: 1.5em;
  padding-top: 7px;
  padding-bottom: 7px;
  margin-top: 0.5em;
  float: left;
  text-align: center;
}
#cont_calendario table tr th{
    color: white;
    font-size: 1.4em;
    text-align: center;
    padding: 7px;
}
#cont_calendario table tr td{
    height: 100px;    
}
.celdaBase{
   width: 95%;
   height: 95%;
   display: inline-block;
   text-decoration: none;   
   text-align: left;
   position: relative;
   background-color: white;
   
}
.selCelda{
    background-color: #F2F2F2;
}
.hoverCelda:hover{
    background-color: #F4F6F7;
}
.noSeleccionable{
    opacity: 0.4;
}
.resDiaActual{
    background-color: #FCF3CF;
}
.celdaBase label:hover{
    cursor: pointer;
}
#mes_atras,#mes_adelante{
    height: 30px;
    margin: 0px 7px;
    opacity: 0.8;
}
#mes_atras:hover,#mes_adelante:hover{
    cursor: pointer;
    text-decoration: underline;
    opacity: 1;
} 
#fecha_ultima_compra{
    font-size: 1.5em;
}
/*-----------------------------------------------------*/
.btn_siguiente{
  box-shadow: 0px 0px 10px #FFBF00;
  animation: infinite resplandorAnimation 2s;  
}
@keyframes resplandorAnimation {
  0%,100%{ box-shadow: 0px 0px 10px #FFBF00; }
  50%{ box-shadow: 0px 0px 0px; }
}  
/*---------- Configuración de Formulario -------------*/ 
.cont_form{
    border-radius: 10px;
    padding: 10px 35px;
    text-align: left !important;
    margin: 0px;
}
#btnEnviaSms{
    padding: 7px;
    font-size: 1.2em;
}   
#lnkCrearCuenta{
    float: left;  
    margin-top: 10px;    
    font-size: 1.15em;
}
.partRight,.partLeft{
    padding: 0px; 
}   
.partRight button{
    float: right;
    margin: 0px !important;
}
.partLeft button{
    float: left;
    margin: 0px !important;
}
.text-danger img{
    width: 15px;
    margin-right: 8px;
}
.vizHidden{
    display: none;
}
.hiddPadLeft{ padding-left: 0px; }
.hiddPadRig{ padding-right: 0px; }

/*------------------------------------------------------------------*/

        .May{ text-transform: uppercase; }

        /* ---------- Selector de idioma y menú de usuario: apariencia
           compartida por TODAS las vistas. Por defecto viven dentro de
           topBarNav (arriba); en las 6 vistas del flujo de servicios
           (body.reservaFlowNav) se reposicionan al pie (ver más abajo),
           conservando exactamente la misma apariencia. ---------- */

        #headApp{
            position: fixed;
            left: 0px;
            top: 0px;
            bottom: auto;
            width: 100%;
            height: calc(52px + env(safe-area-inset-top));
            display: flex;
            align-items: center;
            justify-content: flex-end;
            z-index: 90003;
            pointer-events: none;
        }
        #headApp .btn-group{
            float: none;
            margin-right: clamp(10px, 4vw, 20px);
            margin-top: env(safe-area-inset-top);
            pointer-events: auto;
        }
        #headApp .dropdown-toggle{
            width: 44px;
            height: 44px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            margin: 0;
            border-radius: 50%;
            background: #fffaf5 !important;
            border: 1px solid #e2c9a0;
            box-shadow: 0 2px 6px rgba(70,35,15,.12);
            color: #a0522d !important;
        }
        #headApp .glyphicon-user{
            background: transparent !important;
            border: none !important;
            color: #a0522d !important;
            font-size: 18px;
        }
        #headApp .caret{
            margin-left: 3px;
            border-top-color: #a0522d;
        }
        #headApp .dropdown-menu{
            top: 100%;
            margin-top: 8px;
            right: 0;
            left: auto;
            background: #ffffff;
            border-radius: 12px;
            box-shadow: 0 8px 28px rgba(0,0,0,.22);
            /* #helpLnk usa z-index: 9999999 (ver más abajo); el menú debe
               quedar siempre por encima de esa tarjeta cuando se despliega. */
            z-index: 10000010;
            overflow: hidden;
        }
        #headApp .dropdown-menu li a{
            min-height: 40px;
            display: flex;
            align-items: center;
            padding: 0 16px;
            color: #4a4a4a;
        }

        #langChanger {
            position: fixed;
            left: 50%;
            top: calc(env(safe-area-inset-top) + 5px);
            bottom: auto;
            transform: translateX(-50%);
            margin-left: 0;
            z-index: 90001;
            width: clamp(165px, 46vw, 200px);
            /* 44px para alinear verticalmente con btnCerrarPanel y el círculo
               de #headApp (ambos 44px) en la barra superior */
            height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 0 14px;
            border-radius: 999px;
            background: #fffaf5;
            border: 1px solid #e8d7bf;
            box-shadow: 0 2px 10px rgba(70,35,15,.12);
            opacity: 1;
            color: #566573;
        }
        #langChanger::before{
            content: "\f0ac"; /* fa-globe */
            font-family: "Font Awesome 5 Free","FontAwesome";
            font-weight: 900;
            color: #c9711f;
            font-size: 15px;
            margin-right: 2px;
        }
        #langChanger a{
            text-decoration: none;
            color: #90999f;
            font-weight: 400;
            cursor: pointer;
            padding: 4px 2px;
        }
        #langChanger a:focus-visible{
            outline: 2px solid #c98a4b;
            outline-offset: 2px;
        }
        .selLang{
            color: #6b4423 !important;
            font-weight: 600 !important;
            text-decoration: none !important;
        }
        button div,.inline,.date_text div{display: inline-block;}
        .lblResum{
            color: black !important;
            background-color: #e7e4e4;            
        }

        #helpLnk{
            bottom: 60px;
            position: fixed;
            left: 0px;
            width: 100%;
            min-height: 35px;
            z-index: 9999999;
            background-color: white;
            text-align: center;
            padding: 5px;
            opacity: 0.9;
        }
        #helpLnk a{
            display: block;
            padding: 5px;
        }
        #helpLnk:hover{
            cursor: pointer;
            opacity: 1;
        }

        /* ---------- Tarjeta "Recomienda y Gana" (.rycCard): reemplaza
           visualmente el aviso verde/full-width anterior por una tarjeta
           flotante compacta y centrada. Todo está scopeado por la clase
           .ryc* para no afectar el otro uso de #helpLnk (enlace simple de
           ayuda de servicios en la vista lista_servicios). ---------- */
        #helpLnk:has(.rycCard){
            opacity: 1;
            background: transparent;
            padding: 0;
        }
        #helpLnk .rycCard{
            display: flex;
            align-items: center;
            gap: clamp(12px, 2.5vw, 20px);
            width: 90%;
            max-width: 980px;
            margin: 0 auto;
            background: #fffdf9;
            border: 1px solid rgba(198,140,80,.25);
            border-radius: 20px;
            box-shadow: 0 8px 24px rgba(45,28,16,.10);
            padding: clamp(10px, 2vw, 14px) clamp(16px, 3vw, 24px);
            text-align: left;
            min-height: 82px;
            cursor: default;
        }
        #helpLnk .rycTop{
            display: flex;
            align-items: center;
            gap: 14px;
            flex: 1 1 auto;
            min-width: 0;
        }
        #helpLnk .rycIconWrap{
            flex: none;
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: #f5efe6;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        #helpLnk .rycIcon{
            font-size: 24px;
            color: #c9711f;
            line-height: 1;
        }
        #helpLnk .rycText{
            flex: 1 1 auto;
            min-width: 0;
        }
        #helpLnk .rycTitle{
            font-weight: 700;
            color: #2b2118;
            font-size: 20px;
            line-height: 1.25;
            margin: 0 0 2px;
        }
        #helpLnk .rycDesc{
            font-size: 14px;
            line-height: 1.35;
            color: #766a5d;
            font-weight: 400;
            margin: 0;
        }
        #helpLnk .rycCta{
            flex: none;
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 180px;
            height: 44px;
            background: #ffffff;
            border: 1.5px solid #c9711f;
            border-radius: 999px;
            color: #a0522d;
            font-weight: 600;
            font-size: 15px;
            text-decoration: none;
            padding: 0 30px 0 16px;
            transition: background-color .18s ease, box-shadow .18s ease, border-color .18s ease, transform .1s ease;
        }
        #helpLnk .rycCta:hover,
        #helpLnk .rycCta:focus{
            background: #fff3e6;
            border-color: #8a3f1c;
            box-shadow: 0 3px 10px rgba(70,35,15,.14);
            color: #8a3f1c;
            text-decoration: none;
        }
        #helpLnk .rycCta:active{
            transform: scale(.98);
        }
        #helpLnk .rycCta:focus-visible{
            outline: 2px solid #c9711f;
            outline-offset: 2px;
        }
        #helpLnk .rycChevron{
            position: absolute;
            right: 14px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 14px;
            color: inherit;
        }

        @media(max-width:575.98px){
            #helpLnk .rycCard{
                flex-direction: column;
                align-items: stretch;
                gap: 8px;
                min-height: 0;
                padding: 10px 14px;
                width: 92%;
            }
            #helpLnk .rycIconWrap{
                width: 42px;
                height: 42px;
            }
            #helpLnk .rycIcon{
                font-size: 18px;
            }
            #helpLnk .rycTitle{
                font-size: 16px;
            }
            #helpLnk .rycDesc{
                font-size: 13px;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }
            #helpLnk .rycCta{
                width: 100%;
                height: 44px;
            }
        }

        /* ---------- Tarjeta "Ver detalles de los servicios" (.svcHelpCard):
           reemplaza visualmente el enlace de texto plano anterior
           (helpLnk con el PDF de ayuda) por una tarjeta compacta. Scopeada
           por .svcHelp* para no afectar el otro contenido de #helpLnk
           (.rycCard en la vista de tipos de servicio). ---------- */
        #helpLnk:has(.svcHelpCard){
            opacity: 1;
            background: transparent;
            padding: 0;
        }
        #helpLnk .svcHelpCard{
            display: flex;
            align-items: center;
            gap: clamp(10px, 2.5vw, 18px);
            width: 90%;
            max-width: 980px;
            margin: 0 auto;
            background: #fffdf9;
            border: 1px solid rgba(198,140,80,.25);
            border-radius: 20px;
            box-shadow: 0 6px 18px rgba(45,28,16,.09);
            padding: clamp(8px, 1.8vw, 12px) clamp(14px, 2.5vw, 20px);
            text-align: left;
            min-height: 74px;
            cursor: default;
        }
        #helpLnk .svcHelpTop{
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 1 1 auto;
            min-width: 0;
        }
        #helpLnk .svcHelpIconWrap{
            flex: none;
            width: 54px;
            height: 54px;
            border-radius: 50%;
            background: #f5efe6;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        #helpLnk .svcHelpIcon{
            font-size: 21px;
            color: #c9711f;
            line-height: 1;
        }
        #helpLnk .svcHelpText{
            flex: 1 1 auto;
            min-width: 0;
        }
        #helpLnk .svcHelpTitle{
            font-weight: 700;
            color: #2b2118;
            font-size: 18px;
            line-height: 1.25;
            margin: 0 0 2px;
        }
        #helpLnk .svcHelpDesc{
            font-size: 13px;
            line-height: 1.3;
            color: #766a5d;
            font-weight: 400;
            margin: 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        #helpLnk .svcHelpCta{
            flex: none;
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 160px;
            height: 42px;
            background: #ffffff;
            border: 1.5px solid #c9711f;
            border-radius: 999px;
            color: #a0522d;
            font-weight: 600;
            font-size: 14px;
            text-decoration: none;
            padding: 0 26px 0 14px;
            transition: background-color .18s ease, box-shadow .18s ease, border-color .18s ease, transform .1s ease;
        }
        #helpLnk .svcHelpCta:hover,
        #helpLnk .svcHelpCta:focus{
            background: #fff3e6;
            border-color: #8a3f1c;
            box-shadow: 0 3px 9px rgba(70,35,15,.13);
            color: #8a3f1c;
            text-decoration: none;
        }
        #helpLnk .svcHelpCta:active{
            transform: scale(.98);
        }
        #helpLnk .svcHelpCta:focus-visible{
            outline: 2px solid #c9711f;
            outline-offset: 2px;
        }
        #helpLnk .svcHelpChevron{
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 13px;
            color: inherit;
        }

        @media(max-width:575.98px){
            #helpLnk .svcHelpCard{
                flex-direction: column;
                align-items: stretch;
                gap: 8px;
                min-height: 0;
                padding: 8px 12px;
                width: 92%;
            }
            #helpLnk .svcHelpIconWrap{
                width: 40px;
                height: 40px;
            }
            #helpLnk .svcHelpIcon{
                font-size: 17px;
            }
            #helpLnk .svcHelpTitle{
                font-size: 16px;
            }
            #helpLnk .svcHelpDesc{
                font-size: 13px;
            }
            #helpLnk .svcHelpCta{
                width: 100%;
                height: 44px;
            }
        }

@media(max-width:990px)
{
    .hiddPadLeft{ padding-left: 0px; padding-right: 0px; }
    .hiddPadRig{ padding-left: 0px; padding-right: 0px; }
}    
@media(max-width:730px)
{
    #cont_calendario{
      width: 90%;
    }  
    #cont_calendario table tr td{
        height: 70px;
    } 
    .lblNumDia{
        margin-top: 1em;
    }            
}
@media(max-width:600px){
    #tamCell{ display: inline-block; } 
    .cont_ppal{
        padding: 0px;              
    } 
    .cont_elmt{
        margin: 5px 5px;    
        width: 90%;
        font-size: 1.5em;
    }
    #tit_pag,#sub_titl{
        padding: 10px 0px;
        font-size: 1.75em;
    }
    #cont_calendario{
        padding-top: 0px;
    }  
    .date_text,.lbl_text{
        font-size: 1.2em;
    }
    h3{ font-size: 1.2em; }
    h4{ font-size: 1em; }    
    .cont_form{ padding: 20px; }    

    input,select{
        font-size: 1.3em !important;
    }  
}  

@media(max-width:550px)
{

    #cont_calendario table tr th{
        font-size: 1em;
    }
    #cont_calendario table tr td{
        height: 50px;
        min-width: 40px;
    }
    .lblNumDia{
        margin-top: 0.8em;
        font-size: 1em;
    }
}

/* =====================================================================
   REDISEÑO MÓVIL — Barra superior fija (topBarNav/btnCerrarPanel/Anterior/
   Siguiente) + panelPie (calendario/idioma/usuario).
   La barra superior (topBarNav + btnCerrarPanel) aparece en TODAS las
   vistas de la aplicación. Anterior/Siguiente solo existen dentro de
   .panelPie, que a su vez solo está presente en las 6 vistas del flujo
   de selección de servicios (select_tipo_servicios, lista_servicios,
   listar_empleados, lista_horarios, resumen_reservacion,
   ver_reservacion_pendiente); si una vista no tiene esos botones, la
   barra superior muestra únicamente btnCerrarPanel.
   El rediseño de panelPie (pie con calendario/idioma/usuario) sigue
   acotado a esas mismas 6 vistas mediante body.reservaFlowNav, para no
   afectar el resto de pantallas del módulo (teléfono, password, SMS,
   alta de cuenta, etc).
   Los ids/clases/eventos originales (btn_cancel, btn_app, btn_siguiente,
   langChanger, headApp, panelPie...) se conservan intactos: aquí solo
   se reposicionan y restilizan vía CSS.
   ===================================================================== */

body{
    padding-top: calc(56px + env(safe-area-inset-top) + 10px);
}

/* ---------- Fondo de la barra superior (todas las vistas) ---------- */
#topBarNav{
    position: fixed;
    top: 0; left: 0; right: 0;
    height: calc(52px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    background: rgba(255,255,255,.88);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(70,35,15,.08);
    box-shadow: 0 3px 12px rgba(70,35,15,.08);
    z-index: 90000;
    pointer-events: none;
}
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
    #topBarNav{ background: rgba(255,255,255,.97); }
}

/* ---------- Oculta headApp/btnCerrarPanel cuando la sesión está cerrada
   (script.js alterna .vizHidden). #headApp fija su propio "display" por
   ID, con especificidad mayor a ".vizHidden{display:none}"; sin este
   refuerzo, .vizHidden no lograba ocultarlo. ---------- */
#headApp.vizHidden,
#btnCerrarPanel.vizHidden{
    display: none !important;
}

/* ---------- Botón Cerrar (extremo izquierdo de la barra superior, todas las vistas) ---------- */
.btnCerrarPanel{
    position: fixed;
    top: calc(env(safe-area-inset-top) + 5px);
    left: clamp(10px, 4vw, 20px);
    z-index: 90002;
    width: 48px;
    height: 44px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fffaf5;
    border: 1px solid #e2c9a0;
    border-radius: 11px;
    box-shadow: 0 2px 6px rgba(70,35,15,.12);
    color: #a0522d;
    text-decoration: none;
    line-height: 1;
}
.btnCerrarPanel:hover,
.btnCerrarPanel:focus{
    background: #fff3e6;
    border-color: #c98a4b;
    color: #8a3f1c;
    text-decoration: none;
    outline: none;
}
.btnCerrarPanel:focus-visible{
    outline: 2px solid #c98a4b;
    outline-offset: 2px;
}
.btnCerrarPanel:active{
    transform: translateY(1px);
}
.btnCerrarIcon{
    font-size: 20px;
    font-weight: bold;
}
.btnCerrarLbl{
    font-size: 9px;
    margin-top: 1px;
}

/* ---------- topBarInner: cuadrícula real (Cerrar / idioma / usuario) para
   las vistas donde el menú de usuario permanece en el encabezado (todas
   excepto las 6 del flujo de servicios, donde headApp/langChanger se
   mueven al pie vía JS y este contenedor queda con Cerrar como único
   hijo). Igual que .panelPieInner, usa CSS Grid real con justify-self en
   vez de coordenadas fijas independientes. ---------- */
body:not(.reservaFlowNav) #topBarInner{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    height: calc(52px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 12px;
    /* #topBarInner (position:fixed + z-index) crea su propio contexto de
       apilamiento: ningún hijo (p.ej. la dropdown-menu de #headApp) puede
       superar visualmente a #helpLnk (z-index:9999999) mientras este
       contenedor tenga un z-index menor. Debe quedar por encima de esa
       tarjeta. */
    z-index: 10000001;
    pointer-events: none;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}
body:not(.reservaFlowNav) #topBarInner > *{
    pointer-events: auto;
}
body:not(.reservaFlowNav) .btnCerrarPanel{
    position: static;
    grid-column: 1;
    justify-self: start;
    top: auto;
    left: auto;
}
body:not(.reservaFlowNav) #langChanger{
    position: static;
    grid-column: 2;
    justify-self: center;
    left: auto;
    top: auto;
    transform: none;
    margin: 0;
    min-width: 190px;
}
body:not(.reservaFlowNav) #headApp{
    position: static;
    grid-column: 3;
    justify-self: end;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
}
body:not(.reservaFlowNav) #headApp .btn-group{
    float: none;
    margin-right: 0;
    margin-top: 0;
}

@media(max-width:575.98px){
    body:not(.reservaFlowNav) #topBarInner{
        max-width: none;
        width: 100%;
        column-gap: 8px;
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
        grid-template-columns: minmax(48px, 1fr) auto minmax(48px, 1fr);
    }
}

/* ---------- Anterior / Siguiente: viven en el HTML dentro de .panelPie en
   cada vista, pero script.js las mueve a #topBarInner en cuanto la página
   carga (ver $(".panelPie > .btn_app").appendTo("#topBarInner")), para que
   nunca dependan de que .panelPie no reciba un transform (containing
   block para position:fixed). Por eso el selector ya NO exige ".panelPie"
   como ancestro; solo excluye .btn_cancel (que sí se queda dentro de
   .panelPieInner, sin moverse). ---------- */
body.reservaFlowNav .btn_app:not(.btn_cancel){
    position: fixed;
    top: calc(env(safe-area-inset-top) + 5px);
    z-index: 90001;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: clamp(96px, 28vw, 116px);
    height: 44px;
    margin: 0;
    padding: 0 10px;
    border-radius: 999px;
    font-size: clamp(0.85em, 3vw, 1em);
    line-height: 1;
    box-shadow: 0 2px 6px rgba(70,35,15,.10);
    overflow: visible;
    white-space: nowrap;
}
body.reservaFlowNav .btn_app:not(.btn_cancel):not(.btn_siguiente){
    /* Anterior */
    left: 50%;
    transform: translateX(-50%);
    background-color: #fffaf5 !important;
    border: 1px solid #e8d7bf !important;
}
body.reservaFlowNav .btn_app.btn_siguiente{
    /* Siguiente: mayor jerarquía visual (color de acento vía go.php) */
    right: clamp(10px, 4vw, 20px);
    border: 1px solid transparent !important;
    font-weight: 600;
}
body.reservaFlowNav .btn_app:not(.btn_cancel):hover:not(.buttDisabled){
    box-shadow: 0 3px 9px rgba(70,35,15,.16);
}
body.reservaFlowNav .btn_app:not(.btn_cancel):focus-visible{
    outline: 2px solid #c98a4b;
    outline-offset: 2px;
}
body.reservaFlowNav .btn_app:not(.btn_cancel).buttDisabled{
    opacity: .35;
}
body.reservaFlowNav .btn_app:not(.btn_cancel) div{ display:inline-block; }

/* ---------- panelPie: barra inferior fija (calendario / idioma / usuario) ----------
   .panelPieInner es el contenedor real de CSS Grid (3 columnas: calendario,
   idioma, usuario). #langChanger y #headApp se mueven aquí vía JS
   (script.js) para poder alinearlos con justify-self real, en vez de
   coordenadas fijas independientes. ---------- */
body.reservaFlowNav .panelPie{
    /* .panelPie (position:fixed, vía go.php) crea su propio contexto de
       apilamiento: debe quedar por encima de #helpLnk (z-index:9999999)
       para que la dropdown-menu de #headApp no quede atrás de esa tarjeta. */
    z-index: 10000000;
}
body.reservaFlowNav .panelPie .panelPieInner{
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    column-gap: 12px;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* btn_cancel: deja de ser botón "Cancelar" negro y se vuelve acceso a calendario */
body.reservaFlowNav .panelPie .btn_cancel{
    position: static;
    justify-self: start;
    width: 48px;
    height: 48px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border-radius: 12px;
    background: var(--footer-control-bg, rgba(255,255,255,.15));
    border: 1px solid var(--footer-control-border, rgba(255,255,255,.4));
    color: var(--footer-control-color, #ffffff) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
    font-size: 0;
    z-index: 100001;
}
body.reservaFlowNav .panelPie .btn_cancel::before{
    content: "\f073"; /* fa-calendar-alt */
    font-family: "Font Awesome 5 Free","FontAwesome";
    font-weight: 900;
    font-size: 20px;
    line-height: 1;
}
body.reservaFlowNav .panelPie .btn_cancel::after{
    content: "\f0e2"; /* fa-undo */
    font-family: "Font Awesome 5 Free","FontAwesome";
    font-weight: 900;
    font-size: 9px;
    position: absolute;
    margin-top: 16px;
    margin-left: 16px;
    background: var(--footer-control-color, #ffffff);
    color: var(--footer-control-bg, #333);
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
body.reservaFlowNav .panelPie .btn_cancel:hover,
body.reservaFlowNav .panelPie .btn_cancel:focus{
    filter: brightness(1.08);
    outline: none;
}
body.reservaFlowNav .panelPie .btn_cancel:focus-visible{
    outline: 2px solid var(--footer-control-color, #fff);
    outline-offset: 2px;
}

/* ---------- Selector de idioma: item de grid, centrado en la columna
   central de .panelPieInner (por ende, respecto al ancho completo de la
   barra, no al espacio sobrante entre calendario y usuario) ---------- */
body.reservaFlowNav #langChanger{
    position: static;
    justify-self: center;
    left: auto;
    top: auto;
    bottom: auto;
    right: auto;
    transform: none;
    margin: 0;
    z-index: 100001;
    width: clamp(165px, 46vw, 200px);
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border-radius: 999px;
    background: #fffaf5;
    border: 1px solid rgba(255,255,255,.5);
    box-shadow: 0 2px 10px rgba(70,35,15,.18);
    opacity: 1;
    color: #566573;
}
body.reservaFlowNav #langChanger::before{
    content: "\f0ac"; /* fa-globe */
    font-family: "Font Awesome 5 Free","FontAwesome";
    font-weight: 900;
    color: #c9711f;
    font-size: 15px;
    margin-right: 2px;
}
body.reservaFlowNav #langChanger a{
    color: #90999f;
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
    padding: 4px 2px;
}
body.reservaFlowNav #langChanger a:focus-visible{
    outline: 2px solid #c98a4b;
    outline-offset: 2px;
}
body.reservaFlowNav #langChanger a.selLang{
    color: #6b4423 !important;
    font-weight: 600;
    text-decoration: none;
}

/* ---------- Menú de usuario: item de grid alineado al final de la
   columna derecha de .panelPieInner, despliega hacia arriba ---------- */
body.reservaFlowNav #headApp{
    position: static;
    justify-self: end;
    left: auto;
    top: auto;
    bottom: auto;
    right: auto;
    width: auto;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    z-index: 100002;
    pointer-events: auto;
}
body.reservaFlowNav #headApp .btn-group{
    float: none;
    margin-right: 0;
    pointer-events: auto;
}
body.reservaFlowNav #headApp .dropdown-toggle{
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    background: var(--footer-control-bg, rgba(255,255,255,.15)) !important;
    border: 1px solid var(--footer-control-border, rgba(255,255,255,.4));
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
    color: var(--footer-control-color, #fff) !important;
}
body.reservaFlowNav #headApp .glyphicon-user{
    background: transparent !important;
    border: none !important;
    color: var(--footer-control-color, #fff) !important;
    font-size: 18px;
}
body.reservaFlowNav #headApp .caret{
    transform: rotate(180deg);
    margin-left: 3px;
    border-top-color: var(--footer-control-color, #fff);
}
body.reservaFlowNav #headApp .dropdown-menu{
    top: auto !important;
    bottom: 100% !important;
    margin-bottom: 10px;
    right: 0;
    left: auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,.22);
    /* #helpLnk usa z-index: 9999999; el menú debe quedar siempre por
       encima de esa tarjeta cuando se despliega. */
    z-index: 10000010;
    overflow: hidden;
}
body.reservaFlowNav #headApp .dropdown-menu li a{
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: #4a4a4a;
}

/* ---------- Banner de ayuda / recomienda y gana: se recorre para no
   quedar detrás del nuevo panelPie más alto ---------- */
body.reservaFlowNav #helpLnk{
    bottom: calc(74px + env(safe-area-inset-bottom));
}

/* ---------- Contenido central: espacio para que la última tarjeta no
   quede oculta tras panelPie ---------- */
body.reservaFlowNav .contListin{
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

/* ---------- Tablet / Desktop: contenido centrado con ancho máximo,
   la barra superior y panelPie siguen ocupando todo el ancho, pero sus
   controles se alinean a una columna virtual de 640px en vez de a los
   bordes reales de la ventana ---------- */
@media(min-width:768px){
    body.reservaFlowNav .cont_form{
        margin: 0 auto;
    }
    .btnCerrarPanel{
        left: max(20px, calc(50vw - 320px + 20px));
    }
    body.reservaFlowNav .btn_app.btn_siguiente{
        right: max(20px, calc(50vw - 320px + 20px));
    }
}

/* ---------- Pantallas muy angostas (320px): reducir sin ocultar ---------- */
@media(max-width:340px){
    .btnCerrarPanel{
        width: 44px;
    }
    body.reservaFlowNav .btn_app:not(.btn_cancel){
        width: clamp(84px, 30vw, 104px);
        padding: 0 6px;
        font-size: 0.8em;
        gap: 4px;
    }
}

/* ---------- panelPie en móvil (<576px): aprovechar todo el ancho de la
   barra — calendario pegado a la izquierda, usuario a la derecha (ambos
   con margen de seguridad ~12-18px + safe-area), idioma centrado
   respecto al ancho COMPLETO de la barra (columna auto entre dos
   columnas flexibles iguales), no respecto al espacio sobrante. ---------- */
@media(max-width:575.98px){
    body.reservaFlowNav .panelPie .panelPieInner{
        max-width: none;
        width: 100%;
        margin: 0;
        column-gap: 8px;
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
        grid-template-columns: minmax(48px, 1fr) auto minmax(48px, 1fr);
    }
    body.reservaFlowNav #langChanger{
        width: clamp(148px, 58vw, 200px);
        gap: 4px;
        padding: 0 10px;
    }
}

/* =====================================================================
   Ocultamiento inteligente de barras al hacer scroll — SOLO se activa
   cuando initSmartBarsHide() se invoca explícitamente (ver
   select_tipo_servicios.html y lista_servicios.html), lo cual agrega
   "smartHideActive" a <body>. Ninguna otra pantalla se ve afectada.
   Se anima únicamente transform/opacity (nunca display/visibility/height)
   para aprovechar la aceleración por hardware. Los ids/clases/eventos de
   topBarNav, panelPie y helpLnk permanecen intactos: solo cambia su
   presentación visual. ===================================================================== */

/* Zona superior: fondo + Cerrar + Anterior/Siguiente (independientes,
   posicionados con fixed; .btn_app ya no exige ".panelPie" como ancestro,
   ver comentario más arriba). #langChanger/#headApp solo se agregan aquí
   cuando NO están en reservaFlowNav: en las vistas con panelPie ya se
   ocultan junto con su contenedor (son hijos reales de .panelPieInner),
   así que agregarlos aquí también duplicaría el efecto. En las vistas sin
   panelPie (p.ej. el calendario "Elige una fecha en {sucursal}") viven en
   la barra superior de forma independiente y no tenían ningún tratamiento
   de ocultamiento — por eso no desaparecían al hacer scroll. */
body.smartHideActive #topBarNav,
body.smartHideActive .btnCerrarPanel,
body.reservaFlowNav.smartHideActive .btn_app:not(.btn_cancel),
body:not(.reservaFlowNav).smartHideActive #langChanger,
body:not(.reservaFlowNav).smartHideActive #headApp{
    transition: transform .26s ease, opacity .22s ease;
    will-change: transform, opacity;
}
body.smartHideActive.smartHide--hidden #topBarNav,
body.smartHideActive.smartHide--hidden .btnCerrarPanel,
body.reservaFlowNav.smartHideActive.smartHide--hidden .btn_app:not(.btn_cancel),
body:not(.reservaFlowNav).smartHideActive.smartHide--hidden #langChanger,
body:not(.reservaFlowNav).smartHideActive.smartHide--hidden #headApp{
    transform: translateY(calc(-100% - env(safe-area-inset-top) - 24px));
    opacity: 0;
    pointer-events: none;
}

/* Zona inferior: panelPie completo (calendario/idioma/usuario ya son hijos
   reales de .panelPieInner, se mueven junto con su contenedor) + helpLnk.
   IMPORTANTE: .panelPie NO debe llevar "will-change: transform" (ni un
   transform activo fuera del estado oculto) porque eso la convertiría en
   el "containing block" de sus descendientes position:fixed (Anterior/
   Siguiente, .btn_app), sacándolos de la barra superior y colocándolos
   junto a panelPie en la parte inferior. Por eso aquí solo se usa
   will-change: opacity. */
body.smartHideActive .panelPie,
body.smartHideActive #helpLnk{
    transition: transform .26s ease, opacity .22s ease;
    will-change: opacity;
}
body.smartHideActive.smartHide--hidden .panelPie,
body.smartHideActive.smartHide--hidden #helpLnk{
    transform: translateY(calc(100% + env(safe-area-inset-bottom) + 24px));
    opacity: 0;
    pointer-events: none;
}

/* Contenido central: recupera el espacio liberado, con transición suave
   (no instantánea) para no producir saltos visibles */
body.smartHideActive{
    transition: padding-top .26s ease;
}
body.smartHideActive.smartHide--hidden{
    padding-top: env(safe-area-inset-top);
}
body.smartHideActive .contListin{
    transition: padding-bottom .26s ease;
}
body.smartHideActive.smartHide--hidden .contListin{
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

@media (prefers-reduced-motion: reduce){
    body.smartHideActive #topBarNav,
    body.smartHideActive .btnCerrarPanel,
    body.reservaFlowNav.smartHideActive .btn_app:not(.btn_cancel),
    body:not(.reservaFlowNav).smartHideActive #langChanger,
    body:not(.reservaFlowNav).smartHideActive #headApp,
    body.smartHideActive .panelPie,
    body.smartHideActive #helpLnk,
    body.smartHideActive,
    body.smartHideActive .contListin{
        transition: none;
    }
}
/* =====================================================================
   Barra compacta de dos accesos (#helpLnk.helpLnkDuo): solo en
   "Selecciona tus servicios" cuando la sucursal tiene UN tipo de servicio
   y se muestran a la vez "Recomienda y gana" (.rycCard) y el menú de
   servicios (.svcHelpCard). go.php agrega la clase; sin ella todo lo
   anterior queda igual. Se reutilizan las mismas tarjetas y enlaces:
   el enlace original (.rycCta / .svcHelpCta) se extiende sobre toda la
   tarjeta para que cualquier punto de ella haga lo mismo que antes.
   ===================================================================== */
body.reservaFlowNav #helpLnk.helpLnkDuo{
    bottom: calc(72px + env(safe-area-inset-bottom));
}
#helpLnk.helpLnkDuo{
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: 10px;
    min-height: 0;
    padding: 0 max(14px, calc((100% - 640px) / 2));
    padding-left: max(14px, env(safe-area-inset-left), calc((100% - 640px) / 2));
    padding-right: max(14px, env(safe-area-inset-right), calc((100% - 640px) / 2));
    background: transparent;
    opacity: 1;
    text-align: left;
}
#helpLnk.helpLnkDuo:hover{ cursor: default; }

#helpLnk.helpLnkDuo .rycCard,
#helpLnk.helpLnkDuo .svcHelpCard{
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: auto;
    max-width: none;
    min-width: 0;
    min-height: 58px;
    margin: 0;
    padding: 8px 12px;
    background: #fffdf9;
    border: 1px solid #ddd6cc;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(45,28,16,.14);
    cursor: pointer;
    transition: box-shadow .18s ease, border-color .18s ease, transform .1s ease;
}
#helpLnk.helpLnkDuo .rycCard:hover,
#helpLnk.helpLnkDuo .svcHelpCard:hover{
    border-color: #c9a27a;
    box-shadow: 0 6px 18px rgba(45,28,16,.20);
}
#helpLnk.helpLnkDuo .rycCard:active,
#helpLnk.helpLnkDuo .svcHelpCard:active{
    transform: scale(.98);
}

#helpLnk.helpLnkDuo .rycTop,
#helpLnk.helpLnkDuo .svcHelpTop{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex: 0 1 auto;
    min-width: 0;
}
#helpLnk.helpLnkDuo .rycIconWrap,
#helpLnk.helpLnkDuo .svcHelpIconWrap{
    width: 36px;
    height: 36px;
}
#helpLnk.helpLnkDuo .rycIcon,
#helpLnk.helpLnkDuo .svcHelpIcon{
    font-size: 16px;
}
#helpLnk.helpLnkDuo .rycIcon{ color: #c9711f; }
#helpLnk.helpLnkDuo .svcHelpIcon{ color: #5c5248; }
#helpLnk.helpLnkDuo .rycText,
#helpLnk.helpLnkDuo .svcHelpText{
    min-width: 0;
}
#helpLnk.helpLnkDuo .rycTitle,
#helpLnk.helpLnkDuo .svcHelpTitle{
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    color: #2b2118;
    white-space: normal;
    overflow-wrap: anywhere;
}
#helpLnk.helpLnkDuo .rycDesc,
#helpLnk.helpLnkDuo .svcHelpDesc{
    display: none;
}

/* El enlace original cubre toda la tarjeta (misma URL, target y eventos);
   su texto queda solo para lectores de pantalla */
#helpLnk.helpLnkDuo .rycCta,
#helpLnk.helpLnkDuo .svcHelpCta{
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    display: block;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 11px;
    box-shadow: none;
    transform: none;
}
#helpLnk.helpLnkDuo .rycCta:hover,
#helpLnk.helpLnkDuo .rycCta:focus,
#helpLnk.helpLnkDuo .svcHelpCta:hover,
#helpLnk.helpLnkDuo .svcHelpCta:focus{
    background: transparent;
    border: 0;
    box-shadow: none;
}
#helpLnk.helpLnkDuo .rycCta:focus-visible,
#helpLnk.helpLnkDuo .svcHelpCta:focus-visible{
    outline: 2px solid #c9711f;
    outline-offset: -2px;
}
#helpLnk.helpLnkDuo .rycCta > *,
#helpLnk.helpLnkDuo .svcHelpCta > *{
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Otro contenido de #helpLnk (texto de ayuda general) ocupa la fila completa */
#helpLnk.helpLnkDuo > a{
    grid-column: 1 / -1;
    background: #fffdf9;
    border: 1px solid #ddd6cc;
    border-radius: 12px;
}

/* Espacio para que el último servicio no quede detrás de la barra + panelPie */
body.reservaFlowNav .contListinDuo{
    padding-bottom: calc(160px + env(safe-area-inset-bottom));
}

/* Celular: el ícono pasa arriba del texto para conservar una sola fila */
@media(max-width:480px){
    #helpLnk.helpLnkDuo{ gap: 8px; }
    #helpLnk.helpLnkDuo .rycCard,
    #helpLnk.helpLnkDuo .svcHelpCard{
        flex-direction: column;
        gap: 0;
        min-height: 56px;
        padding: 7px 8px;
    }
    #helpLnk.helpLnkDuo .rycTop,
    #helpLnk.helpLnkDuo .svcHelpTop{
        flex-direction: column;
        gap: 3px;
        text-align: center;
    }
    #helpLnk.helpLnkDuo .rycIconWrap,
    #helpLnk.helpLnkDuo .svcHelpIconWrap{
        width: 26px;
        height: 26px;
    }
    #helpLnk.helpLnkDuo .rycIcon,
    #helpLnk.helpLnkDuo .svcHelpIcon{
        font-size: 13px;
    }
    #helpLnk.helpLnkDuo .rycTitle,
    #helpLnk.helpLnkDuo .svcHelpTitle{
        font-size: 13px;
    }
}
