/* =========================================================
   Custom Notifications System (Alert Replacements)
   ========================================================= */

.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-black-alpha-70);
    backdrop-filter: blur(5px);
    z-index: 2147483647;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.custom-alert-overlay.show {
    opacity: 1;
    visibility: visible;
}

.custom-alert-box {
    background: var(--bg-color);
    border: 1px solid var(--color-gold-alpha-30);
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px var(--color-black-alpha-80);
    transform: translateY(-20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
}

.custom-alert-overlay.show .custom-alert-box {
    transform: translateY(0) scale(1);
}

.custom-alert-icon {
    font-size: 50px;
    color: var(--primary);
    margin-bottom: 15px;
}

.custom-alert-icon.error {
    color: var(--status-delete);
}

.custom-alert-icon.success {
    color: var(--status-success);
}

.custom-alert-icon.warning {
    color: var(--primary);
}

.custom-alert-message {
    white-space: pre-wrap;
    color: var(--text-main);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.custom-alert-btn {
    background: var(--primary);
    color: var(--color-dark-900);
    border: none;
    padding: 10px 30px;
    border-radius: 5px;
    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.custom-alert-btn:hover {
    background: var(--primary-hover);
}

.custom-alert-btn.success {
    background: var(--status-success);
    color: white;
}

.custom-alert-btn.success:hover {
    background: var(--color-green-800);
}

.custom-alert-btn.cancel {
    background: var(--color-gray-500-alt);
    color: white;
}

.custom-alert-btn.cancel:hover {
    background: var(--color-gray-600-alt);
}

.custom-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--color-gold-alpha-20);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================================================
   Toast Notifications (Side popups)
   ========================================================= */

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2147483647;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.custom-toast {
    background: var(--color-gray-900-alt);
    border: 1px solid var(--color-white-alpha-08);
    border-right: 4px solid var(--primary);
    border-radius: 8px;
    box-shadow: 0 8px 30px var(--color-black-alpha-80);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-main);
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    transform: translateX(120%); /* starts off-screen */
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 250px;
}

.custom-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.custom-toast.success { border-right-color: var(--status-success); }
.custom-toast.error { border-right-color: var(--status-delete); }
.custom-toast.info { border-right-color: var(--color-blue-600); }
.custom-toast.warning { border-right-color: orange; }

.toast-icon {
    font-size: 20px;
}

.toast-message {
    font-size: 15px;
    flex-grow: 1;
}
