/* Custom Dialog Overlay */
.custom-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-dialog-overlay.active {
    display: flex;
    opacity: 1;
}

/* Dialog Box */
.custom-dialog {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.custom-dialog-overlay.active .custom-dialog {
    transform: scale(1);
}

/* Dialog Header */
.custom-dialog-header {
    padding: 24px 28px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-dialog-header.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.custom-dialog-header.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.custom-dialog-header.success {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

.custom-dialog-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.custom-dialog-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

/* Dialog Body */
.custom-dialog-body {
    padding: 28px;
}

.custom-dialog-message {
    font-size: 16px;
    color: #374151;
    line-height: 1.6;
    margin: 0;
}

/* Dialog Footer */
.custom-dialog-footer {
    padding: 20px 28px;
    background: #f9fafb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-top: 1px solid #e5e7eb;
}

.custom-dialog-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
    justify-content: center;
}

.custom-dialog-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.custom-dialog-btn-cancel {
    background: white;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.custom-dialog-btn-cancel:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
}

.custom-dialog-btn-confirm {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.custom-dialog-btn-confirm:hover {
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

.custom-dialog-btn-confirm.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.custom-dialog-btn-confirm.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.custom-dialog-btn-confirm.success {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

/* Responsive */
@media (max-width: 640px) {
    .custom-dialog {
        max-width: 95%;
        margin: 20px;
    }

    .custom-dialog-header {
        padding: 20px 24px;
    }

    .custom-dialog-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .custom-dialog-title {
        font-size: 18px;
    }

    .custom-dialog-body {
        padding: 24px;
    }

    .custom-dialog-message {
        font-size: 15px;
    }

    .custom-dialog-footer {
        padding: 16px 24px;
        flex-direction: column-reverse;
    }

    .custom-dialog-btn {
        width: 100%;
        min-width: auto;
    }
}

/* Animation */
@keyframes dialogSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.custom-dialog-overlay.active .custom-dialog {
    animation: dialogSlideIn 0.3s ease forwards;
}
