/* Forzar que el bloque de firma se vea en editor y en vista (evitar reemplazo por widget file) */
.s_website_form_field_signature .signature-pad-wrapper,
#alsalud-firma-examinado .signature-pad-wrapper {
    display: block !important;
}

.signature-pad-wrapper {
    width: 100%;
    margin: 10px 0;
}

/* El input real (file/hidden) debe estar oculto; solo se ve el canvas */
.signature-pad .signature-data {
    display: none !important;
}

.signature-pad {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background-color: #ffffff;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.signature-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.signature-header span {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.signature-canvas {
    width: 100%;
    height: 200px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    cursor: crosshair;
    background-color: #fafafa;
    touch-action: none; /* Evita el scroll mientras se firma en tablets */
}

.signature-canvas:active {
    background-color: #ffffff;
}

.signature-clear {
    padding: 4px 12px;
    font-size: 12px;
}

/* Estilos para tablets y móviles */
@media (max-width: 768px) {
    .signature-canvas {
        height: 250px;
    }
    
    .signature-header span {
        font-size: 12px;
    }
}

/* Estilos para tablets grandes como iPad */
@media (min-width: 768px) and (max-width: 1024px) {
    .signature-canvas {
        height: 300px;
    }
}

/* Mejora para dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
    .signature-canvas {
        border-width: 2px;
        border-style: solid;
        border-color: #007bff;
    }
    
    .signature-header span {
        color: #007bff;
        font-weight: 600;
    }
}

