/* 1. Скрываем стандартные радиокнопки */
.star-rating input[type="radio"] {
    display: none;
}

/* 2. Контейнер для звезд */
.star-rating {
    display: flex;
    /* Делает звезды в ряд */
    flex-direction: row-reverse;
    /* Располагает звезды справа налево для CSS-хака */
    justify-content: flex-end;
    /* Выравнивает звезды вправо, если контейнер шире */
    font-size: 2.5em;
    /* Размер звезд */
    color: #ccc;
    /* Цвет неактивных звезд */
    line-height: 1;
    /* Важно, чтобы избежать лишних отступов по высоте */
}

/* 3. Стили для каждой звезды (label) */
.star-rating label {
    cursor: pointer;
    position: relative;
    /* Для позиционирования иконки */
    width: 1.1em;
    /* Ширина для каждой звезды */
    height: 1.1em;
    /* Высота для каждой звезды */
    text-align: center;
    /* Центрируем иконку внутри label */
    margin: 0 2px;
    /* Небольшой отступ между звездами */
    display: flex;
    /* Делаем label flex-контейнером */
    align-items: center;
    /* Выравниваем по центру по вертикали */
    justify-content: center;
    /* Выравниваем по центру по горизонтали */
}

/* 4. Иконки звезд (используем Font Awesome) */
.star-rating label:before {
    content: '\f005';
    /* Код для звезды Font Awesome Solid */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    display: inline-block;
    /* Иконка как инлайн-блок */
}

/* 5. Скрываем текст "N звезд", но оставляем его для скринридеров */
.star-rating label span.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 6. Изменение цвета звезд при наведении и выборе */
.star-rating input[type="radio"]:checked~label {
    color: #ffc107;
    /* Цвет выбранных звезд (желтый) */
}

.star-rating label:hover,
.star-rating label:hover~label {
    color: #ffc107;
    /* Цвет звезд при наведении */
}

/* 7. Опционально: эффект плавности */
.star-rating label,
.star-rating label:before {
    transition: color 0.2s ease-in-out;
}

/* Стилизация для валидации Bootstrap 4 (если input invalid, показываем feedback) */
.star-rating:has(input[type="radio"]:invalid)+.invalid-feedback {
    display: block;
}

.image-preview,
#callback-preview {
    width: 250px;
    height: 250px;
    border: 2px dashed #ddd;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    background-color: #ffffff;
    color: #ecf0f1;
}

.image-preview label,
#callback-preview label {
    position: absolute;
    z-index: 5;
    opacity: 0.8;
    cursor: pointer;
    background-color: #bdc3c7;
    width: 150px;
    height: 50px;
    font-size: 12px;
    line-height: 50px;
    text-transform: uppercase;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    text-align: center;
}

.image-preview input,
#callback-preview input {
    line-height: 200px;
}

/* 1. Скрываем стандартные радиокнопки */
.star-rating input[type="radio"] {
    display: none;
}

/* 2. Контейнер для звезд */
.star-rating {
    display: flex;
    /* Делает звезды в ряд */
    flex-direction: row-reverse;
    /* Располагает звезды справа налево для CSS-хака */
    justify-content: flex-end;
    /* Выравнивает звезды вправо, если контейнер шире */
    font-size: 2.5em;
    /* Размер звезд */
    color: #ccc;
    /* Цвет неактивных звезд */
    line-height: 1;
    /* Важно, чтобы избежать лишних отступов по высоте */
}

/* 3. Стили для каждой звезды (label) */
.star-rating label {
    cursor: pointer;
    position: relative;
    /* Для позиционирования иконки */
    width: 1.1em;
    /* Ширина для каждой звезды */
    height: 1.1em;
    /* Высота для каждой звезды */
    text-align: center;
    /* Центрируем иконку внутри label */
    margin: 0 2px;
    /* Небольшой отступ между звездами */
    display: flex;
    /* Делаем label flex-контейнером */
    align-items: center;
    /* Выравниваем по центру по вертикали */
    justify-content: center;
    /* Выравниваем по центру по горизонтали */
}

/* 4. Иконки звезд (используем Font Awesome) */
.star-rating label:before {
    content: '\f005';
    /* Код для звезды Font Awesome Solid */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    display: inline-block;
    /* Иконка как инлайн-блок */
}

/* 5. Скрываем текст "N звезд", но оставляем его для скринридеров */
.star-rating label span.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 6. Изменение цвета звезд при наведении и выборе */
.star-rating input[type="radio"]:checked~label {
    color: #ffc107;
    /* Цвет выбранных звезд (желтый) */
}

.star-rating label:hover,
.star-rating label:hover~label {
    color: #ffc107;
    /* Цвет звезд при наведении */
}

/* 7. Опционально: эффект плавности */
.star-rating label,
.star-rating label:before {
    transition: color 0.2s ease-in-out;
}

/* Стилизация для валидации Bootstrap 4 (если input invalid, показываем feedback) */
.star-rating:has(input[type="radio"]:invalid)+.invalid-feedback {
    display: block;
}

