/* =============================================================================
 * firmar.php — Word/PDF a lo largo, zoom, texto editable
 * ============================================================================= */
.firmar-page {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    height: auto;
    max-height: none;
    min-height: 0;
    max-width: 100%;
    overflow: visible;
    padding-top: 0.35rem !important;
    padding-bottom: 1.5rem !important;
    box-sizing: border-box;
}

.firmar-page--activo .firmar-topbar-lead,
.firmar-page--activo .contratos-kicker {
    display: none;
}

.firmar-page--activo .firmar-topbar-title {
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.firmar-page--activo .firmar-topbar {
    margin-bottom: 0.45rem;
    flex-shrink: 0;
}

.firmar-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.firmar-topbar-title {
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(1.25rem, 2.4vw, 1.7rem);
    color: var(--ink);
}

.firmar-topbar-lead {
    color: #64748b;
    font-size: 0.9rem;
}

.firmar-workspace {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: none;
    overflow: visible;
    gap: 0.45rem;
}

.firmar-body {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    grid-template-rows: auto;
    align-items: start;
    gap: 0.65rem;
    min-height: 0;
    overflow: visible;
}

.firmar-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem 0.75rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.45rem 0.7rem;
    flex-shrink: 0;
}

.firmar-toolbar-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.firmar-editor-barra {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    overflow: visible;
    position: relative;
    z-index: 8;
    background: #eef2f5;
    border-bottom: 1px solid rgba(15, 39, 68, 0.12);
    border-radius: 12px 12px 0 0;
    padding: 0.4rem 0.55rem;
}

.firmar-editor-barra .ck.ck-toolbar {
    border: 0;
    background: transparent;
    padding: 0;
    overflow: visible;
}

.firmar-editor-barra .ck.ck-toolbar__items {
    flex-wrap: wrap;
    gap: 2px;
}

.firmar-editor-barra .ck.ck-button {
    min-width: 1.9rem;
    min-height: 1.9rem;
}

