/**
 * Signature Field Frontend Styles
 *
 * Styles for signature fields on registration forms
 *
 * @since 4.3.0
 */

/* Signature Container */
.wpuf-signature-container {
    position: relative;
    margin-bottom: 10px;
}

/* Canvas Styles */
.signature-canvas {
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    cursor: crosshair;
    display: block;
    max-width: 100%;
    touch-action: none;
}

.signature-canvas.signature-border {
    border: 1px solid #ddd;
}

/* Clear Button */
.wpuf-clear-signature {
    margin-top: 0.5rem;
    font-size: .8rem;
    padding: 5px 10px;
    line-height: 1.4;
    background-color: #e95252;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wpuf-clear-signature:hover {
    background-color: #c74545;
}

/* Signature States */
.wpuf-signature-empty {
    opacity: 0.8;
}

.wpuf-signature-error .signature-canvas {
    border-color: #d63638;
    box-shadow: 0 0 0 1px #d63638;
}

.wpuf-signature-error::after {
    content: attr(data-error);
    display: block;
    color: #d63638;
    font-size: 12px;
    margin-top: 5px;
}

/* Responsive Design */
@media screen and (max-width: 600px) {
    .signature-canvas {
        max-width: 100%;
        height: auto !important;
    }

    .wpuf-clear-signature {
        width: 100%;
        text-align: center;
    }
}

/* Loading State */
.wpuf-signature-container.loading .signature-canvas {
    opacity: 0.5;
    cursor: wait;
}

/* Print Styles */
@media print {
    .wpuf-clear-signature {
        display: none;
    }

    .signature-canvas {
        border: 1px solid #000;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}