/* Custom Modal CSS */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.custom-modal-box {
    background: #ffffff;
    width: 90%;
    max-width: 450px;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 30px;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

html:not(.light-mode) .custom-modal-box {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

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

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

.custom-modal-icon svg {
    width: 36px;
    height: 36px;
}

.icon-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 3px solid rgba(245, 158, 11, 0.2);
}

.icon-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 3px solid rgba(16, 185, 129, 0.2);
}

.icon-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 3px solid rgba(239, 68, 68, 0.2);
}

.icon-info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 3px solid rgba(59, 130, 246, 0.2);
}

.custom-modal-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

html:not(.light-mode) .custom-modal-title {
    color: #f8fafc;
}

.custom-modal-text {
    font-size: 15px;
    color: var(--text-muted, #64748b);
    line-height: 1.6;
    margin-bottom: 24px;
}

html:not(.light-mode) .custom-modal-text {
    color: #94a3b8;
}

.custom-modal-html-container {
    margin-bottom: 24px;
    text-align: left;
}

.custom-modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.btn-modal {
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    outline: none;
}

.btn-modal-confirm {
    background: #3b82f6;
    color: white;
}

.btn-modal-confirm:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.btn-modal-confirm.danger {
    background: #ef4444;
}

.btn-modal-confirm.danger:hover {
    background: #dc2626;
}

.btn-modal-cancel {
    background: #f1f5f9;
    color: #475569;
}

.btn-modal-cancel:hover {
    background: #e2e8f0;
    color: #0f172a;
}

html:not(.light-mode) .btn-modal-cancel {
    background: #334155;
    color: #cbd5e1;
}

html:not(.light-mode) .btn-modal-cancel:hover {
    background: #475569;
    color: #f8fafc;
}

.custom-modal-error-msg {
    display: none;
    color: #ef4444;
    font-size: 13px;
    margin-top: -12px;
    margin-bottom: 20px;
    text-align: left;
    background: rgba(239, 68, 68, 0.1);
    padding: 10px;
    border-radius: 8px;
    animation: shake 0.4s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