.firmar-ck-dummy {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.firmar-doc-html.ck-editor__editable,
.firmar-doc-html.ck-editor__editable.ck-focused {
    border: 0 !important;
    box-shadow: none !important;
}

.firmar-toolbar-status {
    flex: 1 1 8rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.firmar-paginas-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1 1 11rem;
    min-width: 0;
}

.firmar-pagina-select {
    flex: 1 1 auto;
    min-width: 7.5rem;
    max-width: 14rem;
    height: 32px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0 0.7rem;
    cursor: pointer;
}

.firmar-pagina-select:disabled {
    cursor: default;
    opacity: 0.65;
}

.firmar-pagina-btn {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.firmar-pagina-btn:hover:not(:disabled) {
    border-color: var(--teal);
    color: var(--teal);
}

.firmar-pagina-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.firmar-zoom-label {
    min-width: 3.2rem;
    text-align: center;
    font-weight: 700;
    color: var(--ink);
    font-size: 0.85rem;
}

.firmar-hoja-unica {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.28rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
    user-select: none;
    background: #fff;
}

.firmar-hoja-unica input {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: var(--teal);
    cursor: pointer;
}

.firmar-hoja-unica:has(input:checked) {
    border-color: var(--teal);
    background: rgba(15, 118, 110, 0.1);
    color: var(--teal);
}

.firmar-scroll {
    min-width: 0;
    min-height: 60vh;
    max-height: none;
    height: auto;
    overflow: visible;
    background: #c5d0d8;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

.firmar-scroll::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

.firmar-scroll::-webkit-scrollbar-track {
    background: #dbe4ea;
    border-radius: 8px;
}

.firmar-scroll::-webkit-scrollbar-thumb {
    background: #0f766e;
    border-radius: 8px;
    border: 3px solid #dbe4ea;
}

.firmar-scroll::-webkit-scrollbar-thumb:hover {
    background: #0b5f58;
}

.firmar-zoom-outer {
    width: 100%;
    min-width: 100%;
    display: flex;
    justify-content: center;
}

.firmar-zoom-inner {
    transform-origin: top center;
    width: max-content;
    min-width: 0;
    margin: 0 auto;
}

.firmar-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    padding: 0.85rem;
    width: 100%;
    box-sizing: border-box;
}

.firmar-anexo {
    width: 100%;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 39, 68, 0.18);
    overflow: hidden;
    border-radius: 4px;
}

.firmar-anexo-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0.7rem;
    background: #0f766e;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

.firmar-anexo-quitar {
    border: 0;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    cursor: pointer;
}

.firmar-anexo-lienzo {
    position: relative;
    background: #fff;
    min-height: 420px;
}

.firmar-anexo.is-hoja .firmar-anexo-lienzo,
.firmar-anexo.is-imagen .firmar-anexo-lienzo {
    aspect-ratio: 210 / 297;
    min-height: 0;
    background:
        linear-gradient(#fff, #fff) padding-box,
        repeating-linear-gradient(0deg, transparent, transparent 27px, #edf2f7 28px);
    background-color: #fff;
}

.firmar-anexo.is-imagen .firmar-anexo-lienzo {
    background: #eef2f6;
}

.firmar-anexo-foto {
    position: absolute;
    box-sizing: border-box;
    touch-action: none;
    cursor: grab;
    z-index: 2;
    user-select: none;
}

.firmar-anexo-foto.is-dragging {
    cursor: grabbing;
    z-index: 4;
}

.firmar-anexo-foto.is-resizing {
    z-index: 4;
}

.firmar-anexo-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    background: #fff;
    box-shadow: 0 2px 10px rgba(15, 39, 68, 0.16);
}

.firmar-anexo-resize,
.firmar-sello-resize {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--teal);
    border: 2px solid #fff;
    border-radius: 3px;
    box-shadow: 0 1px 4px rgba(15, 39, 68, 0.35);
    z-index: 5;
    touch-action: none;
}

.firmar-anexo-resize::after,
.firmar-sello-resize::after {
    content: "";
    position: absolute;
    inset: -12px;
}

.firmar-anexo-resize[data-corner="nw"],
.firmar-sello-resize[data-corner="nw"] {
    left: 4px;
    top: 4px;
    cursor: nwse-resize;
}

.firmar-anexo-resize[data-corner="ne"],
.firmar-sello-resize[data-corner="ne"] {
    right: 4px;
    top: 4px;
    cursor: nesw-resize;
}

.firmar-anexo-resize[data-corner="sw"],
.firmar-sello-resize[data-corner="sw"] {
    left: 4px;
    bottom: 4px;
    cursor: nesw-resize;
}

.firmar-anexo-resize[data-corner="se"],
.firmar-sello-resize[data-corner="se"] {
    right: 4px;
    bottom: 4px;
    cursor: nwse-resize;
}

.firmar-sheet,
.firmar-doc-paper {
    position: relative;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 39, 68, 0.18);
    width: 100%;
}

.firmar-sheet {
    line-height: 0;
}

.firmar-canvas-pdf,
.firmar-canvas-trazo {
    display: block;
    width: 100%;
    height: auto;
}

.firmar-canvas-trazo {
    position: absolute;
    left: 0;
    top: 0;
    cursor: default;
    touch-action: pan-y;
    user-select: none;
    pointer-events: none;
}

.firmar-doc-paper {
    color: #111;
    padding: clamp(1.1rem, 4vw, 3.2rem);
    min-height: 70vh;
    box-sizing: border-box;
    isolation: isolate;
    overflow: visible;
}

.firmar-doc-html {
    outline: 2px dashed transparent;
    min-height: 60vh;
    font-size: clamp(1.02rem, 1.55vw, 1.22rem);
    line-height: 1.65;
    color: #111;
    position: relative;
    z-index: 1;
}

.firmar-doc-html:focus {
    outline-color: rgba(15, 118, 110, 0.35);
}

.firmar-doc-html p {
    margin: 0 0 0.85em 0;
}

.firmar-doc-html h1,
.firmar-doc-html h2,
.firmar-doc-html h3 {
    color: #111;
    line-height: 1.3;
}

.firmar-doc-html img {
    max-width: 100%;
    height: auto;
}

.firmar-doc-paper.firmar-doc-paper--nativo {
    width: max-content;
    max-width: none;
    min-height: 0;
    padding: 0;
    margin: 0 auto;
    background: transparent;
    box-shadow: none;
}

.firmar-doc-html.firmar-doc-html--nativo {
    min-height: 0;
    font-size: unset;
    line-height: unset;
    color: unset;
    outline: none;
}

