/**
 * Acuo Travel Agent - Filter Customizer Styles
 *
 * This file contains CSS rules for styling and customizing the travel package filter
 * component. It uses CSS custom properties (variables) to allow for easy customization
 * through the WordPress admin or Elementor interface.
 *
 * @package Acuo_Travel_Agent
 * @version 1.0.0
 */

/**
 * Filter Form Container
 *
 * Main container for the travel filter form with customizable properties
 * for background, width, padding, margins, borders, and positioning.
 */
.acuo-travel-filter {
    --filter-form-bg: #ffffff;
    --filter-form-width: 100%;
    --filter-form-padding: 10px 20px;
    --filter-form-margin: 0 0 30px 0;
    --filter-form-border-radius: 5px;
    --filter-form-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    --filter-form-position: static;
    --filter-form-border: 1px solid #e0e0e0;
    background-color: var(--filter-form-bg);
    width: var(--filter-form-width);
    padding: var(--filter-form-padding);
    margin: var(--filter-form-margin);
    border-radius: var(--filter-form-border-radius);
    box-shadow: var(--filter-form-box-shadow);
    position: var(--filter-form-position);
    border: var(--filter-form-border);
}

/**
 * Form Labels
 *
 * Styling for form labels with customizable properties for color, font size,
 * weight, margins, and alignment. Labels are hidden by default.
 */
.acuo-filter-form label {
    --label-color: #333;
    --label-font-size: 14px;
    --label-font-weight: 600;
    --label-margin: 0 0 8px 0;
    --label-text-align: left;
    color: var(--label-color);
    font-size: var(--label-font-size);
    font-weight: var(--label-font-weight);
    margin: var(--label-margin);
    text-align: var(--label-text-align);
    display: none;
}

/**
 * Select Dropdowns
 *
 * Base styling for select dropdowns with customizable properties for
 * background, text color, borders, padding, dimensions, and font size.
 */
.acuo-select {
    --select-bg: #fff;
    --select-color: #666;
    --select-border: 1px solid #ddd;
    --select-border-radius: 4px;
    --select-padding: 10px 10px 10px 40px;
    --select-width: 100%;
    --select-height: auto;
    --select-font-size: 16px;
    --select-margin: 0;
    --select-display: block;
    --select-align: left;
    background-color: var(--select-bg);
    color: var(--select-color);
    border: var(--select-border);
    border-radius: var(--select-border-radius);
    padding: var(--select-padding);
    width: var(--select-width);
    height: var(--select-height);
    font-size: var(--select-font-size);
    margin: var(--select-margin);
    display: var(--select-display);
    text-align: var(--select-align);
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-repeat: no-repeat;
    background-position: 10px center, right 10px center;
    background-size: 20px, 12px;
}

/**
 * Default Select Dropdown Arrow
 *
 * Adds a dropdown arrow icon to all select elements.
 */
.acuo-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23666' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 12px;
    border: 1px solid #ddd;
}

/**
 * Destination Select Dropdown
 *
 * Adds a location pin icon to the first dropdown (destination).
 */
.acuo-filter-column:nth-child(1) .acuo-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='%23666' d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23666' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-position: 10px center, right 10px center;
    background-repeat: no-repeat, no-repeat;
    background-size: 20px, 12px;
    background-color: var(--select-bg);
    z-index: 1;
}

/**
 * Experience Select Dropdown
 *
 * Adds a star icon to the second dropdown (experience).
 */
.acuo-filter-column:nth-child(2) .acuo-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='%23666' d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23666' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-position: 10px center, right 10px center;
    background-repeat: no-repeat, no-repeat;
    background-size: 20px, 12px;
    background-color: var(--select-bg);
    z-index: 1;
}

/**
 * Period Select Dropdown
 *
 * Adds a clock icon to the third dropdown (period).
 */
.acuo-filter-column:nth-child(3) .acuo-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='%23666' d='M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23666' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-position: 10px center, right 10px center;
    background-repeat: no-repeat, no-repeat;
    background-size: 20px, 12px;
    background-color: var(--select-bg);
    z-index: 1;
}

/**
 * Filter Button
 *
 * Styling for the filter/search button with customizable properties for
 * background, text color, borders, padding, dimensions, and font properties.
 */
.acuo-filter-button {
    --button-bg: #ff9800;
    --button-color: #fff;
    --button-hover-bg: #e68a00;
    --button-hover-color: #fff;
    --button-border: none;
    --button-border-radius: 4px;
    --button-padding: 10px 30px;
    --button-font-size: 16px;
    --button-font-weight: 500;
    --button-width: auto;
    --button-height: auto;
    --button-margin: 0;
    --button-text-align: center;
    background-color: var(--button-bg);
    color: var(--button-color);
    border: var(--button-border);
    border-radius: var(--button-border-radius);
    padding: var(--button-padding);
    font-size: var(--button-font-size);
    font-weight: var(--button-font-weight);
    width: var(--button-width);
    height: var(--button-height);
    margin: var(--button-margin);
    text-align: var(--button-text-align);
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    text-transform: uppercase;
}

/**
 * Filter Button Hover State
 */
.acuo-filter-button:hover {
    background-color: var(--button-hover-bg);
    color: var(--button-hover-color);
}

/**
 * Filter Row Layout
 *
 * Flexbox container for the filter form elements with customizable
 * properties for alignment and spacing.
 */
