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 {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}


/* 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... */
.input-xs, .btn-xs {
    height: 22px;
    padding: 2px 5px;
    font-size: 12px;
    line-height: 1.5; /* If Placeholder of the input is moved up, rem/modify this. */
    border-radius: 3px;
}


.translate-middle {
    transform: translate(-100%, -50%) !important;
}


/* añado un color a bootstrap (este .bg-secondary-subtle no esta en bootstrap 5.1 (q es la q esoy usando aqui) pero si en la 5.3, lo meto aqui pillandolo de como esta en la 5.3 */
.bg-secondary-subtle {
    /*background-color: var(--bs-secondary-bg-subtle) !important;*/
    /* en realidad seria como esta linea de arriba, pero esa var logicamente no existe en este bootstrap... de momento paso de crear variable ni nada, pq migrare en breve a bootstrap 5.3 */
    background-color: #e2e3e5 !important;
}

/*este realmente no existe tampoco en la 5.3, pero la creo yo pq la veo util*/
.text-primary-subtle {
    background-color: #cfe2ff !important;
}










#SignDelivery #viewerAutofirmaButtonBadge {
    /*font-size: .6rem;*/
    font-size: .4rem;
    /*padding: .18rem .15rem;*/
    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;

    /*
    display: inline-block;
    overflow: visible;
    padding-top: .60rem; /* padding por arriba para que se vea el badge sobre boton */
    */
}
    #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 .sign-doc-item {
    border: 1px solid #ddd;
    border-radius: .5rem;
    padding: .75rem;
    margin-bottom: .75rem;
    background: #fff;
}

#SignDelivery .sign-doc-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

#SignDelivery .sign-doc-main {
    flex: 1 1 auto;
    min-width: 0;
}

#SignDelivery .sign-doc-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
    font-weight: 600;
}

#SignDelivery .sign-doc-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}

#SignDelivery .sign-autofirma-help {
    text-decoration: none;
    line-height: 1;
}

    #SignDelivery .sign-autofirma-help:hover {
        color: #0d6efd !important;
    }

#SignDelivery #signatureProgressBox {
    border-left: 3px solid #dee2e6;
    padding-left: .5rem;
}

#SignDelivery .sign-doc-actions .btn {
    white-space: nowrap;
}




#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;
}

#SignDelivery #viewerActionBar {
    display: flex;
    align-items: center;
    gap: .75rem;
}




/*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 620px;
    min-width: 620px;
    */
    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;
}

/* cartela mensaje */
#SignDelivery .viewer-signed-status {
    /*font-size: .80rem;*/
}




#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 220px;*/
    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 Firmmar */
#SignDelivery #viewerAutofirmaButtonBadge {
    font-size: .6rem;
    /*padding: .22rem .36rem;*/
    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;
    }
