/* Custom Modal System - Replaces browser alert() and confirm() */

.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: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.custom-modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.custom-modal {
    background: white;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-modal-overlay.active .custom-modal {
    transform: scale(1) translateY(0);
}

.custom-modal-header {
    padding: 30px 30px 20px;
    text-align: center;
}

.custom-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.custom-modal-icon.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.custom-modal-icon.success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.custom-modal-icon.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.custom-modal-icon.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.custom-modal-icon.question {
    background: linear-gradient(135deg, #2E86AB, #A23B72);
    color: white;
}

.custom-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 12px;
    letter-spacing: -0.5px;
}

.custom-modal-body {
    padding: 0 30px 30px;
}

.custom-modal-message {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
    text-align: center;
    white-space: pre-line;
}

.custom-modal-footer {
    padding: 0 30px 30px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.custom-modal-btn {
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.custom-modal-btn:hover {
    transform: translateY(-2px);
}

.custom-modal-btn:active {
    transform: translateY(0);
}

.custom-modal-btn.primary {
    background: linear-gradient(135deg, #2E86AB 0%, #A23B72 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(46, 134, 171, 0.3);
}

.custom-modal-btn.primary:hover {
    box-shadow: 0 6px 20px rgba(46, 134, 171, 0.4);
}

.custom-modal-btn.secondary {
    background: #f1f5f9;
    color: #475569;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.custom-modal-btn.secondary:hover {
    background: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-modal-btn.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.custom-modal-btn.danger:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.custom-modal-btn.success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.custom-modal-btn.success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Responsive design */
@media (max-width: 640px) {
    .custom-modal {
        margin: 0 10px;
    }

    .custom-modal-header {
        padding: 25px 25px 15px;
    }

    .custom-modal-body {
        padding: 0 25px 25px;
    }

    .custom-modal-footer {
        padding: 0 25px 25px;
        flex-direction: column;
    }

    .custom-modal-btn {
        width: 100%;
        justify-content: center;
    }

    .custom-modal-title {
        font-size: 20px;
    }

    .custom-modal-message {
        font-size: 14px;
    }
}
