/* =====================================================
   FILTER MOBILE STYLES
   Consolidated V1-V16 mobile filter patches
   Removes duplicates, keeps final working versions
   ===================================================== */

/* === MOBILE FILTER LAYOUT === */
@media (max-width: 960px) {
    .mtc-travel-wrapper {
        flex-direction: column;
    }

    /* Hide desktop filters on mobile - use mobile popup instead */
    .mtc-travel-wrapper #mtc-filters {
        display: none !important;
    }

    /* Show mobile filter button */
    .mtc-travel-wrapper .mtc-mobile-filter-button {
        display: inline-flex;
    }

    /* Mobile filter popup styles */
    .mtc-filter-popup-body .mtc-filter {
        margin-bottom: 1.5rem;
    }

    .mtc-filter-popup-body .mtc-filter label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 600;
        color: var(--primary-dark);
        font-size: 0.9rem;
    }

    /* Style inputs/selects within mobile popup */
    .mtc-filter-popup-body select,
    .mtc-filter-popup-body input[type="number"],
    .mtc-filter-popup-body input[type="text"] {
        width: 100%;
        padding: 0.6rem 0.8rem;
        border: 1px solid #ccc;
        border-radius: 4px;
        font-size: 0.9rem;
        background-color: var(--primary-light);
        font-family: inherit;
    }
}

/* === MOBILE FILTER MODAL HEADER === */
/* FILTRE title - consolidated from V1-V16 */
#mtc-mobile-filters > h3,
.elementor-popup-modal #mtc-mobile-filters h3,
.mtc-filter-popup h3,
.mtc-filter-popup-body h3 {
    font-family: Quicksand, sans-serif;
    font-weight: 400;
    font-size: 24px;
    line-height: 2.5rem;
    text-transform: uppercase;
    text-align: center;
    color: #4b241b;
    margin-top: 0.5rem;
    margin-bottom: 0.83em;
    border-bottom: none;
    text-decoration: none;
    padding-bottom: 0;
    background: none;
    font-style: normal;
    letter-spacing: 0.1em;
}

/* Remove any underline/pseudo-element from title */
#mtc-mobile-filters > h3::after,
#mtc-mobile-filters > h3::before,
.elementor-popup-modal #mtc-mobile-filters h3::after,
.elementor-popup-modal #mtc-mobile-filters h3::before {
    display: none;
    content: none;
    border: none;
    background: none;
}

/* === SECTION LABELS === */
/* Section labels - consolidated from V1-V16 */
#mtc-mobile-filters .mtc-filter-header h5,
#mtc-mobile-filters .mtc-filter h5,
#mtc-mobile-filters h5,
.elementor-popup-modal #mtc-mobile-filters h5 {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    color: #4b241b;
    font-size: 16px;
    font-style: normal;
    margin-bottom: 8px;
    cursor: pointer;
}

/* Od and Do labels in date section */
#mtc-mobile-filters .mtc-filter-content label,
#mtc-mobile-filters .date-label {
    color: #5D4037;
    font-weight: 400;
    font-size: 14px;
}

/* === HIDE SEARCH FIELD === */
/* Hide Search field from mobile filter modal */
#mtc-mobile-filters .mtc-filter:has(#mtc-mobile-search-text),
#mtc-mobile-filters .mtc-filter:has(label[for="mtc-mobile-search-text"]),
.elementor-popup-modal #mtc-mobile-filters .mtc-filter:first-of-type:has(input[type="text"]),
#mtc-mobile-filters > .mtc-filter:first-child {
    display: none;
}

#mtc-mobile-filters .mtc-filter label[for="mtc-mobile-search-text"],
#mtc-mobile-filters #mtc-mobile-search-text {
    display: none;
}

/* === COLLAPSIBLE BEHAVIOR === */
/* Make filter headers non-collapsible appearance */
#mtc-mobile-filters .mtc-filter-header {
    cursor: default;
}