.firmar-doc-html.firmar-doc-html--nativo:focus {
    outline: none;
}

.firmar-doc-html.firmar-doc-html--nativo p,
.firmar-doc-html.firmar-doc-html--nativo h1,
.firmar-doc-html.firmar-doc-html--nativo h2,
.firmar-doc-html.firmar-doc-html--nativo h3 {
    margin: unset;
    color: unset;
    line-height: unset;
}

.firmar-doc-html.firmar-doc-html--nativo img {
    max-width: none;
    height: auto;
}

.firmar-doc-html--nativo .docx-wrapper {
    background: transparent !important;
    padding: 4px 0 12px !important;
    width: max-content !important;
    max-width: none !important;
}

.firmar-doc-html--nativo section.docx {
    position: relative;
    margin: 0 auto 14px auto !important;
    background: #fff !important;
    box-shadow: 0 10px 28px rgba(15, 39, 68, 0.18);
    min-width: 210mm;
    overflow: hidden !important;
    box-sizing: border-box;
}

.firmar-doc-html ins.contrato-diff-add,
.firmar-doc-html .contrato-diff-add,
.firmar-doc-html .revision-amarillo,
.firmar-doc-html--nativo ins.contrato-diff-add,
.firmar-doc-html--nativo .contrato-diff-add,
.firmar-doc-html--nativo .revision-amarillo {
    background: #fef08a;
    color: inherit;
    font-weight: inherit;
    font-style: inherit;
    text-decoration: none;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.firmar-doc-html .revision-verde,
.firmar-doc-html--nativo .revision-verde,
.firmar-doc-html ins.revision-verde,
.firmar-doc-html--nativo ins.revision-verde {
    background: #bbf7d0;
    color: inherit;
    font-weight: inherit;
    font-style: inherit;
    text-decoration: none;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.firmar-doc-html del.contrato-diff-del,
.firmar-doc-html .contrato-diff-del,
.firmar-doc-html--nativo del.contrato-diff-del,
.firmar-doc-html--nativo .contrato-diff-del {
    color: #92400e;
    background: #fde68a;
    text-decoration: line-through;
    opacity: 0.85;
}

.firmar-sellos {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 6;
}

.firmar-sello-wrap {
    position: absolute;
    pointer-events: auto;
    z-index: 7;
    max-width: 42%;
    box-sizing: border-box;
    overflow: visible;
    line-height: 0;
    cursor: grab;
    touch-action: none;
}

.firmar-sello-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    border: 1px dashed rgba(15, 118, 110, 0.7);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    box-sizing: border-box;
    image-rendering: auto;
}

.firmar-sello-wrap.is-selected .firmar-sello-img {
    border-color: var(--teal);
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.35);
}

.firmar-sello-wrap.is-fijo {
    cursor: pointer;
    touch-action: auto;
}

.firmar-sello-wrap.is-fijo .firmar-sello-img {
    border-style: solid;
}

.firmar-sello-wrap.is-bloqueado {
    cursor: default;
    touch-action: auto;
}

.firmar-sello-wrap.is-bloqueado .firmar-sello-img {
    border-style: solid;
    border-color: rgba(15, 39, 68, 0.22);
}

.firmar-sello-wrap.is-dragging {
    cursor: grabbing;
    z-index: 14;
}

.firmar-sello-wrap.is-resizing {
    z-index: 14;
}

.firmar-sello-wrap.is-selected {
    z-index: 12;
}

.firmar-sello-resize {
    display: none;
}

.firmar-sello-wrap.is-selected .firmar-sello-resize {
    display: block;
}

.firmar-sello-toolbar {
    display: none;
    position: absolute;
    left: 50%;
    top: calc(100% + 6px);
    bottom: auto;
    transform: translateX(-50%);
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-width: 0;
    padding: 0.28rem;
    background: #0f172a;
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(15, 39, 68, 0.28);
    z-index: 15;
}

.firmar-sello-wrap.is-selected .firmar-sello-toolbar {
    display: flex;
}

.firmar-sello-wrap.is-abajo .firmar-sello-toolbar {
    top: auto;
    bottom: calc(100% + 6px);
}

.firmar-sello-btn,
.firmar-sello-btn-icon,
.firmar-sello-hoja {
    border: 0;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.35rem 0.65rem;
    cursor: pointer;
    white-space: nowrap;
}

