/**
 * Modern Modal & Notification Styles
 * Beautiful, professional UI components
 */

/* Modal Overlay */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-modal-overlay.active {
    opacity: 1;
}

/* Modal Container */
.custom-modal {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.custom-modal-overlay.active .custom-modal {
    transform: scale(1);
}

/* Modal Icon */
.custom-modal-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: iconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes iconPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Modal Title */
.custom-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

/* Modal Message */
.custom-modal-message {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 28px;
    line-height: 1.6;
}

/* Modal Actions */
.custom-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Modal Buttons */
.custom-modal-btn {
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.custom-modal-btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.custom-modal-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.custom-modal-btn-cancel {
    background: #f3f4f6;
    color: #6b7280;
}

.custom-modal-btn-cancel:hover {
    background: #e5e7eb;
}

/* Loading Modal */
.custom-modal-loading {
    padding: 40px;
}

.loading-spinner {
    margin-bottom: 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-message {
    font-size: 16px;
    color: #6b7280;
    font-weight: 500;
}

/* Success Animation */
.success-animation {
    margin-bottom: 20px;
}

.checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: block;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #10b981;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 3;
    stroke: #10b981;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .custom-modal {
        background: #1f2937;
    }
    
    .custom-modal-title {
        color: #f9fafb;
    }
    
    .custom-modal-message {
        color: #d1d5db;
    }
    
    .custom-modal-btn-cancel {
        background: #374151;
        color: #d1d5db;
    }
    
    .custom-modal-btn-cancel:hover {
        background: #4b5563;
    }
}

/* Mobile Responsive */
@media (max-width: 576px) {
    .custom-modal {
        padding: 24px;
        max-width: 95%;
    }
    
    .custom-modal-icon {
        font-size: 48px;
    }
    
    .custom-modal-title {
        font-size: 20px;
    }
    
    .custom-modal-message {
        font-size: 14px;
    }
    
    .custom-modal-actions {
        flex-direction: column;
    }
    
    .custom-modal-btn {
        width: 100%;
    }
}