/* Ensure filter content is always visible (not collapsed) */
#mtc-mobile-filters .mtc-filter-content {
    display: block;
    max-height: none;
    overflow: visible;
}

/* === DROPDOWN FIELDS === */
/* All dropdowns uniform height (including Country and Date range) - consolidated */
#mtc-mobile-filters .select2-container--default .select2-selection--single,
#mtc-mobile-filters .select2-container .select2-selection--single,
#mtc-mobile-filters select,
#mtc-mobile-filters .mtc-filter select,
#mtc-mobile-filters #mtc-mobile-country-select + .select2-container .select2-selection--single {
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #ffffff;
}

#mtc-mobile-filters .select2-container--default .select2-selection--single {
    height: 40px;
    min-height: 40px;
    background-color: #ffffff;
}

/* Dropdown text positioning - consolidated */
#mtc-mobile-filters .select2-selection__rendered,
#mtc-mobile-filters .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #8B4513;
    font-size: 14px;
    line-height: 36px;
    padding-left: 12px;
}

/* Dropdown arrow positioning */
#mtc-mobile-filters .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

/* Country field specific adjustments */
#mtc-mobile-filters .mtc-filter:has(#mtc-mobile-country-select) .select2-selection--single,
#mtc-mobile-filters #mtc-mobile-country-select + .select2-container .select2-selection--single {
    min-height: 52px;
    height: 52px;
    padding: 14px 15px;
    display: flex;
    align-items: center;
}

#mtc-mobile-filters .mtc-filter:has(#mtc-mobile-country-select) .select2-selection__rendered,
#mtc-mobile-filters #mtc-mobile-country-select + .select2-container .select2-selection__rendered {
    line-height: 24px;
    padding-left: 0;
}

#mtc-mobile-filters .mtc-filter:has(#mtc-mobile-country-select) .select2-selection__arrow,
#mtc-mobile-filters #mtc-mobile-country-select + .select2-container .select2-selection__arrow {
    height: 50px;
    top: 0;
}

/* === DATE RANGE INPUTS === */
#mtc-mobile-filters input[type="text"],
#mtc-mobile-filters input[type="date"],
#mtc-mobile-filters .mtc-date-input,
#mtc-mobile-filters .date-picker-input {
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

/* === MULTISELECT CHARACTERISTICS === */
/* Characteristics multiselect - show as proper dropdown */
#mtc-mobile-filters select[multiple],
#mtc-mobile-filters .mtc-filter select[multiple],
.elementor-popup-modal #mtc-mobile-filters select[multiple] {
    height: auto;
    min-height: 42px;
    max-height: 150px;
    overflow-y: auto;
    padding: 4px;
    border-radius: 4px;
}

#mtc-mobile-filters select[multiple] option,
.elementor-popup-modal #mtc-mobile-filters select[multiple] option {
    padding: 6px 8px;
    font-size: 14px;
}

/* Select2 for characteristics - proper dropdown display */
#mtc-mobile-filters .select2-container--default .select2-selection--multiple,
.elementor-popup-modal #mtc-mobile-filters .select2-container--default .select2-selection--multiple {
    min-height: 42px;
    border-radius: 4px;
    padding: 4px 8px;
}

#mtc-mobile-filters .select2-container--default .select2-selection--multiple .select2-selection__rendered,
.elementor-popup-modal #mtc-mobile-filters .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* === COUNTRY FIELD PLACEHOLDER === */
/* Country field placeholder - center aligned */
#mtc-mobile-filters select[name*="country"] option:first-child,
#mtc-mobile-filters select[name*="krajin"] option:first-child,
#mtc-mobile-filters .country-select option:first-child,
.elementor-popup-modal #mtc-mobile-filters select[name*="country"] option:first-child,
.elementor-popup-modal #mtc-mobile-filters select[name*="krajin"] option:first-child {
    text-align: center;
}

/* Select2 country placeholder - center */
#mtc-mobile-filters .select2-selection__placeholder,
.elementor-popup-modal #mtc-mobile-filters .select2-selection__placeholder {
    text-align: center;
    width: 100%;
    display: block;
}

