/* أنماط رسائل التنبيه العامة */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.custom-alert {
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease-out;
    display: flex;
    align-items: flex-start;
    border: 1px solid;
    position: relative;
    overflow: hidden;
}

.custom-alert::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
}

.custom-alert-success {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-color: #bbf7d0;
    color: #166534;
}

.custom-alert-success::before {
    background: #22c55e;
}

.custom-alert-error {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-color: #fecaca;
    color: #991b1b;
}

.custom-alert-error::before {
    background: #ef4444;
}

.custom-alert-warning {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-color: #fde68a;
    color: #92400e;
}

.custom-alert-warning::before {
    background: #f59e0b;
}

.custom-alert-info {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #bfdbfe;
    color: #1e40af;
}

.custom-alert-info::before {
    background: #3b82f6;
}

.custom-alert-icon {
    flex-shrink: 0;
    margin-left: 12px;
    font-size: 1.25rem;
}

.custom-alert-content {
    flex: 1;
}

.custom-alert-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.custom-alert-message {
    font-size: 0.875rem;
    line-height: 1.4;
}

.custom-alert-close {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    margin-right: auto;
    margin-left: 12px;
    transition: all 0.2s ease;
    color: inherit;
}

.custom-alert-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

/* أنيميشن */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.custom-alert.hiding {
    animation: fadeOut 0.3s ease-in forwards;
}

/* أنماط أخطاء الحقول */
.field-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 6px;
    display: flex;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.field-error-icon {
    margin-left: 4px;
}

.input-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.input-error:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* رسائل التنبيه داخل المحتوى */
.inline-alert {
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid;
    animation: slideInDown 0.3s ease-out;
}

.inline-alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.inline-alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.inline-alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.inline-alert-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}