html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/*
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}
*/










html, body {
    height: 100%;
}

body {
    margin: 0;
    background-color: var(--app-bg);
    color: var(--app-text);
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-main {
    flex: 1 0 auto;
}

/* =========================
   Header / navbar layout
   ========================= */

.app-header {
    background-color: var(--brand-dark);
}

.app-navbar {
    min-height: 72px;
}

.app-navbar-brand {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 1.5rem;
    padding-right: 1.5rem;
    flex-shrink: 0;
    text-decoration: none;
}

.app-navbar-logo {
    display: block;
    height: 52px;
    width: auto;
    max-width: 280px;
}

.app-navbar-menu-wrap {
    display: flex;
    align-items: center;
    min-height: 100%;
}

.app-main-menu {
    align-items: center;
    gap: 0.15rem;
}

    .app-main-menu .nav-link {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
        font-weight: 500;
    }


    /*
    .app-main-menu .dropdown-menu {
        border-radius: 0.75rem;
        border: 1px solid var(--app-border);
        box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12);
    }

    .app-main-menu .dropdown-item {
        font-weight: 500;
    }

        .app-main-menu .dropdown-item:hover,
        .app-main-menu .dropdown-item:active {
            background-color: var(--brand-lime-soft);
            color: var(--app-text);
        }
*/

    .app-main-menu .dropdown-menu {
        background-color: var(--brand-dark-elevated);
        border-radius: 0.75rem;
        border: 1px solid rgba(255, 255, 255, 0.10);
        box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.18);
        padding: 0.4rem;
    }

    .app-main-menu .dropdown-item {
        font-weight: 500;
        color: #fff;
        border-radius: 0.5rem;
    }

        .app-main-menu .dropdown-item:hover,
        .app-main-menu .dropdown-item:focus,
        .app-main-menu .dropdown-item:active {
            background-color: rgba(255, 255, 255, 0.10);
            color: var(--brand-lime);
        }


.app-navbar-login-wrap {
    display: flex;
    align-items: center;
}

.app-login-nav {
    align-items: center;
}



/*
.app-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem !important;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff !important;
    text-decoration: none;
    line-height: 1.1;
}

    .app-user-pill:hover {
        background-color: rgba(255, 255, 255, 0.16);
        color: #fff !important;
    }

.app-user-pill-icon {
    font-size: 0.85rem;
    opacity: 0.95;
}
*/

/* =========================================================
   Header - user pill
   ========================================================= */

.app-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem !important;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.24);
    background-color: rgba(255, 255, 255, 0.08);
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff !important;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, transform 0.15s ease-in-out;
}

    .app-user-pill:hover,
    .app-user-pill:focus {
        border-color: rgba(255, 255, 255, 0.28);
        border-color: rgba(255, 255, 255, 0.34);
        background-color: rgba(255, 255, 255, 0.14);
        background-color: rgba(255, 255, 255, 0.18);
        color: #fff !important;
        text-decoration: none;
        box-shadow: 0 0 0 0.15rem rgba(255, 255, 255, 0.08);
    }

    .app-user-pill:active {
        transform: translateY(1px);
    }

.app-user-pill-icon {
    font-size: 0.95rem;
}

.app-user-pill:hover .app-user-pill-icon,
.app-user-pill:focus .app-user-pill-icon {
    opacity: 1;
}

.app-user-pill > span {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}





.app-logout-link {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

/* Footer */
.app-footer {
    background-color: var(--brand-dark);
    color: #fff;
}

    .app-footer a {
        color: var(--brand-lime);
        text-decoration: none;
    }

        .app-footer a:hover {
            color: #fff;
        }

/* Separador logo / menú: solo desktop */
@media (min-width: 992px) {
    .app-navbar-brand::after {
        content: "";
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        width: 1px;
        height: 34px;
        background-color: rgba(255, 255, 255, 0.18);
    }
}

/* Móvil / tablet */
@media (max-width: 991.98px) {
    .app-navbar-brand {
        margin-right: 0.5rem;
        padding-right: 0;
    }

    .app-navbar-logo {
        height: 44px;
        max-width: 220px;
    }

    .app-main-menu {
        margin-top: 0.75rem;
        margin-bottom: 0.5rem;
        gap: 0;
    }

    .app-navbar-login-wrap {
        margin-top: 0.5rem;
    }

    .app-user-pill {
        justify-content: center;
    }
}





.app-main-menu .dropdown-toggle::after {
    margin-left: 0.45rem;
}

.app-main-menu .dropdown-menu[data-bs-popper] {
    /*margin-top: 0.5rem;*/
    margin-top: 1rem;
}


.dropdown-item i {
    width: 1.1rem;
    text-align: center;
}












.app-main-menu .nav-link {
    color: rgba(255,255,255,0.85);
}

    .app-main-menu .nav-link:hover {
        color: #fff;
    }












/* bloque aceptar cookies */
#cookieConsent {
    z-index: 2000; /* cuanto mas alto, mas primer plano (meto 2000 pq el footer tiene 1030) */
    background-color: #eee;
    position: absolute;
    bottom: 0px;
    left: 0px;
    margin: 0px;
    padding: 60px;
    border: none;
    border-top: 1px solid #ddd;
    border-radius: 0px;
    width: 100%;
    min-width: 100%;
    text-align: center;
    box-shadow: 0px -3px 5px #ddd;
}

    #cookieConsent a {
        margin: 0 30px;
    }

    #cookieConsent button {
        margin-left: 30px;
    }