.firmar-sello-hoja {
    max-width: 11.5rem;
    background: #0f766e;
    color: #fff;
    appearance: auto;
}

.firmar-sello-btn {
    background: #0f766e;
    color: #fff;
}

.firmar-sello-btn-icon {
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: #dc3545;
    color: #fff;
}

.firmar-sello-wrap.is-fijo .firmar-sello-btn {
    background: #f59e0b;
    color: #111;
}

.firmar-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: none;
    height: auto;
    align-self: start;
    position: static;
    top: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(15, 39, 68, 0.1);
    overflow: visible;
}

.firmar-dock-handle {
    display: none;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0.4rem 0.85rem 0.15rem;
    text-align: center;
}

.firmar-dock-handle-bar {
    display: block;
    width: 42px;
    height: 4px;
    margin: 0 auto 0.3rem;
    border-radius: 999px;
    background: #cbd5e1;
}

.firmar-dock-handle-copy {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--teal);
}

.firmar-dock-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
    padding: 0.65rem 0.85rem 0.55rem;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(109, 40, 217, 0.08));
    border-bottom: 1px solid var(--border);
}

.firmar-dock-kicker {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--teal);
}

.firmar-dock-title {
    font-weight: 700;
    color: var(--ink);
    font-size: 0.95rem;
}

.firmar-dock-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.firmar-panel-inner {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.65rem 0.85rem 0.85rem;
    overflow: visible;
    min-height: 0;
    flex: 1;
}

.firmar-pad-lateral {
    touch-action: none;
}

#canvasPadFirmar {
    display: block;
    width: 100%;
    height: 200px;
    touch-action: none;
    cursor: crosshair;
    background: transparent;
}

.firmar-swatch {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    border: 2px solid #cbd5e1;
    padding: 0;
    cursor: pointer;
    background: #111;
}

.firmar-swatch[data-color-firma="#1e3a8a"] {
    background: #1e3a8a;
}

.firmar-swatch[data-color-firma="#991b1b"] {
    background: #991b1b;
}

.firmar-swatch.is-active {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.25);
}

#zonaDropPdfFirmar.is-dragover {
    border-color: var(--teal) !important;
    background: rgba(15, 118, 110, 0.08);
}

.firmar-page [data-grosor-firma],
.firmar-page [data-grosor-firma]:hover,
.firmar-page [data-grosor-firma]:focus {
    background: #475569 !important;
    border-color: #475569 !important;
    color: #fff !important;
}

.firmar-page [data-grosor-firma].is-active,
.firmar-page [data-grosor-firma].is-active:hover {
    background: #0F766E !important;
    border-color: #0F766E !important;
    color: #fff !important;
}

.firmar-privado {
    overflow: visible;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    gap: 0.85rem;
}

.firmar-envio-fijo {
    position: sticky;
    bottom: 0;
    z-index: 22;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    margin-top: auto;
    flex-shrink: 0;
    box-shadow: 0 -8px 22px rgba(15, 39, 68, 0.08);
}

.firmar-envio-fijo-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.45rem;
}

.firmar-envio-fijo-row .form-control {
    flex: 1 1 14rem;
    min-width: 0;
}

.firmar-envio-fijo-row .btn {
    flex: 0 1 auto;
}

@media (min-width: 992px) {
    .firmar-panel.is-collapsed .firmar-dock-head-copy,
    .firmar-panel.is-collapsed .firmar-pad-tools,
    .firmar-panel.is-collapsed .firmar-envio-col {
        display: block;
    }

    .firmar-panel.is-collapsed .firmar-panel-inner {
        overflow-y: auto;
        max-height: none;
        padding: 0.65rem 0.85rem 0.85rem;
    }
}

