.anywhere-stays-search-widget {
    width: 100%;
    position: relative;
    z-index: 1;
}

.anywhere-stays-search-title {
    margin: 0 0 8px;
}

.anywhere-stays-search-subtitle {
    margin: 0 0 18px;
}

.anywhere-stays-search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    align-items: end;
    margin-bottom: 24px;
}

.anywhere-stays-search-layout-vertical .anywhere-stays-search-form {
    grid-template-columns: 1fr;
}

.anywhere-stays-search-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 700;
}

.anywhere-stays-search-form input,
.anywhere-stays-search-form select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
}

.anywhere-stays-search-button,
.anywhere-stays-result-button {
    min-height: 42px;
    border: 0;
    border-radius: 10px;
    padding: 10px 16px;
    background: #0f172a;
    color: #fff !important;
    font-weight: 800;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.anywhere-stays-search-results {
    display: grid;
    grid-template-columns: repeat(var(--anywhere-stays-search-columns, 3), minmax(0, 1fr));
    gap: 18px;
}

.anywhere-stays-results-list {
    grid-template-columns: 1fr;
}

.anywhere-stays-result-card {
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.anywhere-stays-result-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.anywhere-stays-result-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.anywhere-stays-result-content h4,
.anywhere-stays-result-content h5 {
    margin: 0 0 6px;
}

.anywhere-stays-result-location,
.anywhere-stays-result-capacity,
.anywhere-stays-result-description {
    margin: 6px 0;
}

.anywhere-stays-result-price {
    font-size: 20px;
    margin: 12px 0;
}

.anywhere-stays-no-results {
    padding: 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
}

.anywhere-stays-card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
}

.anywhere-stays-view-button {
    order: 99;
    width: 100%;
    min-height: 42px;
    border: 1px solid #0f172a;
    border-radius: 10px;
    padding: 10px 16px;
    background: #ffffff;
    color: #0f172a !important;
    font-weight: 800;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.anywhere-stays-result-button {
    width: 100%;
}

.anywhere-stays-results-mode-overlay {
    position: relative;
    z-index: 50;
}

.anywhere-stays-results-mode-overlay .anywhere-stays-results-overlay {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 10px);
    z-index: 999;
    max-height: 70vh;
    overflow: auto;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15,23,42,.24);
    padding: 18px;
}

.anywhere-stays-modal-toggle {
    margin: 8px 0 18px;
}

.anywhere-stays-modal-backdrop,
.anywhere-stays-modal-shell {
    display: none;
}

.anywhere-stays-modal-open .anywhere-stays-modal-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 999998;
    background: rgba(15,23,42,.58);
}

.anywhere-stays-modal-open .anywhere-stays-modal-shell {
    display: block;
    position: fixed;
    z-index: 999999;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    width: min(1100px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #ffffff;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 30px 90px rgba(15,23,42,.35);
}

.anywhere-stays-results-mode-modal.anywhere-stays-modal-open .anywhere-stays-modal-shell .anywhere-stays-search-results {
    display: grid;
}

.anywhere-stays-modal-close {
    position: sticky;
    top: 0;
    float: right;
    z-index: 2;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 767px) {
    .anywhere-stays-search-results {
        grid-template-columns: 1fr !important;
    }

    .anywhere-stays-results-mode-overlay .anywhere-stays-results-overlay {
        position: static;
        max-height: none;
        margin-top: 18px;
    }

    .anywhere-stays-modal-open .anywhere-stays-modal-shell {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        padding: 16px;
    }
}


/* v1.5.3 card footer/button attachment fix */
.anywhere-stays-result-card {
    position: relative;
}

.anywhere-stays-result-content {
    min-height: 0;
}

.anywhere-stays-card-footer {
    margin-top: auto;
    padding-top: 16px;
}

.anywhere-stays-card-actions {
    display: flex !important;
    flex-direction: column !important;
    width: 100%;
    gap: 10px;
}

.anywhere-stays-card-actions a {
    width: 100%;
    box-sizing: border-box;
}

.anywhere-stays-view-button,
.anywhere-stays-result-button {
    width: 100% !important;
    box-sizing: border-box;
    text-align: center;
}

.anywhere-stays-results-list .anywhere-stays-result-card {
    display: grid;
    grid-template-columns: minmax(220px, 32%) 1fr;
}

.anywhere-stays-results-list .anywhere-stays-result-image {
    height: 100%;
}

.anywhere-stays-results-list .anywhere-stays-result-image img {
    height: 100%;
    min-height: 220px;
}

.anywhere-stays-results-list .anywhere-stays-result-content {
    min-height: 220px;
}

@media (max-width: 767px) {
    .anywhere-stays-results-list .anywhere-stays-result-card {
        display: flex;
        flex-direction: column;
    }
}

/* v1.9.24 Availability Search enhanced fields */
.anywhere-stays-search-form .anywhere-stays-filter-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 10px;
    margin: 0;
    background: #ffffff;
    min-width: 0;
}

