/* MavSign Styles */

.mavsign-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.mavsign-modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: mavsign-fade-in 0.3s ease-out;
}

@keyframes mavsign-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mavsign-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.mavsign-btn.primary {
    background: var(--mav-primary);
    border: 1px solid var(--mav-primary);
    color: white;
    position: relative;
    overflow: hidden;
}

.mavsign-btn.primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.mavsign-btn.primary:active {
    transform: translateY(0);
}

.mavsign-dock-item {
    /* Existing styles... */
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mavsign-dock-item:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--mav-primary);
    color: var(--mav-primary);
}

/* Spinner Animation */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top-color: var(--mav-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.mavsign-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #111827;
    font-weight: 600;
}

.mavsign-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    line-height: 1;
}

.mavsign-close:hover {
    color: #111827;
}

.mavsign-body {
    padding: 1.5rem;
}

.mavsign-info {
    margin-bottom: 1.5rem;
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.5;
}

.mavsign-form-group {
    margin-bottom: 1rem;
}

.mavsign-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #374151;
    font-weight: 500;
}

.mavsign-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.mavsign-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.mavsign-agreement {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #1e40af;
}

.mavsign-viewer-container {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    position: relative;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    overflow: auto;
    /* Allow scrolling */
    max-height: 60vh;
    /* Limit height */
}

.mavsign-pad-container {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    position: relative;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.mavsign-pad-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #9ca3af;
    font-size: 1.5rem;
    pointer-events: none;
    font-weight: 500;
}

.mavsign-controls {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.mavsign-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.mavsign-btn.secondary {
    background: white;
    border: 1px solid #d1d5db;
    color: #374151;
}

.mavsign-btn.secondary:hover {
    background: #f3f4f6;
}

.mavsign-btn.primary {
    background: #2563eb;
    border: 1px solid #2563eb;
    color: white;
}

.mavsign-btn.primary:hover {
    background: #1d4ed8;
}

.mavsign-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Toast Notifications */
.mavsign-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10002;
    max-width: 400px;
}

.mavsign-toast-show {
    opacity: 1;
    transform: translateY(0);
}

.mavsign-toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.mavsign-toast-message {
    color: #1f2937;
    font-size: 0.95rem;
    font-weight: 500;
}

.mavsign-toast-success .mavsign-toast-icon {
    background: #10b981;
    color: white;
}

.mavsign-toast-error .mavsign-toast-icon {
    background: #ef4444;
    color: white;
}

.mavsign-toast-info .mavsign-toast-icon {
    background: #3b82f6;
    color: white;
}

/* Loading State for Finish Button */
.mavsign-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.mavsign-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}