/* Select2 rendered text for country - center when placeholder */
#mtc-mobile-filters .select2-container .select2-selection--single .select2-selection__rendered,
.elementor-popup-modal #mtc-mobile-filters .select2-container .select2-selection--single .select2-selection__rendered {
    text-align: center;
    padding-left: 0;
    padding-right: 20px;
}

/* === FIX DUPLICATE SELECT2 === */
/* Hide duplicate Select2 containers */
#mtc-mobile-filters .mtc-filter:has(#mtc-mobile-country-select) .select2-container + .select2-container {
    display: none;
}

#mtc-mobile-filters .select2-container.select2-container--default + .select2-container.select2-container--default {
    display: none;
}

#mtc-mobile-filters select.mtc-searchable-select.select2-hidden-accessible + .select2-container + .select2-container {
    display: none;
}

#mtc-mobile-filters .mtc-select-wrapper .select2-container ~ .select2-container {
    display: none;
}

/* === BUTTONS === */
/* Primary submit/confirm button - POTVRDIŤ style */
#mtc-mobile-filters .mtc-filter-apply,
#mtc-mobile-filters .mtc-apply-filters,
#mtc-mobile-filters button[type="submit"],
#mtc-mobile-filters .button-primary,
.elementor-popup-modal #mtc-mobile-filters .mtc-filter-apply,
.elementor-popup-modal #mtc-mobile-filters button[type="submit"] {
    background-color: #d4882a;
    background: #d4882a;
    color: #ffffff;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    width: 100%;
    cursor: pointer;
    margin-top: 15px;
    margin-bottom: 10px;
    box-shadow: none;
    transition: background-color 0.2s ease;
}

#mtc-mobile-filters .mtc-filter-apply:hover,
#mtc-mobile-filters .mtc-apply-filters:hover,
#mtc-mobile-filters button[type="submit"]:hover {
    background-color: #c07a24;
    background: #c07a24;
}

/* Secondary reset/clear button - ZRUŠIŤ FILTRE style */
#mtc-mobile-filters .mtc-filter-reset,
#mtc-mobile-filters .mtc-clear-filters,
#mtc-mobile-filters .reset-filters,
#mtc-mobile-filters a.reset,
.elementor-popup-modal #mtc-mobile-filters .mtc-filter-reset,
.elementor-popup-modal #mtc-mobile-filters .mtc-clear-filters {
    background: transparent;
    background-color: transparent;
    color: #4b241b;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    padding: 10px 20px;
    width: 100%;
    cursor: pointer;
    text-align: center;
    display: block;
    text-decoration: none;
}

#mtc-mobile-filters .mtc-filter-reset:hover,
#mtc-mobile-filters .mtc-clear-filters:hover,
#mtc-mobile-filters .reset-filters:hover {
    text-decoration: underline;
}

/* === LAYOUT & SPACING === */
/* Overall spacing between filter sections */
#mtc-mobile-filters .mtc-filter {
    margin-bottom: 20px;
}

#mtc-mobile-filters .mtc-filter-collapsible {
    margin-bottom: 20px;
}

/* Modal padding */
#mtc-mobile-filters {
    padding-top: 20px;
}

/* Make filter sections full width */
#mtc-mobile-filters .mtc-filter,
#mtc-mobile-filters .mtc-filter-collapsible {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}

/* All dropdowns and inputs full width */
#mtc-mobile-filters .select2-container,
#mtc-mobile-filters select,
#mtc-mobile-filters input[type="text"],
#mtc-mobile-filters input[type="date"],
#mtc-mobile-filters .mtc-date-input {
    width: 100%;
    box-sizing: border-box;
}

/* === RESPONSIVE BREAKPOINTS === */
@media (max-width: 768px) {
    #mtc-mobile-filters > h3,
    .elementor-popup-modal #mtc-mobile-filters h3,
    .mtc-filter-popup h3 {
        font-size: 24px;
    }
}