.acuo-filter-row {
    --filter-row-justify: space-between;
    --filter-row-align: center;
    --filter-row-gap: 0;
    display: flex;
    flex-wrap: nowrap;
    justify-content: var(--filter-row-justify);
    align-items: var(--filter-row-align);
/*     gap: var(--filter-row-gap); */
}

/**
 * Filter Column Layout
 *
 * Individual columns within the filter row with customizable
 * properties for alignment and width.
 */
.acuo-filter-column {
    --filter-column-align: flex-start;
    --filter-column-width: auto;
    text-align: var(--filter-column-align);
    width: var(--filter-column-width);
    padding: 0 10px;
    flex: 1;
}

/**
 * Last Filter Column (Button Column)
 *
 * Special styling for the last column which contains the filter button.
 */
.acuo-filter-column:last-child {
    flex: 0 0 auto;
}

/**
 * Text Alignment Utility Classes
 *
 * Utility classes for controlling text alignment.
 */
.acuo-text-left {
    text-align: left;
}
.acuo-text-center {
    text-align: center;
}
.acuo-text-right {
    text-align: right;
}

/**
 * Flex Alignment Utility Classes
 *
 * Utility classes for controlling flex container alignment.
 */
.acuo-flex-start {
    justify-content: flex-start;
}
.acuo-flex-center {
    justify-content: center;
}
.acuo-flex-end {
    justify-content: flex-end;
}

/**
 * Select2 Integration
 *
 * Styling for Select2 dropdown elements to match the custom styling.
 */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    background-color: var(--select-bg);
    border: var(--select-border);
    border-radius: var(--select-border-radius);
    min-height: 42px; 
}

/**
 * Select2 Icons
 *
 * Common styling for Select2 dropdown icons.
 */
.acuo-filter-column:nth-child(1) .select2-container .select2-selection,
.acuo-filter-column:nth-child(2) .select2-container .select2-selection,
.acuo-filter-column:nth-child(3) .select2-container .select2-selection {
    padding-left: 40px;
    background-repeat: no-repeat;
    background-position: 10px center;
    background-size: 20px;
}

/**
 * Select2 Destination Icon
 */
.acuo-filter-column:nth-child(1) .select2-container .select2-selection {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='%23666' d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");
}

/**
 * Select2 Experience Icon
 */
.acuo-filter-column:nth-child(2) .select2-container .select2-selection {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='%23666' d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
}

/**
 * Select2 Period Icon
 */
.acuo-filter-column:nth-child(3) .select2-container .select2-selection {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='%23666' d='M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z'/%3E%3C/svg%3E");
}

/**
 * Pagination Container
 *
 * Styling for the pagination container with customizable properties for
 * margins, padding, text alignment, font size, and borders.
 */
.acuo-pagination {
    --pagination-margin: 30px 0 0 0;
    --pagination-padding: 15px 0;
    --pagination-text-align: center;
    --pagination-font-size: 16px;
    --pagination-border-top: 1px solid #e0e0e0;
    margin: var(--pagination-margin);
    padding: var(--pagination-padding);
    text-align: var(--pagination-text-align);
    font-size: var(--pagination-font-size);
    border-top: var(--pagination-border-top);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

/**
 * Pagination Links
 *
 * Styling for individual pagination links with customizable properties for
 * colors, backgrounds, borders, padding, and dimensions.
 */
.acuo-pagination-link {
    --pagination-link-color: #666;
    --pagination-link-bg: #f5f5f5;
    --pagination-link-hover-color: #fff;
    --pagination-link-hover-bg: #ff9800;
    --pagination-link-active-color: #fff;
    --pagination-link-active-bg: #ff9800;
    --pagination-link-border: none;
    --pagination-link-border-radius: 4px;
    --pagination-link-padding: 8px 12px;
    --pagination-link-margin: 0 2px;
    --pagination-link-min-width: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--pagination-link-color);
    background-color: var(--pagination-link-bg);
    border: var(--pagination-link-border);
    border-radius: var(--pagination-link-border-radius);
    padding: var(--pagination-link-padding);
    margin: var(--pagination-link-margin);
    min-width: var(--pagination-link-min-width);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

/**
 * Pagination Link Hover State
 */
.acuo-pagination-link:hover {
    color: var(--pagination-link-hover-color);
    background-color: var(--pagination-link-hover-bg);
}

/**
 * Active Pagination Link
 */
.acuo-pagination-link.active {
    color: var(--pagination-link-active-color);
    background-color: var(--pagination-link-active-bg);
    cursor: default;
}

/**
 * Previous/Next Pagination Links
 */
.acuo-pagination-prev,
.acuo-pagination-next {
    font-weight: 600;
}


/**
 * Responsive Styles
 *
 * Adjustments for mobile devices (screens up to 768px wide).
 */
@media (max-width: 768px) {
    .acuo-filter-row {
        flex-direction: column;
        gap: 15px;
    }
    .acuo-filter-column {
        width: 100%;
        padding: 0;
    }
    .acuo-filter-button {
        width: 100%;
        margin-top: 15px;
    }
    .acuo-select {
        margin-bottom: 0;
    }
    .acuo-pagination {
        --pagination-font-size: 14px;
    }
    .acuo-pagination-link {
        --pagination-link-padding: 6px 10px;
        --pagination-link-min-width: 32px;
    }
}