/* añado tamaño xs (mas pequeño q small), bootstrap 5 ya no lo incluye... */
/*pero coño, aqui meti input-XX, pero esa nomenclatura no se si existe en mi version de bootstrap... lo q si existe es .form-control-XX... */
.form-control-xs,
.input-xs, .btn-xs {
    height: 22px;
    /*padding: 2px 5px;*/
    padding: 0px 5px;
    font-size: 12px;
    line-height: 1.5; /* If Placeholder of the input is moved up, rem/modify this. */
    border-radius: 3px;
}

.input-group-xs > .form-control,
.input-group-xs > .input-group-addon,
.input-group-xs > .input-group-btn > .btn {
    height: 22px;
    padding: 1px 5px;
    font-size: 12px;
    line-height: 1.5;
}

.translate-middle {
    transform: translate(-100%, -50%) !important;
}














#SignDelivery #viewerAutofirmaButtonBadge {
    font-size: .4rem;
    padding: .18rem .15rem;
}



/* para el boton de Firmar en barra botones sobre visor pdf, para que si el boton tiene un badge montado, este se vea y no se corte por arriba */
/* container wraper del boton - hay q wrapear el boton en esto para hacer que se muestre el badge sobre el boton sin cortarse */
#SignDelivery .sign-btn-badge-wrap {
    position: relative;
    display: flex;
    align-items: center;
    overflow: visible;
    min-width: 0;
}

    #SignDelivery .sign-btn-badge-wrap .sign-autofirma-button-badge {
        position: absolute;
        top: -0.35rem;
        right: -0.35rem;
        z-index: 2;
        font-size: .60rem;
        line-height: 1;
        padding: .18rem .32rem;
        pointer-events: none;
    }


    #SignDelivery .sign-btn-badge-wrap > div,
    #SignDelivery .sign-btn-badge-wrap .btn-toolbar,
    #SignDelivery .sign-btn-badge-wrap .btn-group {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: .5rem;
        min-width: max-content;
    }


#SignDelivery #viewerActionBar,
#SignDelivery .viewer-actionbar-left,
#SignDelivery .viewer-actionbar-left > * {
    overflow: visible;
}


/* area bajo botonera sobre visor */
#SignDelivery #signatureProgressBox {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

#SignDelivery .signature-progress-text {
    min-width: 0;
    flex: 1 1 auto;
}

#SignDelivery .signature-progress-autobadge {
    flex: 0 0 auto;
    margin-left: auto;
    white-space: nowrap;
}


/*----------------------------------------------------------*/
/* pagina de firmar delivery                                */
/*----------------------------------------------------------*/

#SignDelivery #allSignedBox {
    opacity: 0;
    transform: translateY(10px);
    max-height: 0;
    overflow: hidden;
    transition: opacity 280ms ease, transform 280ms ease, max-height 320ms ease;
}

    #SignDelivery #allSignedBox.is-visible {
        opacity: 1;
        transform: translateY(0);
        max-height: 260px;
    }

#SignDelivery #containerViewer {
    margin-top: 40px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 280ms ease, max-height 320ms ease;
}

    #SignDelivery #containerViewer.is-visible {
        opacity: 1;
        max-height: 2400px;
    }

