/**
 * نظام الإشعارات المخصص لموقع إستأجرها
 * Custom Alert System
 */

/* Overlay الخلفية */
.alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.2s ease-out;
    padding: 1rem;
}

/* النافذة المنبثقة */
.alert-box {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    animation: slideDown 0.3s ease-out;
    overflow: hidden;
}

/* رأس النافذة */
.alert-header {
    padding: 1.5rem;
    border-bottom: 2px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.alert-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* أنواع الأيقونات */
.alert-icon.success {
    background: #dcfce7;
}

.alert-icon.success svg {
    color: #16a34a;
}

.alert-icon.error {
    background: #fee2e2;
}

.alert-icon.error svg {
    color: #dc2626;
}

.alert-icon.warning {
    background: #fef3c7;
}

.alert-icon.warning svg {
    color: #ca8a04;
}

.alert-icon.info {
    background: #dbeafe;
}

.alert-icon.info svg {
    color: #2563eb;
}

.alert-icon.question {
    background: #f3f4f6;
}

.alert-icon.question svg {
    color: #4b5563;
}

/* عنوان النافذة */
.alert-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: #111827;
    font-family: 'Tajawal', sans-serif;
}

/* محتوى النافذة */
.alert-body {
    padding: 1.5rem;
}

.alert-message {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.6;
    font-family: 'Tajawal', sans-serif;
}

/* حقل الإدخال للـ prompt */
.alert-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: 'Tajawal', sans-serif;
    margin-top: 1rem;
    transition: all 0.2s;
}

.alert-input:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* أزرار النافذة */
.alert-footer {
    padding: 1rem 1.5rem;
    background: #f9fafb;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.alert-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: 'Tajawal', sans-serif;
}

.alert-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.alert-btn-primary {
    background: #000;
    color: white;
}

.alert-btn-secondary {
    background: white;
    color: #4b5563;
    border: 2px solid #e5e7eb;
}

.alert-btn-danger {
    background: #dc2626;
    color: white;
}

/* Toast Notifications - الإشعارات الخفيفة */
.toast-container {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 500px;
    width: 100%;
    padding: 0 1rem;
}

.toast {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInDown 0.3s ease-out;
    border: 2px solid #f3f4f6;
}

.toast-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
    font-family: 'Tajawal', sans-serif;
}

.toast-message {
    font-size: 0.875rem;
    color: #6b7280;
    font-family: 'Tajawal', sans-serif;
}

/* زر إغلاق Toast - بدون خلفية */
.toast-close {
    width: 1.5rem !important;
    height: 1.5rem !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    color: #9ca3af !important;
    padding: 0 !important;
}

.toast-close:hover {
    color: #6b7280 !important;
    background: #f3f4f6 !important;
}

.toast-close svg {
    width: 1rem !important;
    height: 1rem !important;
    color: inherit !important;
}

/* أنواع Toast */
.toast.success {
    border-color: #16a34a;
}

.toast.success .toast-icon {
    background: #dcfce7;
    color: #16a34a;
}

.toast.error {
    border-color: #dc2626;
}

.toast.error .toast-icon {
    background: #fee2e2;
    color: #dc2626;
}

.toast.warning {
    border-color: #ca8a04;
}

.toast.warning .toast-icon {
    background: #fef3c7;
    color: #ca8a04;
}

.toast.info {
    border-color: #2563eb;
}

.toast.info .toast-icon {
    background: #dbeafe;
    color: #2563eb;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-100%);
    }
}

/* Responsive */
@media (max-width: 640px) {
    .alert-box {
        max-width: 90%;
    }

    .alert-footer {
        flex-direction: column;
    }

    .alert-btn {
        width: 100%;
    }
}
