﻿/* =============================================
   MODAL - پنجره‌های بازشو
   ============================================= */

/* ----- پس‌زمینه ----- */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.5) !important;
}

/* ----- محتوای مودال ----- */
.modal-content {
    border-radius: 20px !important;
    border: none !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden;
}

/* ----- هدر ----- */
.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    background: #fafafa;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #374151;
}

    .modal-title i {
        color: #ef4444;
        margin-left: 8px;
    }

/* ----- دکمه بستن ----- */
.close,
.btn-close {
    font-size: 20px;
    color: #6b7280;
    opacity: 0.7;
    transition: all 0.2s ease;
}

    .close:hover,
    .btn-close:hover {
        opacity: 1;
        color: #ef4444;
    }

/* ----- بدنه ----- */
.modal-body {
    padding: 25px;
    max-height: 70vh;
    overflow-y: auto;
}

/* ----- فوتر ----- */
.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
}

/* ----- لیست داخل مودال ----- */
.modal-custom-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .modal-custom-list li {
        padding: 12px 16px;
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.2s ease;
        margin-bottom: 4px;
    }

        .modal-custom-list li:hover {
            background: rgba(239, 68, 68, 0.05);
        }

        .modal-custom-list li.selected,
        .modal-custom-list li.active {
            background: rgba(239, 68, 68, 0.1);
            color: #ef4444;
            font-weight: 600;
        }

/* ----- DARK MODE ----- */
.dark-mode .modal-content {
    background: #1e293b;
}

.dark-mode .modal-header {
    background: #1a2236;
    border-bottom-color: #334155;
}

.dark-mode .modal-title {
    color: #e2e8f0;
}

.dark-mode .modal-body {
    background: #1e293b;
    color: #e2e8f0;
}

.dark-mode .modal-footer {
    background: #1a2236;
    border-top-color: #334155;
}

.dark-mode .close,
.dark-mode .btn-close {
    color: #94a3b8;
}

.dark-mode .modal-custom-list li:hover {
    background: rgba(239, 68, 68, 0.1);
}

.dark-mode .modal-custom-list li.selected,
.dark-mode .modal-custom-list li.active {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}
/* ----- دکمه بستن مودال ----- */
.modal-header .btn-default {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: rgba(0,0,0,0.05) !important;
    border: none !important;
    color: #6b7280 !important;
    font-size: 16px !important;
    transition: all 0.25s ease !important;
    cursor: pointer !important;
}

    .modal-header .btn-default:hover {
        background: #ef4444 !important;
        color: white !important;
        transform: rotate(90deg) !important;
    }

    .modal-header .btn-default i {
        margin: 0 !important;
    }

/* Dark mode */
.dark-mode .modal-header .btn-default {
    background: rgba(255,255,255,0.08) !important;
    color: #94a3b8 !important;
}

    .dark-mode .modal-header .btn-default:hover {
        background: #ef4444 !important;
        color: white !important;
    }
/* =============================================
   FULLSCREEN MODAL - نمایش تمام صفحه تصاویر
   ============================================= */

.fullscreen-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

    .fullscreen-modal .close {
        position: absolute;
        top: 20px;
        right: 35px;
        color: #f1f1f1;
        font-size: 40px;
        font-weight: bold;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 100000;
        transition: 0.3s;
    }

        .fullscreen-modal .close:hover {
            color: #ef4444;
        }

    .fullscreen-modal .prev,
    .fullscreen-modal .next {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(0, 0, 0, 0.6);
        color: white;
        font-size: 30px;
        padding: 12px 18px;
        border: none;
        cursor: pointer;
        border-radius: 50%;
        transition: 0.3s;
        z-index: 100000;
    }

    .fullscreen-modal .prev {
        left: 20px;
    }

    .fullscreen-modal .next {
        right: 20px;
    }

        .fullscreen-modal .prev:hover,
        .fullscreen-modal .next:hover {
            background: #ef4444;
        }

#fullscreenImage {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    display: block;
    margin: auto;
}

/* Dark mode - fullscreen */
.dark-mode .fullscreen-modal {
    background-color: rgba(0, 0, 0, 0.97);
}
/* ========== MODAL RATING - نظردهی ========== */
.modal-star-rating {
    direction: rtl; /* تغییر به rtl */
    display: flex;
    justify-content: flex-end; /* چسبیدن به راست */
    gap: 5px;
}

    .modal-star-rating input {
        display: none;
    }

    .modal-star-rating label {
        font-size: 35px;
        color: #ccc;
        cursor: pointer;
        transition: all 0.2s ease;
    }

        /* hover - زرد کمرنگ */
        .modal-star-rating label:hover,
        .modal-star-rating label:hover ~ label {
            color: #ffdb7e !important;
        }

    /* کلیک/انتخاب شده - طلایی پررنگ */
    .modal-star-rating input:checked ~ label {
        color: #ffc107 !important;
    }

/* متن‌های راهنما */
.rating-caption {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #888;
    direction: rtl; /* متن هم راست‌چین */
}

    .rating-caption .weak {
        text-align: right; /* ضعیف سمت راست */
    }

    .rating-caption .great {
        text-align: left; /* عالی سمت چپ */
    }
.modal-star-rating {
    direction: ltr; /* ltr بذار */
    display: flex;
    justify-content: flex-start;
    gap: 5px;
}