/* ============================================
   Signature Capture Modal Styling
   ============================================ */

.signature-capture-modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    max-width: 700px;
    width: 100%;
}

.signature-capture-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.signature-capture-header h5 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.signature-capture-body {
    padding: 2rem;
    min-height: 400px;
}

.signature-capture-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

/* Mode Selector */
.signature-mode-selector {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.signature-mode-selector .btn {
    flex: 1;
    max-width: 150px;
}

/* Canvas Mode */
.signature-canvas-container {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
}

.signature-canvas {
    border: 1px dashed #adb5bd;
    border-radius: 4px;
    background: #f8f9fa;
    cursor: crosshair;
    touch-action: none;
}

.signature-controls {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.color-picker-container {
    display: flex;
    gap: 0.5rem;
}

.color-option {
    width: 40px;
    height: 40px;
    border: 3px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13,110,253,0.25);
}

/* Type Mode */
.signature-type-container {
    padding: 1rem;
}

.typed-signature-preview {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    padding: 2rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.typed-signature-preview span {
    color: #000;
}

.typed-signature-preview .text-muted {
    font-size: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Upload Mode */
.signature-upload-container {
    padding: 1rem;
}

.upload-area {
    border: 3px dashed #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    padding: 3rem;
    text-align: center;
    transition: all 0.2s ease;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area.dragging {
    border-color: #0d6efd;
    background: rgba(13,110,253,0.05);
}

.upload-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-prompt i {
    color: #adb5bd;
}

.upload-prompt p {
    margin: 0.5rem 0;
    color: #6c757d;
}

.uploaded-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.uploaded-preview img {
    max-width: 100%;
    max-height: 200px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: white;
    padding: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .signature-capture-modal {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
    }

    .signature-capture-body {
        padding: 1rem;
    }

    .signature-canvas {
        width: 100% !important;
        max-width: 100%;
    }

    .signature-mode-selector .btn {
        font-size: 0.875rem;
        padding: 0.5rem;
    }

    .signature-controls {
        padding: 1rem;
    }

    .color-option {
        width: 35px;
        height: 35px;
    }

    .typed-signature-preview {
        font-size: 1.75rem;
        padding: 1.5rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.signature-capture-modal {
    animation: fadeIn 0.2s ease;
}