@media (max-width: 991px) {
    .firmar-page {
        height: auto;
        max-height: none;
        max-width: 100%;
        overflow-x: hidden;
    }

    .firmar-page--activo .firmar-topbar-title {
        font-size: 1rem;
    }

    .firmar-body {
        display: flex;
        flex-direction: column;
        position: relative;
        min-height: 0;
        max-width: 100%;
        grid-template-columns: none;
        grid-template-rows: none;
        overflow-x: hidden;
    }

    .firmar-scroll {
        flex: 1 1 auto;
        min-height: 50vh;
        height: auto;
        max-height: none;
        max-width: 100%;
        padding-bottom: 0;
        overflow-x: hidden;
    }

    .firmar-stack {
        padding: 0.4rem;
    }

    .firmar-zoom-outer {
        min-width: 0;
        max-width: 100%;
        overflow: visible;
        margin-left: auto;
        margin-right: auto;
    }

    .firmar-zoom-inner {
        transform-origin: top left;
    }

    .firmar-sello-toolbar {
        top: calc(100% + 8px);
        bottom: auto;
        transform: translateX(-50%);
        max-width: min(18rem, calc(100vw - 1.5rem));
        gap: 0.4rem;
        padding: 0.4rem;
        z-index: 20;
    }

    .firmar-sello-wrap.is-abajo .firmar-sello-toolbar {
        top: auto;
        bottom: calc(100% + 8px);
        transform: translateX(-50%);
    }

    .firmar-sello-btn,
    .firmar-sello-hoja {
        min-height: 44px;
        font-size: 0.85rem;
        padding: 0.55rem 0.85rem;
    }

    .firmar-sello-btn-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 1.05rem;
    }

    .firmar-anexo-resize,
    .firmar-sello-resize {
        width: 32px;
        height: 32px;
    }

    .firmar-anexo-resize::after,
    .firmar-sello-resize::after {
        inset: -12px;
    }

    .firmar-dock-handle {
        display: none;
    }

    .firmar-panel {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        z-index: auto;
        width: 100%;
        border-radius: 12px;
        border-bottom: 1px solid var(--border);
        max-height: none;
        box-shadow: 0 8px 28px rgba(15, 39, 68, 0.1);
        padding-bottom: 0;
    }

    .firmar-panel.is-collapsed {
        max-height: none;
    }

    .firmar-panel.is-collapsed .firmar-dock-head-copy,
    .firmar-panel.is-collapsed .firmar-pad-tools,
    .firmar-panel.is-collapsed #avisoPegarFirma {
        display: none;
    }

    .firmar-panel.is-collapsed .firmar-envio-col {
        display: block;
    }

    .firmar-panel.is-collapsed .firmar-dock-head {
        padding: 0.2rem 0.7rem 0.35rem;
        background: #fff;
        border-bottom: 0;
    }

    .firmar-panel.is-collapsed .firmar-panel-inner {
        padding: 0 0.7rem calc(0.45rem + env(safe-area-inset-bottom, 0));
        overflow: hidden;
        max-height: none;
    }

    .firmar-panel.is-collapsed .firmar-pad-actions {
        margin-top: 0.4rem;
    }

    .firmar-panel.is-collapsed .firmar-pad-actions .btn {
        font-size: 0.75rem;
        padding: 0.22rem 0.55rem;
    }

    .firmar-panel.is-collapsed #padFirmarWrap,
    .firmar-panel.is-collapsed #canvasPadFirmar {
        height: 228px;
        min-height: 228px;
    }

    .firmar-panel-inner {
        max-height: none;
        overflow: visible;
    }

    #padFirmarWrap,
    #canvasPadFirmar {
        height: 268px;
        min-height: 268px;
    }

    .firmar-scroll::-webkit-scrollbar {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 575.98px) {
    .firmar-topbar-lead {
        font-size: 0.8rem;
    }

    .firmar-dock-btn-label,
    .firmar-btn-wide {
        display: none;
    }

    .firmar-toolbar-status {
        display: none;
    }

    .firmar-paginas-nav {
        flex: 1 1 100%;
        order: 8;
    }

    .firmar-pagina-select {
        max-width: none;
    }
}

.correos-envio {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.firmar-atajo-firma {
    display: none;
}

@media (max-width: 991px) {
    .firmar-page--activo .firmar-atajo-firma:not([hidden]) {
        position: fixed;
        left: 50%;
        bottom: calc(5.8rem + env(safe-area-inset-bottom, 0));
        transform: translateX(-50%);
        z-index: 36;
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        border: 0;
        border-radius: 999px;
        padding: 0.7rem 1.2rem;
        background: #0f766e;
        color: #fff;
        font-size: 0.92rem;
        font-weight: 800;
        box-shadow: 0 10px 28px rgba(15, 118, 110, 0.42);
    }
}