.image-preview,
#callback-preview {
    width: 250px;
    height: 250px;
    border: 2px dashed #ddd;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    background-color: #ffffff;
    color: #ecf0f1;
}

.image-preview label,
#callback-preview label {
    position: absolute;
    z-index: 5;
    opacity: 0.8;
    cursor: pointer;
    background-color: #bdc3c7;
    width: 150px;
    height: 50px;
    font-size: 12px;
    line-height: 50px;
    text-transform: uppercase;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    text-align: center;
}

.image-preview input,
#callback-preview input {
    line-height: 200px;
    font-size: 200px;
    position: absolute;
    opacity: 0;
    z-index: 10;
}


.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #6d61ea !important;
}

/* =========================
   MOBILE MENU
========================= */

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    transition: right 0.3s ease;
    z-index: 1000;
    padding: 20px;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.mobile-menu__list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.mobile-menu__list>li {
    border-bottom: 1px solid #f8f9fa;
}

.mobile-menu__list>li:last-child {
    border-bottom: none;
}

.mobile-menu__list a,
.mobile-menu__list .d-flex {
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    color: #222;
    display: block;
    padding: 12px 0;
    cursor: pointer;
}

.mobile-menu__sublist {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f9fafb;
    border-radius: 8px;
    padding: 5px 15px;
    margin-bottom: 10px;
}

.mobile-menu__sublist a {
    font-size: 14px;
    padding: 8px 0;
    color: #555;
}

/* Burger */
.burger {
    width: 28px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    /* Ensure above navbar items */
}

.burger span {
    height: 2px;
    background: #000;
    width: 100%;
    transition: all 0.3s ease;
}

/* Burger Animation */
.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Overlay */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 999;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.btn-close-menu {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #555;
    cursor: pointer;
}

/* Hide mobile elements on desktop */
@media (min-width: 992px) {

    .burger,
    .mobile-menu,
    .mobile-overlay {
        display: none !important;
    }
}

/* Alpine cloak */
[x-cloak] {
    display: none !important;
}

/* Transform utilities для Alpine */
.-translate-x-full {
    transform: translateX(-100%);
}

.translate-x-0 {
    transform: translateX(0);
}

/* =========================
   FILTERS BAR (MOBILE & DESKTOP)
========================= */

/* =========================
   PREMIUM FILTERS BAR
========================= */

.mobile-filters {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 15px !important;
    margin-bottom: 25px;
    padding: 12px 20px !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
}


.filters-left {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: nowrap !important;
}

/* Base buttons */
.filter-btn {
    background: #f8fafc !important;
    border: 1px solid #e5e7eb !important;
    height: 44px !important;
    /* Fixed height for consistency */
    padding: 0 18px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #475569 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.25s ease !important;
    cursor: pointer !important;
    white-space: nowrap !important;
}

.filter-btn:after {
    display: none !important;
    /* Remove bootstrap arrow if needed */
}

.filter-btn:hover,
.filter-btn.show,
.filter-btn[aria-expanded="true"] {
    border-color: #ff7a00 !important;
    color: #ff7a00 !important;
    background: #fff !important;
    transform: translateY(-2px);
}

/* Segmented control for view toggle */
.view-toggle {
    background: #f1f5f9 !important;
    border-radius: 14px !important;
    padding: 4px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: auto !important;
}

.view-btn {
    border: none !important;
    background: transparent !important;
    width: 44px !important;
    height: 36px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    color: #64748b !important;
    transition: all 0.25s ease !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
}

.view-btn i {
    font-size: 16px !important;
}

.view-btn.active {
    background: #0b1120 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(11, 17, 32, 0.2) !important;
}

.view-btn:not(.active):hover {
    color: #ff7a00 !important;
}

/* Fix for dropdown positioning */
.filters-left .dropdown {
    display: inline-block !important;
}

/* Dropdown refinements */
.dropdown-menu {
    border-radius: 16px !important;
    margin-top: 10px !important;
    z-index: 1100 !important;
}

.dropdown-item:active {
    background-color: #ff7a00 !important;
}

.form-check-input:checked {
    background-color: #ff7a00;
    border-color: #ff7a00;
}

/* Responsive visibility */
@media (max-width: 767px) {
    .desktop-filters {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .mobile-filters {
        display: none !important;
    }
}

/* =========================
   UI FIXES
========================= */

/* Fix for notification transparency issue in header dropdown */
.notification-item, 
.notification-item .media {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure dropdown simplebar doesn't cut off content with gradients */
[data-simplebar] .simplebar-content::after {
    display: none !important;
}

/* Sidebar: keep icon + label + arrow on one line instead of wrapping
   (long menu labels used to push the arrow onto its own line) */
#sidebar-menu ul li a {
    display: flex;
    align-items: center;
}

#sidebar-menu ul li a i {
    flex: 0 0 auto;
}

#sidebar-menu ul li a span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#sidebar-menu ul li a.has-arrow:after {
    flex: 0 0 auto;
    margin-left: auto;
}