﻿.custom-alert {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 16px;
    color: white;
    z-index: 9999; /* افزایش z-index به بالاترین مقدار ممکن */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    width: 400px; /* اندازه ثابت برای نمایش بهتر */
}

    .custom-alert.success {
        background-color: #4CAF50; /* سبز */
    }

    .custom-alert.error {
        background-color: #f44336; /* قرمز */
    }

.close-alert {
    background: none;
    border: none;
    font-size: 20px;
    color: white;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 10px;
}

.close-alert {
    position: absolute;
    top: 0;
    right: 10px;
    font-size: 1.5rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.3s ease;
}

    .close-alert:hover {
        opacity: 1;
    }



/* استایل برای پس‌زمینه مودال */
.custom-modal-overlay {
    display: none; /* مودال در ابتدا مخفی باشد */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

/* استایل برای بدنه مودال */
.custom-modal {
    position: relative;
    width: 500px;
    max-width: 90%;
    margin: 100px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

/* استایل برای هدر مودال */
.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

    .custom-modal-header h3 {
        margin: 0;
    }

/* دکمه بستن مودال */
.close-btn {
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

/* بدنه مودال */
.custom-modal-body {
    padding: 20px 0;
    font-size: 16px;
    text-align: center;
}

/* پاورقی مودال */
.custom-modal-footer {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* دکمه‌ها */
.cancel-btn, .confirm-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.cancel-btn {
    background-color: #ccc;
    color: #333;
}

.confirm-btn {
    background-color: #e74c3c;
    color: white;
}

/* انیمیشن ورود مودال */
@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/* مخفی کردن ورودی فایل */
.file-input {
    display: none;
}

/* استایل برای دکمه انتخاب تصویر */
.upload-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4CAF50; /* رنگ سبز */
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
    margin-top: 10px;
}

    .upload-btn:hover {
        background-color: #45a049; /* تغییر رنگ هنگام هاور */
    }

/* استایل برای پیش‌نمایش */
#imagePreviewContainer {
    margin-top: 10px;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#imagePreview {
    max-width: 100%;
    height: auto;
}