.anywhere-stays-search-form .anywhere-stays-filter-field legend,
.anywhere-stays-search-form .anywhere-stays-filter-field > span,
.anywhere-stays-search-form label > span {
    font-weight: 800;
    font-size: 13px;
    color: #111827;
    margin-bottom: 2px;
}

.anywhere-stays-checkbox-options {
    display: flex;
    flex-direction: column;
    gap: 7px;
    max-height: 180px;
    overflow: auto;
    padding: 2px 4px 2px 0;
}

.anywhere-stays-checkbox-option {
    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 8px !important;
    padding: 0 !important;
    font-weight: 600 !important;
    line-height: 1.25;
    cursor: pointer;
}

.anywhere-stays-checkbox-option input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    min-height: 16px !important;
    padding: 0 !important;
    margin: 0 !important;
}

.anywhere-stays-checkbox-empty {
    color: #6b7280;
    font-weight: 600;
    font-size: 13px;
}

.anywhere-stays-qty-selector {
    display: grid;
    grid-template-columns: 42px minmax(54px, 1fr) 42px;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    min-height: 42px;
}

.anywhere-stays-qty-selector input[type="number"] {
    border: 0 !important;
    border-left: 1px solid #e5e7eb !important;
    border-right: 1px solid #e5e7eb !important;
    border-radius: 0 !important;
    min-height: 42px !important;
    padding: 8px 4px !important;
    text-align: center;
    font-weight: 800;
    font-size: 16px;
    appearance: textfield;
    -moz-appearance: textfield;
}

.anywhere-stays-qty-selector input[type="number"]::-webkit-outer-spin-button,
.anywhere-stays-qty-selector input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.anywhere-stays-qty-btn {
    min-height: 42px;
    width: 42px;
    border: 0;
    background: #f3f4f6;
    color: #111827;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.anywhere-stays-qty-btn:hover {
    background: #e5e7eb;
}

.anywhere-stays-search-button {
    border-style: solid;
    border-width: 0;
}

/* v1.9.25 Availability Search: checkbox dropdown fields */
.anywhere-stays-search-form .anywhere-stays-multiselect-field {
    position: relative;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    gap: 6px;
}

.anywhere-stays-search-form .anywhere-stays-filter-label {
    display: block;
    font-weight: 800;
    font-size: 13px;
    color: #111827;
    margin-bottom: 2px;
}

.anywhere-stays-multiselect {
    position: relative;
    width: 100%;
    min-width: 0;
}

.anywhere-stays-multiselect-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    color: #111827;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-sizing: border-box;
    list-style: none;
}

.anywhere-stays-multiselect-summary::-webkit-details-marker {
    display: none;
}

.anywhere-stays-multiselect[open] .anywhere-stays-multiselect-summary {
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17,24,39,0.10);
}

.anywhere-stays-multiselect-summary-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.anywhere-stays-multiselect-caret {
    flex: 0 0 auto;
    transition: transform 0.16s ease;
    font-size: 12px;
    line-height: 1;
}

.anywhere-stays-multiselect[open] .anywhere-stays-multiselect-caret {
    transform: rotate(180deg);
}

.anywhere-stays-multiselect-options {
    position: absolute;
    z-index: 9999;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    max-height: var(--anywhere-stays-checkbox-panel-height, 220px);
    overflow: auto;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15,23,42,0.16);
    box-sizing: border-box;
}

.anywhere-stays-multiselect-options .anywhere-stays-checkbox-option {
    padding: 6px 4px !important;
    border-radius: 7px;
}

