/* ========================================
   PROFESSIONAL FILE UPLOAD COMPONENT
   ======================================== */

.file-upload-wrapper {
    position: relative;
    margin-top: 8px;
}

.file-upload-container {
    position: relative;
    border: 2.5px dashed #cbd5e1;
    border-radius: 14px;
    padding: 32px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-align: center;
}

.file-upload-container:hover {
    border-color: #3C8BD6;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(60, 139, 214, 0.15);
}

.file-upload-container.drag-over {
    border-color: #3C8BD6;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-style: solid;
    box-shadow: 0 0 0 4px rgba(60, 139, 214, 0.1);
}

.file-upload-container input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}

.file-upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.file-upload-text {
    margin-bottom: 8px;
    color: #475569;
}

.file-upload-text strong {
    color: #3C8BD6;
    font-weight: 600;
}

.file-upload-hint {
    font-size: 13px;
    color: #64748b;
    margin-top: 8px;
}

.file-upload-limit {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
    font-style: italic;
}

/* File Preview */
.file-preview {
    margin-top: 16px;
    padding: 16px;
    background: #ffffff;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    display: none;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

.file-preview.show {
    display: flex;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-preview-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.file-preview-info {
    flex: 1;
    text-align: left;
}

.file-preview-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
    margin-bottom: 4px;
    word-break: break-word;
}

.file-preview-size {
    font-size: 12px;
    color: #64748b;
}

.file-preview-remove {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.file-preview-remove:hover {
    background: #fecaca;
    transform: scale(1.05);
}

/* File Size Error */
.file-size-error {
    margin-top: 12px;
    padding: 12px 16px;
    background: #fee2e2;
    border: 1.5px solid #fca5a5;
    border-radius: 10px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
    display: none;
    animation: shake 0.5s ease;
}

.file-size-error.show {
    display: block;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

/* ========================================
   SIGNATURE COMPONENT (DRAW + UPLOAD)
   ======================================== */

.signature-wrapper {
    margin-top: 8px;
}

.signature-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.signature-tab {
    flex: 1;
    padding: 12px 20px;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: #64748b;
    transition: all 0.3s ease;
    text-align: center;
}

.signature-tab:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.signature-tab.active {
    background: linear-gradient(135deg, #2F5FA8 0%, #3C8BD6 100%);
    border-color: #3C8BD6;
    color: white;
    box-shadow: 0 4px 12px rgba(60, 139, 214, 0.3);
}

.signature-content {
    display: none;
}

.signature-content.active {
    display: block;
}

/* Drawing Canvas */
.signature-canvas-container {
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.signature-canvas {
    width: 100%;
    height: 200px;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    cursor: crosshair;
    background: #fafbfc;
    touch-action: none;
}

.signature-canvas-controls {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    justify-content: flex-end;
}

.signature-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.signature-btn-clear {
    background: #f1f5f9;
    color: #475569;
    border: 1.5px solid #e2e8f0;
}

.signature-btn-clear:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.signature-btn-save {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.signature-btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.signature-btn-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Signature Preview */
.signature-preview {
    margin-top: 16px;
    padding: 16px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    display: none;
}

.signature-preview.show {
    display: block;
    animation: slideIn 0.3s ease;
}

.signature-preview-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.signature-preview-image {
    max-width: 100%;
    max-height: 150px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    padding: 8px;
}

.signature-preview-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .file-upload-container {
        padding: 24px 16px;
    }

    .file-upload-icon {
        font-size: 36px;
    }

    .signature-canvas {
        height: 150px;
    }

    .signature-tabs {
        flex-direction: column;
    }
}