#SignDelivery .js-signature-overlay-wrapper {
    position: absolute;
    z-index: 1000;
    cursor: move;
    user-select: none;
    -webkit-user-drag: none;
    touch-action: none;
}

    #SignDelivery .js-signature-overlay-wrapper.is-active {
        outline: 1px dashed rgba(255, 0, 0, 0.55);
        outline-offset: 2px;
    }

    #SignDelivery .js-signature-overlay-wrapper .js-signature-overlay-img {
        width: 100%;
        height: 100%;
        display: block;
        pointer-events: none;
    }

    #SignDelivery .js-signature-overlay-wrapper .js-signature-resize-handle {
        position: absolute;
        width: 12px;
        height: 12px;
        right: -6px;
        bottom: -6px;
        border: 1px solid #ff0000;
        background: #ffffff;
        border-radius: 2px;
        cursor: nwse-resize;
        display: none;
        box-sizing: border-box;
    }

    #SignDelivery .js-signature-overlay-wrapper.is-active .js-signature-resize-handle,
    #SignDelivery .js-signature-overlay-wrapper:hover .js-signature-resize-handle {
        display: block;
    }









#SignDelivery.is-viewer-wide #containerViewer {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    padding-left: 2rem;
    padding-right: 2rem;
    box-sizing: border-box;
}

#SignDelivery #viewerActionBar,
#SignDelivery #signatureProgressBox {
    width: 100%;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

#SignDelivery.is-viewer-wide #viewerActionBar,
#SignDelivery.is-viewer-wide #signatureProgressBox {
    width: 100%;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}





/*añado estos ahora para regular el ancho de la primera columna flex de la barra de botones (la q contiene la mayoria de botones) */
#SignDelivery #viewerActionBar {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: nowrap;
}

#SignDelivery .viewer-actionbar-left {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 0 1 auto;
    min-width: 0;
    overflow: visible;
}

#SignDelivery .viewer-actionbar-center {
    flex: 1 1 auto;
    min-width: 0;
}

#SignDelivery .viewer-actionbar-right {
    flex: 0 0 auto;
    margin-left: auto;
}


/* la columna central (q es donde se mostrara texto verde al subir un doc firmado ok) */
#SignDelivery .viewer-signed-status {
    font-size: .875rem;
    line-height: 1.15;
    max-width: 100%;
    overflow-wrap: anywhere;
}





#SignDelivery #viewerActionButtons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    flex: 0 1 auto;
    min-width: 0;
}

#SignDelivery #viewerActionRight {
    flex: 0 0 auto;
    margin-left: auto;
}

#SignDelivery #saveStatus {
    flex: 1 1 20px;
    min-width: 0;
    max-width: 240px;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
}

#SignDelivery #viewerActionBar > * {
    max-width: 100%;
    padding-top: 10px;
}

#SignDelivery #viewerActionBar .btn,
#SignDelivery #viewerActionBar button {
    width: auto;
    flex: 0 0 auto;
}

/* badge autofirma en boton Firmar */
#SignDelivery #viewerAutofirmaButtonBadge {
    font-size: .6rem;
    padding: .15rem .20rem;
}

#SignDelivery #signatureProgressBox {
    display: flex;
    align-items: center;
    gap: .5rem;
}

#SignDelivery #viewerAutofirmaBadge {
    margin-left: auto;
}

@media (max-width: 991.98px) {
    #SignDelivery #viewerActionBar {
        align-items: flex-start;
    }

    #SignDelivery #saveStatus {
        flex-basis: 180px;
        max-width: 200px;
    }
}





#SignDelivery .js-signature-overlay-wrapper.is-auto-placed {
    cursor: default !important;
}





    #SignDelivery .js-signature-overlay-wrapper.is-auto-placed .js-signature-resize-handle {
        display: none !important;
    }

    #SignDelivery .js-signature-overlay-wrapper.is-auto-placed.is-active {
        outline: none !important;
    }





#SignDelivery .viewer-error-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.9);
    z-index: 30;
}

#SignDelivery .viewer-error-box {
    text-align: center;
    max-width: 400px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}



















/* listados paginas index */
.colBotones {
    background-color: #f1f1f1 !important;
}







.boxFiltro .accordion-body {
    border: 1px solid #ccc;
    background-color: #eef2f5;
}

.boxFiltro .accordion-button {
    padding: 0.2rem 0.75rem;
    padding-top: 0.5rem;
    background-color: #657178;
    color: white;
}