.anywhere-stays-multiselect-options .anywhere-stays-checkbox-option:hover {
    background: #f3f4f6;
}

.anywhere-stays-search-layout-horizontal .anywhere-stays-multiselect-options,
.anywhere-stays-search-layout-compact .anywhere-stays-multiselect-options {
    min-width: 240px;
}


/* v1.9.26 Elementor design-preview parity for Availability Search */
.elementor-editor-active .anywhere-stays-search-widget,
.elementor-editor-preview .anywhere-stays-search-widget,
.elementor .anywhere-stays-search-widget {
    width: 100%;
}

.elementor-editor-active .anywhere-stays-search-widget .anywhere-stays-search-form,
.elementor-editor-preview .anywhere-stays-search-widget .anywhere-stays-search-form {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    align-items: end;
}

.elementor-editor-active .anywhere-stays-search-layout-vertical .anywhere-stays-search-form,
.elementor-editor-preview .anywhere-stays-search-layout-vertical .anywhere-stays-search-form {
    grid-template-columns: 1fr !important;
}

.elementor-editor-active .anywhere-stays-search-widget .anywhere-stays-multiselect-summary,
.elementor-editor-preview .anywhere-stays-search-widget .anywhere-stays-multiselect-summary,
.elementor-editor-active .anywhere-stays-search-widget .anywhere-stays-qty-selector,
.elementor-editor-preview .anywhere-stays-search-widget .anywhere-stays-qty-selector,
.elementor-editor-active .anywhere-stays-search-widget input[type="date"],
.elementor-editor-preview .anywhere-stays-search-widget input[type="date"] {
    min-height: 42px;
    box-sizing: border-box;
}

.elementor-editor-active .anywhere-stays-search-widget .anywhere-stays-multiselect-options,
.elementor-editor-preview .anywhere-stays-search-widget .anywhere-stays-multiselect-options {
    z-index: 999999;
}

.elementor-editor-active .anywhere-stays-search-widget .anywhere-stays-search-button,
.elementor-editor-preview .anywhere-stays-search-widget .anywhere-stays-search-button {
    width: 100%;
    white-space: nowrap;
}

.elementor-editor-active .anywhere-stays-search-widget .anywhere-stays-filter-field,
.elementor-editor-preview .anywhere-stays-search-widget .anywhere-stays-filter-field {
    box-sizing: border-box;
}


/* v1.9.27 Availability Search: make +/- selectors match normal field sizing */
.anywhere-stays-search-form .anywhere-stays-qty-field {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 6px !important;
}

.anywhere-stays-search-form .anywhere-stays-qty-field > span {
    margin-bottom: 0 !important;
}

.anywhere-stays-search-form .anywhere-stays-qty-selector {
    width: 100% !important;
    min-height: 42px !important;
    height: 42px;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: 42px minmax(42px, 1fr) 42px !important;
    align-items: stretch !important;
    border: 1px solid #d1d5db !important;
    border-radius: 10px;
    overflow: hidden !important;
    background: #ffffff;
}

.anywhere-stays-search-form .anywhere-stays-qty-selector input[type="number"] {
    width: 100% !important;
    min-height: 40px !important;
    height: 40px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 6px !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    background: #ffffff;
    text-align: center !important;
    line-height: 40px !important;
}

.anywhere-stays-search-form .anywhere-stays-qty-btn {
    min-height: 40px !important;
    height: 40px !important;
    width: 42px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #ffffff;
    color: #111827;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.anywhere-stays-search-form .anywhere-stays-qty-btn:hover {
    background: #f3f4f6;
}


/* v1.9.28 Availability Search: text styling selector support */
.anywhere-stays-search-widget .anywhere-stays-search-title,
.anywhere-stays-search-widget .anywhere-stays-search-subtitle,
.anywhere-stays-search-widget .anywhere-stays-filter-label,
.anywhere-stays-search-widget label > span,
.anywhere-stays-search-widget .anywhere-stays-multiselect-summary,
.anywhere-stays-search-widget .anywhere-stays-checkbox-option,
.anywhere-stays-search-widget .anywhere-stays-qty-selector input[type="number"],
.anywhere-stays-search-widget .anywhere-stays-qty-btn,
.anywhere-stays-search-widget .anywhere-stays-search-button {
    box-sizing: border-box;
}
