/* Фильтр */
select.gt-select { padding-right: 75px !important; }


/* 1. Общая стилизация полей и селектов */
.search-content input,
.search-content select.gt-select {
    width: 100% !important;
    height: 50px !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    background-color: #fff !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
    display: block !important;

    /* Убираем стандартную черную стрелку браузера */
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;

    /* Рисуем свою СВЕТЛО-СЕРУЮ стрелку (%23adb5bd) */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23adb5bd%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-size: 10px !important;
}

/* Плавная смена цвета рамки у полей фильтра */
.search-content input,
.search-content select.gt-select {
	transition: border-color 0.15s ease;
}


/* 2. ЖЕСТКО ЗАДАЕМ ШРИФТ */
.search-content input,
.search-content select.gt-select,
.search-content .gt-form-container input,
.search-content .gt-form-container select,
.gt-event-search-tool.gt-dark .search-content input,
.gt-event-search-tool.gt-dark .search-content select,
.gt-event-search-tool.gt-dark input,
.gt-event-search-tool.gt-dark select {
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: normal !important;
    color: #6c757d !important;
    line-height: 1.5 !important;
}

/* 3. Плейсхолдер */
.search-content input::placeholder,
.gt-event-search-tool.gt-dark input::placeholder {
    color: #6c757d !important;
    opacity: 1 !important;
    font-size: 15px !important;
}


/* 4. Убираем фокусную рамку */
.search-content input:focus,
.search-content select.gt-select:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: #ced4da !important;
}

/* 5. Выравниваем колонки и кнопку */
.search-content .gt-col {
    margin-bottom: 0px !important;
}

.search-content .gt-submit {
    width: 100% !important;
    height: 50px !important;
    margin: 0 !important;
}

/* 6. Деликатная подсветка заполненных полей фильтра (для текстовых полей — ставит JS).
   Рамка не удаляется, меняется только цвет — без сдвигов и моргания. */
.search-content input.has-value {
    border-color: rgba(43, 125, 233, 0.45) !important;
}

.search-content input.has-value:focus {
    border-color: rgba(43, 125, 233, 0.6) !important;
}


/* 6а. Мгновенная подсветка и скрытие стрелки у селектов с выбранным значением.
   Реагирует на реальное состояние поля: очистил крестиком — всё исчезло сразу. */
.search-content select[name="tag"]:has(option:checked:not([value=""])),
.search-content select[name="location"]:has(option:checked:not([value=""])),
.search-content select[name="organizer"]:has(option:checked:not([value=""])) {
    border-color: rgba(43, 125, 233, 0.45) !important;
    background-image: none !important;
}

/* Заполненное поле в фокусе — рамка чуть ярче */
.search-content select[name="tag"]:has(option:checked:not([value=""])):focus,
.search-content select[name="location"]:has(option:checked:not([value=""])):focus,
.search-content select[name="organizer"]:has(option:checked:not([value=""])):focus {
    border-color: rgba(43, 125, 233, 0.6) !important;
}


/* Псевдокрестик прячется, когда скрипт поставил настоящий (или поле очистили) */
.gt-inner.has-real-clear::after,
.gt-inner.cleared::after {
    content: none !important;
}



/* 6б. Нулевая задержка: крестик рисуется CSS-ом в первый кадр */
.search-content .gt-inner:has(> select[name="tag"]:has(option:checked:not([value=""]))),
.search-content .gt-inner:has(> select[name="location"]:has(option:checked:not([value=""]))),
.search-content .gt-inner:has(> select[name="organizer"]:has(option:checked:not([value=""]))) {
    position: relative;
}

.search-content .gt-inner:has(> select[name="tag"]:has(option:checked:not([value=""]))):after,
.search-content .gt-inner:has(> select[name="location"]:has(option:checked:not([value=""]))):after,
.search-content .gt-inner:has(> select[name="organizer"]:has(option:checked:not([value=""]))):after {
    content: "\00D7";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e74c3c;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
}

/* Псевдокрестик прячется, когда скрипт поставил настоящий (или поле очистили) */
.gt-inner.has-real-clear::after,
.gt-inner.cleared::after {
    content: none !important;
}


/* 7. Активная опция */
.search-content select.gt-select.has-value option:hover,
.search-content select.gt-select.has-value option:checked {
    background-color: #eef2ff;
    color: #2b7de9;
    font-weight: 500;
}
