/* Container */
.vg-search-eb-container {
    margin: 24px auto;
    padding: 0;
    max-width: 100%;
}

/* Main Filter Container */
.vg-search-eb {
    padding: 20px 0;
}

.vg-search-eb .eb-filter-container {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
}

/* Remove default margins */
.vg-search-eb .eb-filter-container .mb-3 {
    margin-bottom: 0 !important;
}

/* Labels */
.vg-search-eb .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

/* Horizontal Layout (Default for Desktop) */
.vg-search-eb.vg-search-eb-horizontal .eb-filter-container {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    align-items: end;
    gap: 20px;
}

.vg-search-eb.vg-search-eb-horizontal .eb-filter-container .mb-3 {
    width: 100%;
}

/* Vertical Layout */
.vg-search-eb.vg-search-eb-vertical .eb-filter-container {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
}

.vg-search-eb.vg-search-eb-vertical .eb-filter-container .mb-3 {
    width: 100%;
}

.vg-search-eb.vg-search-eb-vertical .form-label {
    text-align: left;
}

/* Form Elements */
.vg-search-eb .form-select,
.vg-search-eb .form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.vg-search-eb .form-select:focus,
.vg-search-eb .form-control:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    outline: none;
}

/* Filter Actions (Buttons) */
.vg-search-eb .vg-filter-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
}

.vg-search-eb.vg-search-eb-horizontal .vg-filter-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
}

.vg-search-eb.vg-search-eb-vertical .vg-filter-actions {
    margin-top: 20px;
}

/* Buttons */
.vg-search-eb .btn {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.vg-search-eb .btn-primary {
    background-color: #8b5cf6;
    color: #fff;
}

.vg-search-eb .btn-primary:hover {
    background-color: #7c3aed;
    transform: translateY(-1px);
}

.vg-search-eb .btn-secondary {
    background-color: #6b7280;
    color: #fff;
}

.vg-search-eb .btn-secondary:hover {
    background-color: #4b5563;
}

/* Result Container */
.vg-search-result-container {
    margin-top: 30px;
    padding: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .vg-search-eb-container {
        margin: 16px auto;
        padding: 0 12px;
    }

    .vg-search-eb {
        padding: 16px 0;
    }

    /* Force vertical layout on mobile */
    .vg-search-eb.vg-search-eb-horizontal .eb-filter-container,
    .vg-search-eb.vg-search-eb-vertical .eb-filter-container {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .vg-search-eb .form-label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .vg-search-eb .form-select,
    .vg-search-eb .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }

    /* Stack buttons on mobile */
    .vg-search-eb .vg-filter-actions {
        flex-direction: column;
        gap: 10px;
    }

    .vg-search-eb .vg-filter-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .vg-search-eb-container {
        margin: 12px auto;
    }

    .vg-search-eb .btn {
        padding: 12px 20px;
    }
}

/* Fancy multi-select (joomla-field-fancy-select + Choices.js) */
.vg-search-eb joomla-field-fancy-select {
    display: block;
    width: 100%;
}

.vg-search-eb joomla-field-fancy-select .choices {
    margin-bottom: 0;
}

.vg-search-eb joomla-field-fancy-select .choices__inner {
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
}

.vg-search-eb joomla-field-fancy-select.is-focused .choices__inner {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Calendar input styling */
.vg-search-eb input[type="text"].form-control {
    cursor: pointer;
}

.vg-search-result img.eb-thumb-left {
    height: 100%;
    width: 100%;
}

.choices__button_joomla {
    color: inherit;
    text-indent: -9999px;
    cursor: pointer;
    opacity: .5;
    appearance: none;
    background: none;
    border: 0;
    padding: 0 10px;
    position: relative;
    font-weight: bold;
}

.choices__button_joomla:before {
    text-align: center;
    text-indent: 0;
    content: "×";
    display: block;
    position: absolute;
    inset: 0;
}

.choices__button_joomla:hover, .choices__button_joomla:focus {
    opacity: 1;
}

.choices__button_joomla:focus {
    outline: none;
}

.eb-filter-container .icon-calendar {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: url("../images/icons/CalendarBlank.png") center center / contain no-repeat;
    vertical-align: middle;
}

.eb-filter-container .icon-calendar::before {
    content: "";
}

.eb-filter-container .choices__list--dropdown {
    z-index: 999;
}