/* Estilos generales FirmasPDF */
:root {
    --primary-color: #0d6efd;
    --primary-dark: #0a58ca;
    --signature-border: #0d6efd;
    --signature-bg: rgba(13, 110, 253, 0.08);
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #212529;
}

.cursor-pointer {
    cursor: pointer;
}

.transition {
    transition: all 0.2s ease-in-out;
}

.hover-shadow:hover {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.1) !important;
}

/* Visor de Firma y Canvas */
.viewer-container {
    background-color: #525659;
    min-height: calc(100vh - 170px);
    overflow-y: auto;
    padding: 20px 10px 100px 10px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.pdf-viewport-wrapper {
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
    background: #ffffff;
    display: inline-block;
    user-select: none;
}

#pdfCanvas {
    display: block;
    max-width: 100%;
}

/* Firma Flotante Interactiva */
.signature-overlay {
    position: absolute;
    border: 2px dashed var(--signature-border);
    background-color: var(--signature-bg);
    cursor: move;
    z-index: 100;
    box-sizing: border-box;
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.signature-overlay.active {
    border-color: #198754;
    background-color: rgba(25, 135, 84, 0.1);
}

.signature-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

/* Manija de redimensionamiento */
.signature-resize-handle {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 14px;
    height: 14px;
    background-color: var(--primary-color);
    border: 2px solid #ffffff;
    border-radius: 50%;
    cursor: se-resize;
    z-index: 110;
}

.signature-overlay.active .signature-resize-handle {
    background-color: #198754;
}

/* Barra inferior fija */
.bottom-signing-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #dee2e6;
    padding: 12px 24px;
    z-index: 1020;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
}

/* Barra superior de firma fija/compacta */
.top-signing-bar {
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
    padding: 8px 16px;
    z-index: 1010;
}

/* Dropzone */
.dropzone-area {
    transition: all 0.2s ease-in-out;
}
.dropzone-area:hover {
    background-color: #f1f5f9 !important;
}