.accordion-button {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

    .accordion-button::after {
        margin-left: 0;
        margin-right: 0.75rem;
        margin-bottom: 0.3rem;
    }

    .accordion-button::after {
        filter: brightness(0) saturate(100%) invert(91%) sepia(99%) saturate(490%) hue-rotate(5deg) brightness(95%) contrast(98%);
    }


.boxFiltro .form-label {
    margin-bottom: 0rem;
}






.boxPaginacionInfo {
    margin-top: 15px;
}



.badge-estado {
    width: 70px;
    color: #707070;
    padding-top: 0.65em !important;
    padding-bottom: 0.35em !important;
}

    .badge-estado.borrador {
        background-color: #707070;
        color: #f5f5f5;
    }

    .badge-estado.enviado {
        background-color: #e6c69f;
        color: #151515;
    }

    .badge-estado.abierto {
        background-color: #e1deb5;
        color: #151515;
    }

    .badge-estado.finalizado {
        background-color: #3f9060;
        color: #f5f5f5;
    }






/* borde en focus botones color lima */


/*
.btn:focus,
.btn:active:focus,
.btn-check:focus + .btn,
.btn-check:active + .btn,
.btn.show:focus {
    border-color: var(--ev-lima, #b7d63b);
    box-shadow: 0 0 0 0.25rem rgba(183, 214, 59, 0.25);
}
    */


.btn:focus,
.btn:active:focus,
.btn-check:focus + .btn,
.btn-check:active + .btn,
.btn.show:focus {
    border-color: #b7d63b;
    box-shadow: 0 0 0 0.25rem rgba(183, 214, 59, 0.25);
}

.accordion-button:focus {
    border-color: #b7d63b;
    box-shadow: 0 0 0 0.25rem rgba(183, 214, 59, 0.25);
}


















/*
.badge-delivery-borrador {
    background-color: #6c757d;
}

.badge-delivery-enviado {
    background-color: #ffc107;
    color: #212529;
}

.badge-delivery-abierto {
    background-color: #0dcaf0;
    color: #212529;
}

.badge-delivery-finalizado {
    background-color: #198754;
}

.badge-delivery-default {
    background-color: #adb5bd;
}
    */

/* =========================
   Autofirma Badge
   ========================= */

/* =========================
   BADGE AUTOFIRMA
   ========================= */

.badge-autofirma {
    background-color: #e7f1ff;
    color: #0d6efd;
    border: 1px solid #b6d4fe;
    padding-top: 0.5em;
    padding-bottom: 0.5em;
}

/* =========================================================
   Sign.cshtml - bloques de adjuntos
   ========================================================= */

#SignDelivery .sign-doc-item {
    border: 1px solid #ddd;
    border-radius: .5rem;
    padding: .75rem;
    margin-bottom: .75rem;
    background: #fff;
}

#SignDelivery .sign-doc-row {
    display: flex;
    flex-direction: column;
    width: 100%;
}

#SignDelivery .sign-doc-main {
    min-width: 0;
    width: 100%;
}

#SignDelivery .sign-doc-title {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    width: 100%;
    font-weight: 600;
}

#SignDelivery .sign-doc-filename-wrap {
    display: flex;
    align-items: flex-start;
    min-width: 0;
    width: 100%;
}

#SignDelivery .sign-doc-pdf-icon {
    flex: 0 0 auto;
    margin-top: 0.15rem;
    margin-right: 0.35rem;
}

#SignDelivery .sign-doc-filename {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

#SignDelivery .sign-doc-autofirma-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    margin-top: 0.35rem;
    margin-left: 1.35rem;
    width: calc(100% - 1.35rem);
    flex-wrap: wrap;
}

#SignDelivery .sign-autofirma-help {
    text-decoration: none;
    line-height: 1;
}

    #SignDelivery .sign-autofirma-help:hover {
        color: #0d6efd !important;
    }

#SignDelivery .sign-doc-actions-right {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding-right: 12px;
}

#SignDelivery .sign-doc-actions-grid {
    display: grid;
    grid-template-columns: auto auto;
    column-gap: 0.5rem;
    row-gap: 0.5rem;
    justify-content: end;
    align-items: center;
}

#SignDelivery .sign-doc-action-cell.sign-doc-action-left,
#SignDelivery .sign-doc-action-cell.sign-doc-action-right {
    display: flex;
    justify-content: center;
}

#SignDelivery .sign-doc-action-cell .btn,
#SignDelivery .sign-doc-action-cell .badge,
#SignDelivery .sign-doc-action-cell .js-signed-indicator {
    white-space: nowrap;
}

#SignDelivery .sign-doc-url-row {
    width: 100%;
    min-width: 0;
}

    #SignDelivery .sign-doc-url-row .text-break {
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
    }



#SignDelivery .sign-doc-item:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: box-shadow 0.15s ease;
}

#SignDelivery .sign-doc-item.signed {
    border-color: #3f9060;
    background-color: #f4f9f7;
}











/* para ojo en campos password */
.password-toggle-wrap {
    position: relative;
}

    .password-toggle-wrap .password-toggle-icon {
        position: absolute;
        right: 0.9rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
        cursor: pointer;
        color: #6c757d;
        line-height: 1;
    }

    .password-toggle-wrap .form-control {
        padding-right: 2.8rem;
    }









