/**
 * Cloudstay Search Bar Styles
 *
 * Pill-style search bar with Airbnb-inspired design
 * Supports full, compact, and hero style variants
 *
 * @package Cloudstay
 * @since 1.3.0
 */

/* ========================================
   CSS Variables - Defaults
   These are overridden by inline styles from widget builder
   ======================================== */
:root {
    /* Legacy variables (for backwards compatibility) */
    --cs-search-primary: #e35323;
    --cs-search-primary-hover: #c94a1e;
    --cs-search-text: #1f1f1f;
    --cs-search-text-muted: #6b7280;
    --cs-search-text-light: #9ca3af;
    --cs-search-background: #ffffff;
    --cs-search-border: #dddddd;
    --cs-search-border-light: #eeeeee;
    --cs-search-shadow: none;
    --cs-search-shadow-hover: none;
    --cs-search-radius: 40px;
    --cs-search-radius-mobile: 16px;
    --cs-search-font-family: var(--e-global-typography-text-font-family, inherit);

    /* Widget Builder Variables (sb_ prefix) - these are set by PHP */
    --sb-container-max-width: 1200px;
    --sb-container-bg: #ffffff;
    --sb-container-padding: 0px;
    --sb-container-border-width: 0px;
    --sb-container-border-color: #e5e7eb;
    --sb-container-radius: 0px;
    --sb-container-shadow: none;
    --sb-field-height: 56px;
    --sb-field-gap: 0px;
    --sb-field-padding: 16px;
    --sb-field-padding-left: 0px;
    --sb-field-bg: #ffffff;
    --sb-field-bg-hover: #f7f7f7;
    --sb-field-bg-focus: #ffffff;
    --sb-field-border: #e5e7eb;
    --sb-field-border-focus: #1f1f1f;
    --sb-field-border-width: 0;
    --sb-field-radius: 0px;
    --sb-field-icon-color: #6b7280;
    --sb-divider-color: #e5e7eb;
    --sb-label-color: #1f1f1f;
    --sb-label-size: 12px;
    --sb-label-weight: 600;
    --sb-label-transform: uppercase;
    --sb-placeholder-color: #6b7280;
    --sb-placeholder-size: 14px;
    --sb-value-color: #1f1f1f;
    --sb-value-weight: 400;
    --sb-btn-bg: #e35323;
    --sb-btn-bg-hover: #c94a1e;
    --sb-btn-text: #ffffff;
    --sb-btn-radius: 8px;
    --sb-btn-size: 16px;
    --sb-btn-weight: 600;
    --sb-inner-padding-x: 16px;
    --sb-inner-padding-y: 12px;
    --sb-modal-bg: #ffffff;
    --sb-modal-border: #e5e7eb;
    --sb-modal-radius: 16px;
    --sb-modal-shadow: 0 8px 48px rgba(0, 0, 0, 0.2);
    --sb-modal-text: #222222;
    --sb-modal-text-secondary: #717171;
    --sb-modal-title-size: 18px;
    --sb-modal-title-weight: 600;
    --sb-modal-text-size: 14px;
    --sb-modal-hover-bg: #f7f7f7;
    --sb-modal-apply-bg: #e35323;
    --sb-modal-apply-text: #ffffff;
    --sb-modal-clear-color: #222222;
    --sb-modal-close-color: #222222;
}

/* ========================================
   Body Lock when Modal Open
   ======================================== */
body.search-modal-open {
    overflow: hidden;
    padding-right: var(--scrollbar-width, 0px);
}

/* ========================================
   Base Reset for Search Widget
   ======================================== */
.cloudstay-search-widget,
.cloudstay-search-widget * {
    box-sizing: border-box;
    font-family: var(--cs-search-font-family) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.cloudstay-search-widget {
    font-size: 14px;
    line-height: 1.5;
    color: var(--cs-search-text);
}

.cloudstay-search-widget button {
    font-family: inherit !important;
    cursor: pointer;
    background: none;
    padding: 0;
    margin: 0;
}

/* Reset borders on non-field buttons only */
.cloudstay-search-widget button:not(.search-field) {
    border: none;
}

.cloudstay-search-widget input,
.cloudstay-search-widget select {
    font-family: inherit !important;
}

/* ========================================
   Fix wpautop interference
   WordPress wpautop filter adds <p> and <br> tags around whitespace.
   These rules hide/remove those unwanted elements from the search widget.
   ======================================== */
.cloudstay-search-widget > p,
.cloudstay-search-widget > br,
.cloudstay-search-form > p,
.cloudstay-search-form > br,
.cloudstay-search-widget p:empty,
.cloudstay-search-form p:empty,
.grid-search-bar > p,
.grid-search-bar > br {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
}

/* ========================================
   Search Form Container
   ======================================== */
.cloudstay-search-form {
    position: relative;
    width: 100%;
    background: var(--sb-field-bg, #ffffff) !important;
    border-radius: var(--sb-container-radius, 0px) !important;
    /* Container border drawn with box-shadow (respects border-radius and draws outside) */
    box-shadow:
        0 0 0 var(--sb-container-border-width, 0px) var(--sb-container-border-color, transparent),
        var(--sb-container-shadow, none);
    overflow: hidden !important;
}

/* ========================================
   Main Search Bar Widget Container
   ======================================== */
.cloudstay-search-widget.cloudstay-search-bar {
    max-width: var(--sb-container-max-width);
    margin: 0 auto;
    border-radius: var(--sb-container-radius, 0px) !important;
    overflow: hidden !important;
    background: var(--sb-field-bg, #ffffff) !important;
}

/* Grid Search Bar - Main Container with settings */
/* Container border is now on .cloudstay-search-form wrapper */
/* Always uses field background to fill gaps between fields (prevents see-through at corners/gaps) */
.cloudstay-search-widget .grid-search-bar {
    display: flex;
    align-items: stretch;
    background: var(--sb-field-bg, #ffffff);
    border: none !important;
    border-radius: var(--sb-container-radius, 0px);
    padding: var(--sb-container-padding, 0px);
    gap: var(--sb-field-gap, 0px);
    overflow: hidden;
}

/* Search Field - Individual field styling - EACH FIELD HAS ITS OWN BORDER */
.cloudstay-search-widget .grid-search-bar .search-field {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    height: var(--sb-field-height, 56px) !important;
    padding: var(--sb-inner-padding-y, 12px) var(--sb-inner-padding-x, 16px) !important;
    background: var(--sb-field-bg, #ffffff) !important;
    /* Individual field border - controlled by Field Border Width setting */
    border-width: var(--sb-field-border-width, 0) !important;
    border-style: solid !important;
    border-color: var(--sb-field-border, #e5e7eb) !important;
    border-radius: var(--sb-field-radius, 0) !important;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    text-align: left;
    position: relative;
}

/* Inherit container border-radius on first/last fields when field radius is 0 */
/* First field gets left-side container radius */
.cloudstay-search-widget .grid-search-bar .search-field:first-child {
    border-top-left-radius: max(var(--sb-field-radius, 0px), var(--sb-container-radius, 0px)) !important;
    border-bottom-left-radius: max(var(--sb-field-radius, 0px), var(--sb-container-radius, 0px)) !important;
}

/* Last field gets right-side container radius (when no button follows) */
.cloudstay-search-widget .grid-search-bar .search-field:last-child {
    border-top-right-radius: max(var(--sb-field-radius, 0px), var(--sb-container-radius, 0px)) !important;
    border-bottom-right-radius: max(var(--sb-field-radius, 0px), var(--sb-container-radius, 0px)) !important;
}

/* When search button is last, it gets the right-side radius - field before it stays square */
.cloudstay-search-widget .grid-search-bar .search-field:nth-last-child(2):not(:last-child) {
    border-top-right-radius: var(--sb-field-radius, 0px) !important;
    border-bottom-right-radius: var(--sb-field-radius, 0px) !important;
}

.cloudstay-search-widget .grid-search-bar .search-field:hover {
    background: var(--sb-field-bg-hover, #f7f7f7);
}

.cloudstay-search-widget .grid-search-bar .search-field:focus,
.cloudstay-search-widget .grid-search-bar .search-field.active {
    background: var(--sb-field-bg-focus, #ffffff);
    border-color: var(--sb-field-border-focus, #1f1f1f);
    outline: none;
    z-index: 1;
}

/* Field Icon - Inline with text */
.cloudstay-search-widget .grid-search-bar .search-field .field-icon {
    color: var(--sb-field-icon-color, #6b7280);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: var(--sb-icon-size, 20px);
    height: var(--sb-icon-size, 20px);
}

.cloudstay-search-widget .grid-search-bar .search-field .field-icon svg {
    width: var(--sb-icon-size, 20px);
    height: var(--sb-icon-size, 20px);
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* Field Content Wrapper */
.cloudstay-search-widget .grid-search-bar .search-field .field-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    padding-left: var(--sb-field-padding-left, 0px) !important;
}

/* Field Label - above value */
.cloudstay-search-widget .grid-search-bar .search-field-label {
    font-family: var(--e-global-typography-text-font-family, inherit) !important;
    font-size: var(--sb-label-size, 12px);
    font-weight: var(--sb-label-weight, 600);
    color: var(--sb-label-color, #1f1f1f);
    text-transform: var(--sb-label-transform, none);
    letter-spacing: 0.02em;
    margin-bottom: 2px;
    margin-right: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Field Value/Placeholder */
.cloudstay-search-widget .grid-search-bar .search-field-value {
    font-family: var(--e-global-typography-text-font-family, inherit) !important;
    font-size: var(--sb-placeholder-size, 14px);
    font-weight: var(--sb-value-weight, 400);
    color: var(--sb-value-color, #1f1f1f);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cloudstay-search-widget .grid-search-bar .search-field-value.placeholder {
    color: var(--sb-placeholder-color, #6b7280);
}

/* Search Bar Divider */
.cloudstay-search-widget .grid-search-bar .search-bar-divider {
    width: 1px;
    align-self: stretch;
    margin: 8px 0;
    background-color: var(--sb-divider-color, #e5e7eb);
    flex-shrink: 0;
}

/* Hide dividers when disabled - use display none with !important for reliability */
.cloudstay-search-widget .grid-search-bar.no-dividers .search-bar-divider,
.cloudstay-search-widget .grid-search-bar.hide-dividers .search-bar-divider {
    display: none !important;
}

/* Search Button */
.cloudstay-search-widget .grid-search-bar .search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--sb-btn-bg);
    color: var(--sb-btn-text) !important;
    border: none;
    border-radius: var(--sb-btn-radius);
    padding: var(--sb-inner-padding-y, 12px) var(--sb-inner-padding-x, 24px) !important;
    height: var(--sb-field-height) !important;
    min-width: var(--sb-btn-min-width, 100px);
    font-family: var(--e-global-typography-text-font-family, inherit) !important;
    font-size: var(--sb-btn-size);
    font-weight: var(--sb-btn-weight);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Hide button text when icon-only mode enabled */
.cloudstay-search-widget .grid-search-bar .search-btn.icon-only {
    padding: var(--sb-inner-padding-y, 12px) var(--sb-inner-padding-x, 12px) !important;
    min-width: var(--sb-field-height);
    width: var(--sb-field-height);
}

.cloudstay-search-widget .grid-search-bar .search-btn:hover {
    background: var(--sb-btn-bg-hover);
}

.cloudstay-search-widget .grid-search-bar .search-btn:active {
    transform: scale(0.98);
}

.cloudstay-search-widget .grid-search-bar .search-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}

/* Search button inherits container radius on right side when it's the last element */
.cloudstay-search-widget .grid-search-bar .search-btn:last-child {
    border-top-right-radius: max(var(--sb-btn-radius, 0px), var(--sb-container-radius, 0px));
    border-bottom-right-radius: max(var(--sb-btn-radius, 0px), var(--sb-container-radius, 0px));
}

/* ========================================
   Pill-Style Search Bar - Full Width (Legacy)
   ======================================== */
.cloudstay-search-widget .search-bar-pill {
    display: flex;
    align-items: center;
    background: var(--sb-container-bg, var(--cs-search-background));
    border: var(--sb-container-border-width, 1px) solid var(--sb-container-border-color, var(--cs-search-border));
    border-radius: var(--sb-container-radius, var(--cs-search-radius));
    box-shadow: var(--sb-container-shadow, none);
    transition: box-shadow 0.2s ease;
    overflow: hidden;
}

.cloudstay-search-widget .search-bar-pill:hover {
    box-shadow: var(--cs-search-shadow-hover);
}

/* ========================================
   Search Field (Base Styles) - Label above value - LEGACY PILL STYLE ONLY
   ======================================== */
.cloudstay-search-widget .search-bar-pill .search-field {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    padding: 14px 24px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    min-width: 0;
    /* Field border - each field has its own border controlled by Field Border Width */
    border-width: var(--sb-field-border-width, 0) !important;
    border-style: solid !important;
    border-color: var(--sb-field-border, #e5e7eb) !important;
    border-radius: var(--sb-field-radius, 0) !important;
    background: var(--sb-field-bg, #ffffff) !important;
}

.cloudstay-search-widget .search-bar-pill .search-field:hover {
    background: var(--sb-field-bg-hover, #f7f7f7);
}

.cloudstay-search-widget .search-bar-pill .search-field.active {
    background: var(--sb-field-bg-focus, #ffffff);
    border-color: var(--sb-field-border-focus, #1f1f1f);
    z-index: 1;
}

/* Pill style: Inherit container border-radius on first/last fields */
.cloudstay-search-widget .search-bar-pill .search-field:first-child {
    border-top-left-radius: max(var(--sb-field-radius, 0px), var(--sb-container-radius, 0px)) !important;
    border-bottom-left-radius: max(var(--sb-field-radius, 0px), var(--sb-container-radius, 0px)) !important;
}

.cloudstay-search-widget .search-bar-pill .search-field:last-child {
    border-top-right-radius: max(var(--sb-field-radius, 0px), var(--sb-container-radius, 0px)) !important;
    border-bottom-right-radius: max(var(--sb-field-radius, 0px), var(--sb-container-radius, 0px)) !important;
}

.cloudstay-search-widget .search-bar-pill .search-field-label {
    font-family: var(--e-global-typography-text-font-family, inherit) !important;
    font-size: var(--sb-label-size, 12px);
    font-weight: var(--sb-label-weight, 600);
    color: var(--sb-label-color, #1f1f1f);
    text-transform: var(--sb-label-transform, none);
    letter-spacing: 0.02em;
    margin-bottom: 2px;
    margin-right: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.cloudstay-search-widget .search-bar-pill .search-field-value {
    font-family: var(--e-global-typography-text-font-family, inherit) !important;
    font-size: var(--sb-placeholder-size, 14px);
    font-weight: var(--sb-value-weight, 400);
    color: var(--sb-value-color, #1f1f1f);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cloudstay-search-widget .search-bar-pill .search-field-value.placeholder {
    color: var(--sb-placeholder-color, #717171);
}

/* Field Content - stacks label and value vertically while icon stays left */
.cloudstay-search-widget .search-field .field-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

/* Field Icon - stays to the left of content */
.cloudstay-search-widget .search-field .field-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: var(--sb-icon-size, 20px);
    height: var(--sb-icon-size, 20px);
    color: var(--sb-field-icon-color, #6b7280);
}

.cloudstay-search-widget .search-field .field-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* ========================================
   Pill Dividers
   ======================================== */
.cloudstay-search-widget .search-divider {
    width: 1px;
    height: 32px;
    background-color: var(--cs-search-border-light);
    flex-shrink: 0;
}

.cloudstay-search-widget .search-field:hover + .search-divider,
.cloudstay-search-widget .search-divider + .search-field:hover {
    background-color: transparent;
}

/* ========================================
   Search Button
   ======================================== */
.cloudstay-search-widget .search-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--cs-search-primary);
    color: #ffffff !important;
    border: none;
    border-radius: 24px;
    padding: 12px 24px;
    margin: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    flex-shrink: 0;
    min-height: 48px;
}

.cloudstay-search-widget .search-submit-btn:hover {
    background: var(--cs-search-primary-hover);
}

.cloudstay-search-widget .search-submit-btn:active {
    transform: scale(0.98);
}

.cloudstay-search-widget .search-submit-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
}

/* Icon-only button variant */
.cloudstay-search-widget .search-submit-btn.icon-only {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
}

.cloudstay-search-widget .search-submit-btn.icon-only span {
    display: none;
}

/* ========================================
   Date Picker Field - Dual Dates
   ======================================== */
.cloudstay-search-widget .search-field-dates {
    display: flex;
    flex: 2;
}

.cloudstay-search-widget .search-field-dates .search-field {
    flex: 1;
}

.cloudstay-search-widget .search-field-dates .search-field:first-child {
    border-right: 1px solid var(--cs-search-border-light);
}

/* ========================================
   Dropdown/Select Fields
   ======================================== */
.cloudstay-search-widget .search-field-select {
    position: relative;
}

.cloudstay-search-widget .search-field-select::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--cs-search-text-muted);
    pointer-events: none;
}

/* ========================================
   Search Dropdown Overlay (Backdrop)
   ======================================== */
.cloudstay-search-widget .search-dropdown-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
}

.cloudstay-search-widget .search-dropdown-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   Dropdown Menus - Fixed Position Modals
   ======================================== */
.cloudstay-search-widget .search-dropdown {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    padding: 20px;
    box-sizing: border-box;
    overflow: auto;
}

.cloudstay-search-widget .search-dropdown.active {
    display: flex;
}

.cloudstay-search-widget .search-dropdown .search-dropdown-content {
    font-family: var(--e-global-typography-text-font-family, inherit) !important;
    background: var(--sb-modal-bg, #ffffff);
    border: 1px solid var(--sb-modal-border, #e5e7eb);
    border-radius: var(--sb-modal-radius, 16px);
    box-shadow: var(--sb-modal-shadow, 0 8px 48px rgba(0, 0, 0, 0.2));
    max-height: 90vh;
    overflow-y: auto;
    width: 100%;
    max-width: 480px;
}

.cloudstay-search-widget .search-dropdown.date-picker-dropdown .search-dropdown-content {
    max-width: 720px;
}

.cloudstay-search-widget .search-dropdown.guest-dropdown .search-dropdown-content {
    max-width: 400px;
}

/* Destination dropdown - specific width */
.cloudstay-search-widget .search-dropdown.destination-dropdown .search-dropdown-content {
    max-width: 420px;
}

.cloudstay-search-widget .search-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--cs-search-border-light);
}

.cloudstay-search-widget .search-dropdown-header h3 {
    font-size: var(--sb-modal-title-size, 18px);
    font-weight: var(--sb-modal-title-weight, 600);
    color: var(--sb-modal-text, var(--cs-search-text));
    margin: 0;
}

.cloudstay-search-widget .search-dropdown-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.15s ease;
    background: none;
    border: none;
    cursor: pointer;
}

.cloudstay-search-widget .search-dropdown-close:hover {
    background-color: var(--sb-modal-hover-bg, #f7f7f7);
}

.cloudstay-search-widget .search-dropdown-close svg {
    width: 16px;
    height: 16px;
    stroke: var(--sb-modal-close-color, #222222);
}

.cloudstay-search-widget .search-dropdown-body {
    padding: 20px;
    background: var(--sb-modal-bg, #ffffff);
}

/* ========================================
   Date Picker Navigation (inside dropdown)
   ======================================== */
.cloudstay-search-widget .date-picker-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--cs-search-border-light);
}

.cloudstay-search-widget .date-picker-nav-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--cs-search-border);
    border-radius: 50%;
    background: var(--cs-search-background);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.cloudstay-search-widget .date-picker-nav-btn:hover {
    background-color: #f7f7f7;
    border-color: var(--cs-search-text);
}

.cloudstay-search-widget .date-picker-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cloudstay-search-widget .date-picker-nav-btn svg {
    stroke: var(--cs-search-text);
}

.cloudstay-search-widget .date-picker-title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: var(--cs-search-text);
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 40px;
}

.cloudstay-search-widget .date-picker-title span {
    min-width: 120px;
    text-align: center;
}

/* Date Picker Months Container */
.cloudstay-search-widget .date-picker-months {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 20px;
}

.cloudstay-search-widget .date-picker-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-top: 1px solid var(--sb-modal-border, var(--cs-search-border-light));
    background: var(--sb-modal-bg, #ffffff);
}

.cloudstay-search-widget .close-datepicker-btn {
    background: var(--sb-modal-apply-bg, var(--cs-search-primary));
    color: var(--sb-modal-apply-text, #ffffff) !important;
    font-size: var(--sb-modal-text-size, 14px);
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--sb-btn-radius, 8px);
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.cloudstay-search-widget .close-datepicker-btn:hover {
    filter: brightness(0.9);
}

/* Calendar Month Grid */
.cloudstay-search-widget .calendar-month {
    display: flex;
    flex-direction: column;
}

.cloudstay-search-widget .calendar-month-header,
.cloudstay-search-widget .calendar-month-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--cs-search-text, #1f1f1f);
    text-align: center;
    margin-bottom: 12px;
}

.cloudstay-search-widget .calendar-weekdays,
.cloudstay-search-widget .calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(36px, 1fr));
    gap: 0;
}

.cloudstay-search-widget .calendar-weekdays {
    margin-bottom: 4px;
}

.cloudstay-search-widget .calendar-weekday {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--cs-search-text-muted);
    min-width: 36px;
    min-height: 32px;
}

.cloudstay-search-widget .calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--cs-search-text);
    border-radius: 50%;
    border: none;
    background: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    min-width: 36px;
    min-height: 36px;
}

.cloudstay-search-widget .calendar-day:hover:not(.disabled):not(.selected):not(.check-in):not(.check-out):not(.empty) {
    background-color: #f7f7f7;
    border-radius: 50%;
}

.cloudstay-search-widget .calendar-day.empty {
    pointer-events: none;
}

.cloudstay-search-widget .calendar-day.other-month {
    opacity: var(--cal-other-month-opacity, 0.4);
}

.cloudstay-search-widget .calendar-day.disabled {
    color: var(--cs-search-text-light);
    cursor: not-allowed;
    text-decoration: line-through;
}

.cloudstay-search-widget .calendar-day.today {
    font-weight: 700;
    border: 2px solid var(--cs-search-text);
}

.cloudstay-search-widget .calendar-day.selected,
.cloudstay-search-widget .calendar-day.check-in,
.cloudstay-search-widget .calendar-day.check-out {
    background-color: var(--cs-search-primary);
    color: #ffffff !important;
    border-radius: 50%;
}

.cloudstay-search-widget .calendar-day.in-range {
    background-color: rgba(227, 83, 35, 0.1);
    border-radius: 0;
}

/* ========================================
   Guest Selector Styling
   ======================================== */
.cloudstay-search-widget .guest-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--cs-search-border-light);
}

.cloudstay-search-widget .guest-row:last-of-type {
    border-bottom: none;
}

.cloudstay-search-widget .guest-info h4 {
    font-size: var(--sb-modal-text-size, 14px);
    font-weight: 600;
    color: var(--sb-modal-text, var(--cs-search-text));
    margin: 0 0 2px 0;
}

.cloudstay-search-widget .guest-info p {
    font-size: calc(var(--sb-modal-text-size, 14px) - 2px);
    color: var(--sb-modal-text-secondary, var(--cs-search-text-muted));
    margin: 0;
}

.cloudstay-search-widget .guest-counter {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cloudstay-search-widget .guest-counter-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--cs-search-border);
    border-radius: 50%;
    background: var(--cs-search-background);
    cursor: pointer;
    transition: border-color 0.15s ease, opacity 0.15s ease;
}

.cloudstay-search-widget .guest-counter-btn:hover:not(:disabled) {
    border-color: var(--cs-search-text);
}

.cloudstay-search-widget .guest-counter-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.cloudstay-search-widget .guest-counter-btn svg {
    stroke: var(--cs-search-text);
}

.cloudstay-search-widget .guest-counter-value {
    font-size: 16px;
    font-weight: 500;
    min-width: 24px;
    text-align: center;
}

.cloudstay-search-widget .guest-dropdown-footer {
    padding-top: 16px;
    margin-top: 8px;
    border-top: 1px solid var(--sb-modal-border, var(--cs-search-border-light));
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--sb-modal-bg, #ffffff);
}

.cloudstay-search-widget .guest-dropdown-footer .apply-btn {
    background: var(--sb-modal-apply-bg, var(--cs-search-primary));
    color: var(--sb-modal-apply-text, #ffffff) !important;
    font-size: var(--sb-modal-text-size, 14px);
    font-weight: 600;
    padding: 12px 20px;
    border-radius: var(--sb-btn-radius, 8px);
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.cloudstay-search-widget .guest-dropdown-footer .apply-btn:hover {
    filter: brightness(0.9);
}

/* ========================================
   Destination Dropdown Styling
   ======================================== */
.cloudstay-search-widget .destination-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--sb-modal-border, var(--cs-search-border));
    border-radius: 8px;
    font-size: var(--sb-modal-text-size, 14px);
    color: var(--sb-modal-text, var(--cs-search-text));
    background: var(--sb-modal-bg, #ffffff);
    margin-bottom: 12px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cloudstay-search-widget .destination-input:focus {
    border-color: var(--cs-search-primary);
    box-shadow: 0 0 0 3px rgba(227, 83, 35, 0.1);
}

.cloudstay-search-widget .destination-suggestions {
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cloudstay-search-widget .destination-item {
    padding: 14px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: var(--sb-modal-text-size, 14px);
    color: var(--sb-modal-text, #222222);
    transition: background-color 0.15s ease;
}

.cloudstay-search-widget .destination-item:hover {
    background-color: var(--sb-modal-hover-bg, #f7f7f7);
}

/* Dropdown Footer */
.cloudstay-search-widget .search-dropdown-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-top: 1px solid var(--sb-modal-border, #e5e7eb);
    background: var(--sb-modal-bg, #ffffff);
}

/* Clear Button */
.cloudstay-search-widget .clear-destination-btn,
.cloudstay-search-widget .clear-dates-btn,
.cloudstay-search-widget .clear-guests-btn,
.cloudstay-search-widget .date-clear-btn {
    background: none;
    border: none;
    padding: 12px 16px;
    font-size: var(--sb-modal-text-size, 14px);
    font-weight: 500;
    color: var(--sb-modal-clear-color, #222222);
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.cloudstay-search-widget .clear-destination-btn:hover,
.cloudstay-search-widget .clear-dates-btn:hover,
.cloudstay-search-widget .clear-guests-btn:hover,
.cloudstay-search-widget .date-clear-btn:hover {
    background-color: var(--sb-modal-hover-bg, #f7f7f7);
    text-decoration: underline;
}

/* Apply Button */
.cloudstay-search-widget .apply-destination-btn,
.cloudstay-search-widget .apply-dates-btn,
.cloudstay-search-widget .date-apply-btn {
    background: var(--sb-modal-apply-bg, #e35323);
    color: var(--sb-modal-apply-text, #ffffff) !important;
    border: none;
    padding: 12px 24px;
    font-size: var(--sb-modal-text-size, 14px);
    font-weight: 600;
    border-radius: var(--sb-btn-radius, 8px);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.cloudstay-search-widget .apply-destination-btn:hover,
.cloudstay-search-widget .apply-dates-btn:hover,
.cloudstay-search-widget .date-apply-btn:hover {
    filter: brightness(0.9);
}

.cloudstay-search-widget .suggestions-hint {
    padding: 12px 16px;
    font-size: calc(var(--sb-modal-text-size, 14px) - 1px);
    color: var(--sb-modal-text-secondary, var(--cs-search-text-muted));
    text-align: center;
}

/* Dropdown Options */
.cloudstay-search-widget .dropdown-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    font-size: 14px;
    color: var(--cs-search-text);
}

.cloudstay-search-widget .dropdown-option:hover {
    background-color: #f7f7f7;
}

.cloudstay-search-widget .dropdown-option.selected {
    background-color: #f0f9f8;
    color: var(--cs-search-primary);
    font-weight: 500;
}

.cloudstay-search-widget .dropdown-option.selected::after {
    content: '';
    width: 16px;
    height: 16px;
    margin-left: auto;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e35323' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* ========================================
   Date Picker Popup
   ======================================== */
.cloudstay-search-widget .date-picker-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--cs-search-background);
    border-radius: 0;
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    max-width: 720px;
    width: calc(100% - 32px);
}

.cloudstay-search-widget .date-picker-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.cloudstay-search-widget .date-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--cs-search-border-light);
}

.cloudstay-search-widget .date-picker-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--cs-search-text);
}

.cloudstay-search-widget .date-picker-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cloudstay-search-widget .date-nav-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--cs-search-border);
    border-radius: 50%;
    background: var(--cs-search-background);
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.cloudstay-search-widget .date-nav-btn:hover {
    background-color: #f7f7f7;
    border-color: var(--cs-search-text);
}

.cloudstay-search-widget .date-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cloudstay-search-widget .date-nav-btn svg {
    width: 16px;
    height: 16px;
    stroke: var(--cs-search-text);
}

.cloudstay-search-widget .date-month-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--cs-search-text);
    min-width: 140px;
    text-align: center;
}

/* Calendar Grid */
.cloudstay-search-widget .date-calendars {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    padding: 24px;
}

.cloudstay-search-widget .calendar-month {
    display: flex;
    flex-direction: column;
}

.cloudstay-search-widget .calendar-month-header {
    font-size: 16px;
    font-weight: 600;
    color: var(--cs-search-text);
    text-align: center;
    margin-bottom: 16px;
}

.cloudstay-search-widget .calendar-weekdays,
.cloudstay-search-widget .calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(36px, 1fr));
    gap: 0;
}

.cloudstay-search-widget .calendar-weekdays {
    margin-bottom: 8px;
}

.cloudstay-search-widget .calendar-weekday {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--cs-search-text-muted);
    min-width: 36px;
    min-height: 32px;
}

.cloudstay-search-widget .calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--cs-search-text);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    min-width: 40px;
    min-height: 40px;
}

.cloudstay-search-widget .calendar-day:hover:not(.disabled):not(.selected):not(.check-in):not(.check-out):not(.empty) {
    background-color: #f7f7f7;
    border-radius: 50%;
}

.cloudstay-search-widget .calendar-day.empty {
    pointer-events: none;
}

.cloudstay-search-widget .calendar-day.other-month {
    opacity: var(--cal-other-month-opacity, 0.4);
}

.cloudstay-search-widget .calendar-day.disabled {
    color: var(--cs-search-text-light);
    cursor: not-allowed;
    text-decoration: line-through;
}

.cloudstay-search-widget .calendar-day.today {
    font-weight: 700;
    border: 2px solid var(--cs-search-text);
}

.cloudstay-search-widget .calendar-day.selected,
.cloudstay-search-widget .calendar-day.check-in,
.cloudstay-search-widget .calendar-day.check-out {
    background-color: var(--cs-search-primary);
    color: #ffffff !important;
    border-radius: 50%;
}

.cloudstay-search-widget .calendar-day.in-range {
    background-color: rgba(227, 83, 35, 0.1);
    border-radius: 0;
}

.cloudstay-search-widget .calendar-day.in-range:first-child,
.cloudstay-search-widget .calendar-day.check-in {
    border-radius: 50% 0 0 50%;
}

.cloudstay-search-widget .calendar-day.in-range:last-child,
.cloudstay-search-widget .calendar-day.check-out {
    border-radius: 0 50% 50% 0;
}

/* Date Picker Footer */
.cloudstay-search-widget .date-picker-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--sb-modal-border, var(--cs-search-border-light));
    background: var(--sb-modal-bg, #ffffff);
}

.cloudstay-search-widget .clear-dates-btn {
    font-size: var(--sb-modal-text-size, 14px);
    font-weight: 600;
    color: var(--sb-modal-clear-color, #222222);
    text-decoration: underline;
    padding: 8px 16px;
    transition: color 0.15s ease;
    background: none;
    border: none;
    cursor: pointer;
}

.cloudstay-search-widget .clear-dates-btn:hover {
    filter: brightness(0.8);
}

.cloudstay-search-widget .apply-dates-btn {
    background: var(--sb-modal-apply-bg, var(--cs-search-primary));
    color: var(--sb-modal-apply-text, #ffffff) !important;
    font-size: var(--sb-modal-text-size, 14px);
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--sb-btn-radius, 8px);
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.cloudstay-search-widget .apply-dates-btn:hover {
    filter: brightness(0.9);
}

/* ========================================
   Sleeps Dropdown
   ======================================== */
.cloudstay-search-widget .sleeps-dropdown {
    min-width: 200px;
}

.cloudstay-search-widget .sleeps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 16px;
}

.cloudstay-search-widget .sleeps-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px solid var(--cs-search-border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--cs-search-text);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.cloudstay-search-widget .sleeps-option:hover {
    border-color: var(--cs-search-text);
}

.cloudstay-search-widget .sleeps-option.selected {
    background-color: var(--cs-search-primary);
    border-color: var(--cs-search-primary);
    color: #ffffff;
}

/* ========================================
   Property Type Dropdown
   ======================================== */
.cloudstay-search-widget .property-type-dropdown {
    min-width: 240px;
}

.cloudstay-search-widget .property-type-list {
    padding: 8px;
}

.cloudstay-search-widget .property-type-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.cloudstay-search-widget .property-type-option:hover {
    background-color: #f7f7f7;
}

.cloudstay-search-widget .property-type-option.selected {
    background-color: rgba(227, 83, 35, 0.08);
}

.cloudstay-search-widget .property-type-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f7;
    border-radius: 10px;
    flex-shrink: 0;
}

.cloudstay-search-widget .property-type-option.selected .property-type-icon {
    background: var(--cs-search-primary);
}

.cloudstay-search-widget .property-type-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--cs-search-text);
}

.cloudstay-search-widget .property-type-option.selected .property-type-icon svg {
    stroke: #ffffff;
}

.cloudstay-search-widget .property-type-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--cs-search-text);
}

.cloudstay-search-widget .property-type-option.selected .property-type-name {
    color: var(--cs-search-primary);
    font-weight: 600;
}

/* ========================================
   Overlay/Backdrop
   ======================================== */
.cloudstay-search-widget .search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
}

.cloudstay-search-widget .search-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   Style Variant: Full (Default)
   ======================================== */
.cloudstay-search-widget.search-style-full {
    max-width: 900px;
    margin: 0 auto;
}

.cloudstay-search-widget.search-style-full .search-bar-pill {
    padding: 6px;
}

/* ========================================
   Style Variant: Compact
   ======================================== */
.cloudstay-search-widget.search-style-compact {
    max-width: 720px;
    margin: 0 auto;
}

.cloudstay-search-widget.search-style-compact .search-bar-pill {
    padding: 4px;
    border-radius: 32px;
}

.cloudstay-search-widget.search-style-compact .search-field {
    padding: 10px 18px;
}

.cloudstay-search-widget.search-style-compact .search-field-label {
    font-size: 11px;
}

.cloudstay-search-widget.search-style-compact .search-field-value {
    font-size: 13px;
}

.cloudstay-search-widget.search-style-compact .search-submit-btn {
    padding: 10px 20px;
    min-height: 40px;
    font-size: 14px;
    margin: 4px;
}

.cloudstay-search-widget.search-style-compact .search-submit-btn.icon-only {
    width: 40px;
    height: 40px;
}

/* ========================================
   Style Variant: Hero
   ======================================== */
.cloudstay-search-widget.search-style-hero {
    max-width: 1000px;
    margin: 0 auto;
}

.cloudstay-search-widget.search-style-hero .search-bar-pill {
    padding: 8px;
    border-radius: 48px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), 0 8px 32px rgba(0, 0, 0, 0.08);
}

.cloudstay-search-widget.search-style-hero .search-field {
    padding: 18px 28px;
}

.cloudstay-search-widget.search-style-hero .search-field-label {
    font-size: 13px;
}

.cloudstay-search-widget.search-style-hero .search-field-value {
    font-size: 16px;
}

.cloudstay-search-widget.search-style-hero .search-submit-btn {
    padding: 14px 32px;
    min-height: 56px;
    font-size: 17px;
    margin: 8px;
    border-radius: 28px;
}

.cloudstay-search-widget.search-style-hero .search-submit-btn.icon-only {
    width: 56px;
    height: 56px;
}

.cloudstay-search-widget.search-style-hero .search-divider {
    height: 40px;
}

/* ========================================
   Layout Style: Inline (Default - Horizontal)
   ======================================== */
.cloudstay-search-widget.layout-inline .grid-search-bar {
    flex-direction: row;
    align-items: stretch;
}

/* ========================================
   Layout Style: Stacked (Vertical)
   Respects Widget Builder settings for heights, sizes, and spacing
   ======================================== */
.cloudstay-search-widget.layout-stacked .grid-search-bar,
.cloudstay-search-bar.layout-stacked .grid-search-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    /* Respect user's field gap setting, default to 0 for seamless stacked look */
    gap: var(--sb-field-gap, 0px) !important;
    flex-wrap: nowrap !important;
}

.cloudstay-search-widget.layout-stacked .search-field,
.cloudstay-search-bar.layout-stacked .search-field {
    flex: none !important;
    width: 100% !important;
    justify-content: flex-start !important;
    /* Respect user's field height and padding settings */
    height: var(--sb-field-height, 56px) !important;
    padding: var(--sb-inner-padding-y, 12px) var(--sb-inner-padding-x, 16px) !important;
}

/* First field gets top border radius */
.cloudstay-search-widget.layout-stacked .grid-search-bar > .search-field:first-child,
.cloudstay-search-bar.layout-stacked .grid-search-bar > .search-field:first-child {
    border-top-left-radius: var(--sb-field-radius, 8px) !important;
    border-top-right-radius: var(--sb-field-radius, 8px) !important;
}

/* Last field before button gets bottom border radius when no gap */
.cloudstay-search-widget.layout-stacked .grid-search-bar > .search-field:last-of-type,
.cloudstay-search-bar.layout-stacked .grid-search-bar > .search-field:last-of-type {
    border-bottom-left-radius: var(--sb-field-radius, 8px) !important;
    border-bottom-right-radius: var(--sb-field-radius, 8px) !important;
}

/* Dividers become horizontal lines in stacked mode */
.cloudstay-search-widget.layout-stacked .search-bar-divider,
.cloudstay-search-bar.layout-stacked .search-bar-divider {
    width: 100% !important;
    height: 1px !important;
    align-self: stretch !important;
}

/* Search button full width at bottom */
.cloudstay-search-widget.layout-stacked .search-btn,
.cloudstay-search-bar.layout-stacked .search-btn {
    width: 100% !important;
    /* Use field gap or 12px default for button spacing */
    margin: max(var(--sb-field-gap, 0px), 12px) 0 0 0 !important;
    border-radius: var(--sb-btn-radius, 8px) !important;
    justify-content: center !important;
    /* Respect user's button height setting */
    height: var(--sb-field-height, 56px) !important;
}

/* Stacked mobile - same as desktop since it's already vertical */
@media (max-width: 768px) {
    .cloudstay-search-widget.layout-stacked .grid-search-bar,
    .cloudstay-search-bar.layout-stacked .grid-search-bar {
        display: flex !important;
    }
    .cloudstay-search-widget.layout-stacked .mobile-search-trigger,
    .cloudstay-search-bar.layout-stacked .mobile-search-trigger {
        display: none !important;
    }
}

/* ========================================
   Layout Style: Compact (Minimal)
   Uses min() to respect Widget Builder settings while capping at compact defaults
   ======================================== */
.cloudstay-search-widget.layout-compact .grid-search-bar,
.cloudstay-search-bar.layout-compact .grid-search-bar {
    min-height: min(var(--sb-field-height, 56px), 44px) !important;
}

.cloudstay-search-widget.layout-compact .search-field,
.cloudstay-search-bar.layout-compact .search-field {
    /* Use user's field height if smaller than 44px, otherwise cap at 44px */
    height: min(var(--sb-field-height, 56px), 44px) !important;
    min-height: min(var(--sb-field-height, 56px), 44px) !important;
    /* Use user's padding if smaller, otherwise use compact padding */
    padding: min(var(--sb-inner-padding-y, 12px), 6px) min(var(--sb-inner-padding-x, 16px), 12px) !important;
    /* Respect user's border radius setting */
    border-radius: var(--sb-field-radius, 8px) !important;
}

.cloudstay-search-widget.layout-compact .search-field .field-content,
.cloudstay-search-widget.layout-compact .search-field-content,
.cloudstay-search-bar.layout-compact .search-field .field-content,
.cloudstay-search-bar.layout-compact .search-field-content {
    gap: 1px !important;
}

.cloudstay-search-widget.layout-compact .search-field-label,
.cloudstay-search-bar.layout-compact .search-field-label {
    /* Use user's label size if smaller than 10px, otherwise cap at 10px */
    font-size: min(var(--sb-label-size, 12px), 10px) !important;
    line-height: 1.2 !important;
}

.cloudstay-search-widget.layout-compact .search-field-value,
.cloudstay-search-bar.layout-compact .search-field-value {
    /* Use user's value size if smaller than 12px, otherwise cap at 12px */
    font-size: min(var(--sb-value-size, 14px), 12px) !important;
    line-height: 1.3 !important;
}

.cloudstay-search-widget.layout-compact .field-icon,
.cloudstay-search-bar.layout-compact .field-icon {
    /* Use user's icon size if smaller than 14px, otherwise cap at 14px */
    width: min(var(--sb-icon-size, 20px), 14px) !important;
    height: min(var(--sb-icon-size, 20px), 14px) !important;
}

.cloudstay-search-widget.layout-compact .field-icon svg,
.cloudstay-search-bar.layout-compact .field-icon svg {
    width: min(var(--sb-icon-size, 20px), 14px) !important;
    height: min(var(--sb-icon-size, 20px), 14px) !important;
}

.cloudstay-search-widget.layout-compact .search-btn,
.cloudstay-search-bar.layout-compact .search-btn {
    /* Respect user's button settings but apply compact scaling */
    padding: min(var(--sb-inner-padding-y, 12px), 6px) min(var(--sb-inner-padding-x, 24px), 14px) !important;
    font-size: min(var(--sb-btn-size, 16px), 13px) !important;
    /* Button height slightly smaller than field height */
    height: calc(min(var(--sb-field-height, 56px), 44px) - 8px) !important;
    min-height: calc(min(var(--sb-field-height, 56px), 44px) - 8px) !important;
    max-height: calc(min(var(--sb-field-height, 56px), 44px) - 8px) !important;
    margin: 4px !important;
    line-height: 1.2 !important;
    /* Respect user's button radius setting */
    border-radius: var(--sb-btn-radius, 8px) !important;
}

.cloudstay-search-widget.layout-compact .search-btn.icon-only,
.cloudstay-search-bar.layout-compact .search-btn.icon-only {
    width: calc(min(var(--sb-field-height, 56px), 44px) - 8px) !important;
    height: calc(min(var(--sb-field-height, 56px), 44px) - 8px) !important;
    padding: 6px !important;
}

.cloudstay-search-widget.layout-compact .search-btn svg,
.cloudstay-search-bar.layout-compact .search-btn svg {
    width: 16px !important;
    height: 16px !important;
}

.cloudstay-search-widget.layout-compact .search-bar-divider,
.cloudstay-search-bar.layout-compact .search-bar-divider {
    height: min(var(--sb-divider-height, 32px), 24px) !important;
}

/* ========================================
   Body-level Dropdown Styles
   When dropdowns are moved to body for proper fixed positioning,
   they need these styles to maintain appearance
   ======================================== */
body > .search-dropdown {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--sb-modal-overlay, rgba(0, 0, 0, 0.5));
    z-index: 100000;
    padding: 20px;
    box-sizing: border-box;
    overflow: auto;
}

body > .search-dropdown.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

body > .search-dropdown .search-dropdown-content {
    background: var(--sb-modal-bg, #ffffff);
    border: 1px solid var(--sb-modal-border, #e5e7eb);
    border-radius: var(--sb-modal-radius, 16px);
    box-shadow: var(--sb-modal-shadow, 0 8px 48px rgba(0, 0, 0, 0.2));
    max-height: 90vh;
    overflow-y: auto;
    width: 100%;
    max-width: 480px;
}

body > .search-dropdown.date-picker-dropdown .search-dropdown-content {
    max-width: 720px;
}

body > .search-dropdown.guest-dropdown .search-dropdown-content {
    max-width: 400px;
}

body > .search-dropdown.destination-dropdown .search-dropdown-content {
    max-width: 420px;
}

body > .search-dropdown .search-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--sb-modal-border, #e5e7eb);
}

body > .search-dropdown .search-dropdown-header h3 {
    font-size: var(--sb-modal-title-size, 18px);
    font-weight: var(--sb-modal-title-weight, 600);
    color: var(--sb-modal-text, #222222);
    margin: 0;
}

body > .search-dropdown .search-dropdown-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.15s ease;
    background: none;
    border: none;
    cursor: pointer;
}

body > .search-dropdown .search-dropdown-close:hover {
    background-color: var(--sb-modal-hover-bg, #f7f7f7);
}

body > .search-dropdown .search-dropdown-close svg {
    width: 16px;
    height: 16px;
    stroke: var(--sb-modal-close-color, #222222);
}

body > .search-dropdown .search-dropdown-body {
    padding: 20px;
    background: var(--sb-modal-bg, #ffffff);
}

body > .search-dropdown .search-dropdown-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-top: 1px solid var(--sb-modal-border, #e5e7eb);
    background: var(--sb-modal-bg, #ffffff);
}

body > .search-dropdown .clear-destination-btn,
body > .search-dropdown .clear-dates-btn,
body > .search-dropdown .clear-guests-btn {
    background: none;
    border: none;
    font-size: var(--sb-modal-text-size, 14px);
    color: var(--sb-modal-clear-color, #222222);
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

body > .search-dropdown .apply-destination-btn,
body > .search-dropdown .close-datepicker-btn,
body > .search-dropdown .apply-guests-btn {
    background: var(--sb-modal-apply-bg, #e35323);
    color: var(--sb-modal-apply-text, #ffffff) !important;
    font-size: var(--sb-modal-text-size, 14px);
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--sb-btn-radius, 8px);
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

body > .search-dropdown .apply-destination-btn:hover,
body > .search-dropdown .close-datepicker-btn:hover,
body > .search-dropdown .apply-guests-btn:hover {
    filter: brightness(0.9);
}

/* Body-level destination suggestions */
body > .search-dropdown .destination-suggestions {
    max-height: 280px;
    overflow-y: auto;
}

body > .search-dropdown .destination-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid var(--sb-modal-border, #e5e7eb);
}

body > .search-dropdown .destination-item:last-child {
    border-bottom: none;
}

body > .search-dropdown .destination-item:hover {
    background: var(--sb-modal-hover-bg, #f7f7f7);
}

body > .search-dropdown .destination-item.selected {
    background: var(--sb-modal-hover-bg, #f7f7f7);
}

body > .search-dropdown .destination-item span {
    font-size: var(--sb-modal-text-size, 14px);
    color: var(--sb-modal-text, #222222);
}

body > .search-dropdown .destination-input {
    width: 100%;
    padding: 14px 16px;
    font-size: var(--sb-modal-text-size, 14px);
    border: 1px solid var(--sb-modal-border, #e5e7eb);
    border-radius: 8px;
    outline: none;
    margin-bottom: 12px;
    background: var(--sb-modal-bg, #ffffff);
    color: var(--sb-modal-text, #222222);
}

body > .search-dropdown .destination-input:focus {
    border-color: var(--sb-field-border-focus, #222222);
}

/* Body-level guest selector */
body > .search-dropdown .guest-type-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--sb-modal-border, #e5e7eb);
}

body > .search-dropdown .guest-type-row:last-child {
    border-bottom: none;
}

body > .search-dropdown .guest-type-info h4 {
    font-size: var(--sb-modal-text-size, 14px);
    font-weight: 600;
    color: var(--sb-modal-text, #222222);
    margin: 0 0 2px 0;
}

body > .search-dropdown .guest-type-info p {
    font-size: 12px;
    color: var(--sb-modal-text-secondary, #717171);
    margin: 0;
}

body > .search-dropdown .guest-counter {
    display: flex;
    align-items: center;
    gap: 12px;
}

body > .search-dropdown .guest-counter button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--sb-modal-border, #e5e7eb);
    background: var(--sb-modal-bg, #ffffff);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s ease;
}

body > .search-dropdown .guest-counter button:hover:not(:disabled) {
    border-color: var(--sb-modal-text, #222222);
}

body > .search-dropdown .guest-counter button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

body > .search-dropdown .guest-counter button svg {
    width: 12px;
    height: 12px;
    stroke: var(--sb-modal-text, #222222);
}

body > .search-dropdown .guest-counter span {
    min-width: 24px;
    text-align: center;
    font-size: var(--sb-modal-text-size, 14px);
    color: var(--sb-modal-text, #222222);
}

/* Body-level overlay */
body > .search-dropdown-overlay {
    position: fixed;
    inset: 0;
    background: var(--sb-modal-overlay, rgba(0, 0, 0, 0.5));
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
}

body > .search-dropdown-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   Mobile Responsive
   ======================================== */
@media (max-width: 768px) {
    /* Grid search bar mobile layout - HIDDEN, use mobile trigger instead */
    .cloudstay-search-widget .grid-search-bar {
        display: none !important;
    }

    .cloudstay-search-widget .search-bar-pill {
        flex-direction: column;
        border-radius: var(--cs-search-radius-mobile);
        padding: 0;
    }

    .cloudstay-search-widget .search-field {
        width: 100%;
        padding: var(--sb-inner-padding-y, 14px) var(--sb-inner-padding-x, 20px) !important;
        border-bottom: 1px solid var(--cs-search-border-light);
    }

    .cloudstay-search-widget .search-field:last-of-type {
        border-bottom: none;
    }

    .cloudstay-search-widget .search-divider {
        display: none;
    }

    .cloudstay-search-widget .search-field-dates {
        flex-direction: column;
    }

    .cloudstay-search-widget .search-field-dates .search-field:first-child {
        border-right: none;
        border-bottom: 1px solid var(--cs-search-border-light);
    }

    .cloudstay-search-widget .search-submit-btn {
        width: calc(100% - 24px);
        margin: 12px;
        border-radius: 12px;
    }

    .cloudstay-search-widget .search-submit-btn.icon-only {
        width: calc(100% - 24px);
        height: 48px;
        border-radius: 12px;
    }

    .cloudstay-search-widget .search-submit-btn.icon-only span {
        display: inline;
    }

    /* Date picker mobile */
    .cloudstay-search-widget .date-picker-popup {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none;
        border-radius: 0;
        max-width: none;
        width: 100%;
        overflow-y: auto;
    }

    .cloudstay-search-widget .date-picker-popup.active {
        transform: none;
    }

    .cloudstay-search-widget .date-calendars,
    .cloudstay-search-widget .date-picker-months {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 16px;
    }

    .cloudstay-search-widget .calendar-day {
        min-width: 36px;
        min-height: 36px;
    }

    .cloudstay-search-widget .date-picker-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    /* Date picker full screen on mobile */
    .cloudstay-search-widget .search-dropdown.date-picker-dropdown {
        max-height: 100vh;
        border-radius: 0;
    }

    /* Dropdowns mobile - slide up from bottom */
    .cloudstay-search-widget .search-dropdown {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        max-height: 85vh;
        transform: translate(0, 100%);
    }

    .cloudstay-search-widget .search-dropdown.active {
        transform: translate(0, 0);
    }

    .cloudstay-search-widget .search-dropdown.date-picker-dropdown {
        max-width: 100%;
    }

    .cloudstay-search-widget .sleeps-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Style variants mobile */
    .cloudstay-search-widget.search-style-full,
    .cloudstay-search-widget.search-style-compact,
    .cloudstay-search-widget.search-style-hero {
        max-width: 100%;
    }

    .cloudstay-search-widget.search-style-hero .search-bar-pill,
    .cloudstay-search-widget.search-style-compact .search-bar-pill {
        border-radius: var(--cs-search-radius-mobile);
        padding: 0;
    }

    .cloudstay-search-widget.search-style-hero .search-field,
    .cloudstay-search-widget.search-style-compact .search-field {
        padding: 14px 20px;
    }
}

/* ========================================
   Body class when modal is open
   ======================================== */
body.cloudstay-search-modal-open {
    overflow: hidden;
    padding-right: var(--scrollbar-width, 0);
}

/* ========================================
   Skeleton Loader
   ======================================== */
.cloudstay-search-widget .search-skeleton {
    display: flex;
    align-items: center;
    background: var(--cs-search-background);
    border: 1px solid var(--cs-search-border);
    border-radius: var(--cs-search-radius);
    padding: 8px;
    box-shadow: var(--cs-search-shadow);
}

.cloudstay-search-widget .search-skeleton-field {
    flex: 1;
    padding: 14px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cloudstay-search-widget .search-skeleton-label {
    height: 10px;
    width: 60px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: cs-skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}

.cloudstay-search-widget .search-skeleton-value {
    height: 14px;
    width: 100px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: cs-skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}

.cloudstay-search-widget .search-skeleton-divider {
    width: 1px;
    height: 32px;
    background: #e0e0e0;
}

.cloudstay-search-widget .search-skeleton-btn {
    width: 48px;
    height: 48px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: cs-skeleton-shimmer 1.5s infinite;
    border-radius: 50%;
    flex-shrink: 0;
    margin: 0 8px;
}

@keyframes cs-skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.cloudstay-search-widget:not(.css-loaded) .cloudstay-search-form {
    display: none;
}

.cloudstay-search-widget.css-loaded .search-skeleton {
    display: none;
}

@media (max-width: 768px) {
    .cloudstay-search-widget .search-skeleton {
        flex-direction: column;
        border-radius: var(--cs-search-radius-mobile);
        padding: 0;
    }

    .cloudstay-search-widget .search-skeleton-field {
        width: 100%;
        padding: 14px 20px;
        border-bottom: 1px solid var(--cs-search-border-light);
    }

    .cloudstay-search-widget .search-skeleton-divider {
        display: none;
    }

    .cloudstay-search-widget .search-skeleton-btn {
        width: calc(100% - 24px);
        height: 48px;
        border-radius: 12px;
        margin: 12px;
    }
}

/* ========================================
   Flatpickr Custom Styling (if using)
   ======================================== */
.cloudstay-search-widget .flatpickr-calendar {
    font-family: var(--cs-search-font-family) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    border: 1px solid var(--cs-search-border);
}

.cloudstay-search-widget .flatpickr-day.selected {
    background: var(--cs-search-primary);
    border-color: var(--cs-search-primary);
}

.cloudstay-search-widget .flatpickr-day.inRange {
    background: rgba(227, 83, 35, 0.1);
    border-color: transparent;
}

/* ========================================
   Hidden Inputs
   ======================================== */
.cloudstay-search-widget input[type="hidden"] {
    display: none;
}

/* ========================================
   Accessibility
   ======================================== */
.cloudstay-search-widget .search-field:focus-visible,
.cloudstay-search-widget .search-submit-btn:focus-visible,
.cloudstay-search-widget .dropdown-option:focus-visible,
.cloudstay-search-widget .calendar-day:focus-visible {
    outline: 2px solid var(--cs-search-primary);
    outline-offset: 2px;
}

.cloudstay-search-widget .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   Compact Header Search Bar
   ======================================== */

/* Container */
.cloudstay-search-compact {
    position: relative;
    display: inline-flex;
    font-family: var(--cs-search-font-family);
    font-size: 14px;
    line-height: 1.5;
}

.cloudstay-search-compact *,
.cloudstay-search-compact *::before,
.cloudstay-search-compact *::after {
    box-sizing: border-box;
}

/* Collapsed Trigger Button */
.cloudstay-search-compact .search-compact-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--cs-search-background);
    border: 1px solid var(--cs-search-border);
    border-radius: 40px;
    padding: 8px 8px 8px 16px;
    cursor: pointer;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    min-width: 300px;
    max-width: 400px;
}

.cloudstay-search-compact .search-compact-trigger:hover {
    box-shadow: var(--cs-search-shadow-hover);
    border-color: #c0c0c0;
}

.cloudstay-search-compact .search-compact-trigger:focus-visible {
    outline: 2px solid var(--cs-search-primary);
    outline-offset: 2px;
}

/* Search Icon (left side) */
.cloudstay-search-compact .search-compact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cloudstay-search-compact .search-compact-icon svg {
    width: 16px;
    height: 16px;
    stroke: var(--cs-search-text);
}

/* Text Content */
.cloudstay-search-compact .search-compact-text {
    flex: 1;
    text-align: left;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cloudstay-search-compact .search-compact-placeholder {
    color: var(--cs-search-text);
    font-size: 14px;
    font-weight: 500;
}

.cloudstay-search-compact .search-compact-separator {
    color: var(--cs-search-text-muted);
    margin: 0 4px;
}

.cloudstay-search-compact .search-compact-summary {
    color: var(--cs-search-text);
    font-size: 14px;
    font-weight: 500;
}

/* Search Button (right side) */
.cloudstay-search-compact .search-compact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--cs-search-primary);
    border-radius: 50%;
    flex-shrink: 0;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.cloudstay-search-compact .search-compact-btn:hover {
    background: var(--cs-search-primary-hover);
}

.cloudstay-search-compact .search-compact-btn svg {
    width: 14px;
    height: 14px;
    stroke: #ffffff;
}

/* ========================================
   Compact Search Panel (Expanded State)
   ======================================== */
.cloudstay-search-compact .search-compact-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 340px;
    background: var(--cs-search-background);
    border: 1px solid var(--cs-search-border);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.cloudstay-search-compact .search-compact-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cloudstay-search-compact .search-compact-panel-inner {
    padding: 0;
}

/* Panel Header */
.cloudstay-search-compact .search-compact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--cs-search-border-light);
}

.cloudstay-search-compact .search-compact-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--cs-search-text);
    margin: 0;
}

.cloudstay-search-compact .search-compact-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.cloudstay-search-compact .search-compact-close:hover {
    background-color: #f7f7f7;
}

.cloudstay-search-compact .search-compact-close svg {
    width: 18px;
    height: 18px;
    stroke: var(--cs-search-text);
}

/* Search Form */
.cloudstay-search-compact .search-compact-form {
    padding: 16px;
}

/* Search Fields */
.cloudstay-search-compact .search-compact-field {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
    background: #f7f7f7;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    position: relative;
}

.cloudstay-search-compact .search-compact-field:hover {
    background: #eeeeee;
}

.cloudstay-search-compact .search-compact-field.active {
    background: #ffffff;
    box-shadow: 0 0 0 2px var(--cs-search-primary);
}

.cloudstay-search-compact .search-compact-field-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cloudstay-search-compact .search-compact-field-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--cs-search-text-muted);
}

.cloudstay-search-compact .search-compact-field-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cloudstay-search-compact .search-compact-field-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--cs-search-text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cloudstay-search-compact .search-compact-field-value {
    font-size: 14px;
    color: var(--cs-search-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cloudstay-search-compact .search-compact-field-value.placeholder {
    color: var(--cs-search-text-muted);
}

.cloudstay-search-compact .search-compact-field-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cloudstay-search-compact .search-compact-field-arrow svg {
    width: 16px;
    height: 16px;
    stroke: var(--cs-search-text-muted);
    transition: transform 0.2s ease;
}

.cloudstay-search-compact .search-compact-field.active .search-compact-field-arrow svg {
    transform: rotate(180deg);
}

/* Guests Dropdown */
.cloudstay-search-compact .search-compact-dropdown {
    display: none;
    padding: 12px 16px;
    margin-top: -4px;
    margin-bottom: 8px;
    background: #ffffff;
    border: 1px solid var(--cs-search-border-light);
    border-radius: 12px;
}

.cloudstay-search-compact .search-compact-dropdown.active {
    display: block;
}

.cloudstay-search-compact .guests-dropdown-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.cloudstay-search-compact .guests-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    border: 1px solid var(--cs-search-border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--cs-search-text);
    background: none;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.cloudstay-search-compact .guests-option:hover {
    border-color: var(--cs-search-text);
}

.cloudstay-search-compact .guests-option.selected {
    background-color: var(--cs-search-primary);
    border-color: var(--cs-search-primary);
    color: #ffffff;
}

/* Submit Button */
.cloudstay-search-compact .search-compact-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: var(--cs-search-primary);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.cloudstay-search-compact .search-compact-submit:hover {
    background: var(--cs-search-primary-hover);
}

.cloudstay-search-compact .search-compact-submit:active {
    transform: scale(0.98);
}

.cloudstay-search-compact .search-compact-submit svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* ========================================
   Compact Date Picker
   ======================================== */
.cloudstay-search-compact .search-compact-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
}

.cloudstay-search-compact .search-compact-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cloudstay-search-compact .search-compact-date-picker {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--cs-search-background);
    border-radius: 0;
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    max-width: 720px;
    width: calc(100% - 32px);
}

.cloudstay-search-compact .search-compact-date-picker.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.cloudstay-search-compact .date-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--cs-search-border-light);
}

.cloudstay-search-compact .date-picker-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--cs-search-text);
}

.cloudstay-search-compact .date-picker-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.cloudstay-search-compact .date-picker-close:hover {
    background-color: #f7f7f7;
}

.cloudstay-search-compact .date-picker-close svg {
    width: 18px;
    height: 18px;
    stroke: var(--cs-search-text);
}

.cloudstay-search-compact .date-picker-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
}

.cloudstay-search-compact .date-nav-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--cs-search-border);
    border-radius: 50%;
    background: var(--cs-search-background);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.cloudstay-search-compact .date-nav-btn:hover:not(:disabled) {
    background-color: #f7f7f7;
    border-color: var(--cs-search-text);
}

.cloudstay-search-compact .date-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cloudstay-search-compact .date-nav-btn svg {
    width: 16px;
    height: 16px;
    stroke: var(--cs-search-text);
}

.cloudstay-search-compact .date-month-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--cs-search-text);
    min-width: 140px;
    text-align: center;
}

.cloudstay-search-compact .date-calendars {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    padding: 0 24px 24px;
}

.cloudstay-search-compact .calendar-month {
    display: flex;
    flex-direction: column;
}

.cloudstay-search-compact .calendar-month-header {
    font-size: 16px;
    font-weight: 600;
    color: var(--cs-search-text);
    text-align: center;
    margin-bottom: 16px;
}

.cloudstay-search-compact .calendar-weekdays,
.cloudstay-search-compact .calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(40px, 1fr));
    gap: 0;
}

.cloudstay-search-compact .calendar-weekdays {
    margin-bottom: 8px;
}

.cloudstay-search-compact .calendar-weekday {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--cs-search-text-muted);
    min-width: 40px;
    min-height: 32px;
}

.cloudstay-search-compact .calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--cs-search-text);
    border-radius: 50%;
    border: none;
    background: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    min-width: 40px;
    min-height: 40px;
}

.cloudstay-search-compact .calendar-day:hover:not(.disabled):not(.selected):not(.check-in):not(.check-out):not(.empty) {
    background-color: #f7f7f7;
    border-radius: 50%;
}

.cloudstay-search-compact .calendar-day.empty {
    pointer-events: none;
}

.cloudstay-search-compact .calendar-day.other-month {
    opacity: var(--cal-other-month-opacity, 0.4);
}

.cloudstay-search-compact .calendar-day.disabled {
    color: var(--cs-search-text-light);
    cursor: not-allowed;
    text-decoration: line-through;
}

.cloudstay-search-compact .calendar-day.today {
    font-weight: 700;
    border: 2px solid var(--cs-search-text);
}

.cloudstay-search-compact .calendar-day.selected,
.cloudstay-search-compact .calendar-day.check-in,
.cloudstay-search-compact .calendar-day.check-out {
    background-color: var(--cs-search-primary);
    color: #ffffff !important;
    border-radius: 50%;
}

.cloudstay-search-compact .calendar-day.in-range {
    background-color: rgba(227, 83, 35, 0.1);
    border-radius: 0;
}

.cloudstay-search-compact .calendar-day.in-range:first-child,
.cloudstay-search-compact .calendar-day.check-in {
    border-radius: 50% 0 0 50%;
}

.cloudstay-search-compact .calendar-day.in-range:last-child,
.cloudstay-search-compact .calendar-day.check-out {
    border-radius: 0 50% 50% 0;
}

.cloudstay-search-compact .date-picker-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--cs-search-border-light);
}

.cloudstay-search-compact .clear-dates-btn {
    font-size: 14px;
    font-weight: 500;
    color: var(--cs-search-text);
    text-decoration: underline;
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

.cloudstay-search-compact .clear-dates-btn:hover {
    color: var(--cs-search-text-muted);
}

.cloudstay-search-compact .apply-dates-btn {
    background: var(--cs-search-primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.cloudstay-search-compact .apply-dates-btn:hover {
    background: var(--cs-search-primary-hover);
}

/* ========================================
   Compact Search - Mobile Responsive
   ======================================== */
@media (max-width: 768px) {
    .cloudstay-search-compact .search-compact-trigger {
        min-width: 200px;
        max-width: 100%;
        padding: 6px 6px 6px 12px;
    }

    .cloudstay-search-compact .search-compact-text {
        font-size: 13px;
    }

    .cloudstay-search-compact .search-compact-separator {
        margin: 0 2px;
    }

    .cloudstay-search-compact .search-compact-btn {
        width: 28px;
        height: 28px;
    }

    .cloudstay-search-compact .search-compact-btn svg {
        width: 12px;
        height: 12px;
    }

    /* Panel takes full width on mobile */
    .cloudstay-search-compact .search-compact-panel {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        min-width: 100%;
        border-radius: 0;
        max-height: 90vh;
        overflow-y: auto;
        transform: translateY(100%);
    }

    .cloudstay-search-compact .search-compact-panel.active {
        transform: translateY(0);
    }

    /* Date picker full screen on mobile */
    .cloudstay-search-compact .search-compact-date-picker {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none;
        border-radius: 0;
        max-width: none;
        width: 100%;
        overflow-y: auto;
    }

    .cloudstay-search-compact .search-compact-date-picker.active {
        transform: none;
    }

    .cloudstay-search-compact .date-calendars {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 16px;
    }

    .cloudstay-search-compact .calendar-day {
        min-width: 36px;
        min-height: 36px;
    }

    .cloudstay-search-compact .date-picker-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .cloudstay-search-compact .guests-dropdown-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   Compact Search - Very Small Screens
   ======================================== */
@media (max-width: 480px) {
    .cloudstay-search-compact .search-compact-trigger {
        min-width: 160px;
    }

    .cloudstay-search-compact .search-compact-icon {
        display: none;
    }

    .cloudstay-search-compact .search-compact-placeholder .search-compact-separator:last-of-type,
    .cloudstay-search-compact .search-compact-placeholder span:last-child {
        display: none;
    }
}

/* ========================================
   Body class when compact modal is open
   ======================================== */
body.cloudstay-compact-search-open {
    overflow: hidden;
    padding-right: var(--scrollbar-width, 0);
}

/* ========================================
   Body-Level Styles for Moved Elements
   When dropdowns/overlays are moved to body
   via JS, they need styles without parent selector
   ======================================== */

/* Overlay - HIDDEN completely */
.search-dropdown-overlay,
body > .search-dropdown-overlay,
body > .search-dropdown-overlay.active {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Dropdowns when moved to body - full-screen overlay with centered content */
body > .search-dropdown,
body > .search-dropdown.destination-dropdown,
body > .search-dropdown.date-picker-dropdown,
body > .search-dropdown.guest-dropdown {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 999999 !important;
    padding: 20px !important;
    margin: 0 !important;
    overflow: auto !important;
    box-sizing: border-box !important;
}

body > .search-dropdown.active,
body > .destination-dropdown.active,
body > .date-picker-dropdown.active,
body > .guest-dropdown.active {
    display: flex !important;
}

/* Content widths - applied to inner content, NOT the overlay */
body > .search-dropdown.date-picker-dropdown .search-dropdown-content {
    width: 700px;
    max-width: 90vw;
}

body > .search-dropdown.destination-dropdown .search-dropdown-content {
    width: 400px;
    max-width: 90vw;
}

body > .search-dropdown.guest-dropdown .search-dropdown-content {
    width: 380px;
    max-width: 90vw;
}

body > .search-dropdown.filters-dropdown .search-dropdown-content {
    width: 480px;
    max-width: 90vw;
}

/* The actual modal content styling - this is the ONLY white box */
body > .search-dropdown .search-dropdown-content,
body > .search-dropdown > .search-dropdown-content {
    background: var(--sb-modal-bg, #ffffff) !important;
    border: 1px solid var(--sb-modal-border, #e5e5e5) !important;
    border-radius: var(--sb-modal-radius, 0) !important;
    box-shadow: var(--sb-modal-shadow, 0 8px 48px rgba(0, 0, 0, 0.2)) !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 1 !important;
    color: var(--sb-modal-text, #222222) !important;
}

/* FORCE all elements inside body-level modals to be clickable */
body > .search-dropdown,
body > .search-dropdown *,
body > .search-dropdown.active,
body > .search-dropdown.active * {
    pointer-events: auto !important;
}

/* Ensure no pseudo-elements block clicks */
body > .search-dropdown *::before,
body > .search-dropdown *::after {
    pointer-events: none !important;
}

/* Reset any transforms that might cause click issues */
body > .search-dropdown .guest-counter-btn,
body > .search-dropdown .calendar-day,
body > .search-dropdown .search-dropdown-close {
    transform: none !important;
    -webkit-transform: none !important;
}

/* Ensure guest counter buttons are definitely clickable */
body > .search-dropdown .guest-counter {
    position: relative !important;
    z-index: 5 !important;
}

body > .search-dropdown .guest-row {
    position: relative !important;
    z-index: 1 !important;
}

/* Calendar specific fixes */
body > .search-dropdown .calendar-days {
    position: relative !important;
    z-index: 5 !important;
}

body > .search-dropdown .calendar-month {
    position: relative !important;
    z-index: 1 !important;
}

/* Navigation buttons */
body > .search-dropdown .date-picker-nav {
    position: relative !important;
    z-index: 10 !important;
}

/* Ensure buttons have proper cursor */
body > .search-dropdown button,
body > .search-dropdown input,
body > .search-dropdown a,
body > .search-dropdown .guest-counter-btn,
body > .search-dropdown .apply-btn,
body > .search-dropdown .destination-item,
body > .search-dropdown .calendar-day,
body > .search-dropdown .search-dropdown-close,
body > .search-dropdown .prev-month-btn,
body > .search-dropdown .next-month-btn,
body > .search-dropdown .clear-dates-btn,
body > .search-dropdown .clear-destination-btn,
body > .search-dropdown .clear-guests-btn,
body > .search-dropdown .close-datepicker-btn {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Dropdown header styles at body level */
body > .search-dropdown .search-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--sb-modal-border, #f0f0f0);
}

body > .search-dropdown .search-dropdown-header h3 {
    font-size: var(--sb-modal-title-size, 18px);
    font-weight: var(--sb-modal-title-weight, 600);
    color: var(--sb-modal-text, #222222);
    margin: 0;
}

body > .search-dropdown .search-dropdown-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

body > .search-dropdown .search-dropdown-close:hover {
    background-color: #f7f7f7;
}

body > .search-dropdown .search-dropdown-close svg {
    width: 16px;
    height: 16px;
    stroke: var(--sb-modal-close-color, #222222);
}

body > .search-dropdown .search-dropdown-body {
    padding: 20px;
    background: var(--sb-modal-bg, #ffffff);
}

/* Calendar styles at body level - support both .date-calendars and .date-picker-months */
body > .search-dropdown .date-calendars,
body > .search-dropdown .date-picker-months {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--cal-month-gap, 32px);
    padding: 24px;
}

body > .search-dropdown .calendar-month {
    display: flex;
    flex-direction: column;
}

body > .search-dropdown .calendar-month-title {
    font-size: var(--cal-month-size, 15px);
    font-weight: var(--cal-month-weight, 600);
    color: var(--sb-modal-text, var(--cal-month-title-color, #222222));
    text-align: center;
    margin-bottom: 12px;
}

body > .search-dropdown .calendar-weekdays,
body > .search-dropdown .calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(36px, 1fr));
    gap: 0;
}

body > .search-dropdown .calendar-weekdays {
    margin-bottom: 8px;
}

body > .search-dropdown .calendar-weekday {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--cal-weekday-size, 12px);
    font-weight: var(--cal-weekday-weight, 600);
    color: var(--cal-weekday-color, #717171);
    min-width: 36px;
    min-height: 32px;
}

body > .search-dropdown .calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--cal-font-size, 14px);
    font-weight: var(--cal-day-weight, 400);
    color: var(--cal-day-text, #222222);
    border-radius: var(--cal-day-radius, 50%);
    border: none;
    background: var(--cal-disabled-bg, transparent);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    min-width: 36px;
    min-height: 36px;
}

body > .search-dropdown .calendar-day:hover:not(.disabled):not(.selected):not(.check-in):not(.check-out):not(.empty) {
    background-color: var(--cal-hover-bg, #f7f7f7);
    color: var(--cal-hover-text, inherit);
    border-radius: 50%;
}

body > .search-dropdown .calendar-day.empty {
    pointer-events: none;
}

body > .search-dropdown .calendar-day.other-month {
    opacity: var(--cal-other-month-opacity, 0.4);
}

body > .search-dropdown .calendar-day.disabled {
    color: var(--cal-disabled-text, #b0b0b0);
    background: var(--cal-disabled-bg, transparent);
    cursor: not-allowed;
    text-decoration: line-through;
}

body > .search-dropdown .calendar-day.today {
    font-weight: 700;
    border: 2px solid var(--cal-today-border, #222222);
}

body > .search-dropdown .calendar-day.selected,
body > .search-dropdown .calendar-day.check-in,
body > .search-dropdown .calendar-day.check-out {
    background-color: var(--cal-selected-bg, #1f1f1f);
    color: var(--cal-selected-text, #ffffff) !important;
    border-radius: 50%;
}

body > .search-dropdown .calendar-day.in-range {
    background-color: var(--cal-range-bg, rgba(31, 31, 31, 0.1));
    border-radius: 0;
}

/* Date picker header at body level */
body > .search-dropdown .date-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--sb-modal-border, #f0f0f0);
}

body > .search-dropdown .date-picker-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--sb-modal-text, #222222);
    display: flex;
    justify-content: center;
    gap: 80px;
    flex: 1;
}

body > .search-dropdown .date-picker-title span {
    min-width: 140px;
    text-align: center;
}

body > .search-dropdown .date-picker-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--sb-modal-border, #f0f0f0);
    gap: 16px;
}

/* Support both .date-nav-btn and .prev-month-btn/.next-month-btn/.date-picker-nav-btn */
body > .search-dropdown .date-nav-btn,
body > .search-dropdown .date-picker-nav-btn,
body > .search-dropdown .prev-month-btn,
body > .search-dropdown .next-month-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--cal-nav-border, #e5e5e5);
    border-radius: 50%;
    background: var(--cal-nav-bg, #ffffff);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

body > .search-dropdown .date-nav-btn:hover,
body > .search-dropdown .date-picker-nav-btn:hover,
body > .search-dropdown .prev-month-btn:hover,
body > .search-dropdown .next-month-btn:hover {
    background-color: var(--cal-nav-hover-bg, #f7f7f7);
    border-color: var(--cal-nav-hover-border, #222222);
}

body > .search-dropdown .date-nav-btn:disabled,
body > .search-dropdown .date-picker-nav-btn:disabled,
body > .search-dropdown .prev-month-btn:disabled,
body > .search-dropdown .next-month-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

body > .search-dropdown .date-nav-btn svg,
body > .search-dropdown .date-picker-nav-btn svg,
body > .search-dropdown .prev-month-btn svg,
body > .search-dropdown .next-month-btn svg {
    width: 16px;
    height: 16px;
    stroke: var(--cal-nav-icon, #222222);
}

body > .search-dropdown .date-month-title {
    font-size: var(--cal-month-size, 16px);
    font-weight: var(--cal-month-weight, 600);
    color: var(--cal-month-title-color, #222222);
    min-width: 140px;
    text-align: center;
}

/* Date picker footer at body level */
body > .search-dropdown .date-picker-footer {
    display: flex !important;
    align-items: center;
    justify-content: space-between !important;
    padding: 16px 24px;
    border-top: 1px solid var(--sb-modal-border, #f0f0f0);
    background: var(--sb-modal-bg, #ffffff);
}

body > .search-dropdown .date-clear-btn,
body > .search-dropdown .clear-dates-btn {
    background: none;
    border: none;
    font-size: var(--sb-modal-text-size, 14px);
    font-weight: 600;
    color: var(--sb-modal-clear-color, #222222);
    text-decoration: underline;
    cursor: pointer;
}

body > .search-dropdown .date-clear-btn:hover,
body > .search-dropdown .clear-dates-btn:hover {
    filter: brightness(0.8);
}

body > .search-dropdown .date-apply-btn,
body > .search-dropdown .close-datepicker-btn {
    background-color: var(--sb-modal-apply-bg, #E35323);
    color: var(--sb-modal-apply-text, #ffffff) !important;
    border: none;
    border-radius: var(--sb-btn-radius, 8px);
    padding: 12px 24px;
    font-size: var(--sb-modal-text-size, 14px);
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s ease;
}

body > .search-dropdown .date-apply-btn:hover,
body > .search-dropdown .close-datepicker-btn:hover {
    filter: brightness(0.9);
}

/* Guest selector at body level */
body > .search-dropdown .guest-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--sb-modal-border, #f0f0f0);
}

body > .search-dropdown .guest-row:last-child {
    border-bottom: none;
}

body > .search-dropdown .guest-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--sb-modal-text, #222222);
}

body > .search-dropdown .guest-description {
    font-size: 14px;
    color: var(--sb-modal-text-secondary, #717171);
    margin-top: 2px;
}

body > .search-dropdown .guest-counter {
    display: flex;
    align-items: center;
    gap: 16px;
}

body > .search-dropdown .guest-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--sb-modal-border, #b0b0b0);
    border-radius: 50%;
    background: var(--sb-modal-bg, #ffffff);
    cursor: pointer;
    transition: border-color 0.15s ease;
}

body > .search-dropdown .guest-btn:hover:not(:disabled) {
    border-color: var(--sb-modal-text, #222222);
}

body > .search-dropdown .guest-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

body > .search-dropdown .guest-btn svg {
    width: 14px;
    height: 14px;
    stroke: var(--sb-modal-text, #222222);
}

body > .search-dropdown .guest-count {
    min-width: 24px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: var(--sb-modal-text, #222222);
}

body > .search-dropdown .guest-dropdown-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    margin-top: 8px;
    border-top: 1px solid var(--sb-modal-border, #f0f0f0);
    background: var(--sb-modal-bg, #ffffff);
}

body > .search-dropdown .guest-apply-btn,
body > .search-dropdown .guest-dropdown-footer .apply-btn {
    background-color: var(--sb-modal-apply-bg, #E35323);
    color: var(--sb-modal-apply-text, #ffffff);
    border: none;
    border-radius: var(--sb-btn-radius, 8px);
    padding: 14px 24px;
    font-size: var(--sb-modal-text-size, 16px);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

body > .search-dropdown .guest-apply-btn:hover,
body > .search-dropdown .guest-dropdown-footer .apply-btn:hover {
    filter: brightness(0.9);
}

/* Destination dropdown at body level */
body > .search-dropdown .destination-input-wrapper {
    padding: 20px 20px 16px;
}

body > .search-dropdown .destination-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--sb-modal-border, #e5e5e5);
    border-radius: 12px;
    font-size: var(--sb-modal-text-size, 14px);
    color: var(--sb-modal-text, #222222);
    background: var(--sb-modal-bg, #ffffff);
    outline: none;
    transition: border-color 0.15s ease;
}

body > .search-dropdown .destination-input:focus {
    border-color: var(--sb-modal-text, #222222);
}

body > .search-dropdown .destination-list,
body > .search-dropdown .destination-suggestions {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

body > .search-dropdown .suggestions-hint {
    padding: 12px 16px;
    font-size: calc(var(--sb-modal-text-size, 14px) - 1px);
    color: var(--sb-modal-text-secondary, #717171);
    text-align: center;
}

body > .search-dropdown .destination-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

body > .search-dropdown .destination-item:hover {
    background-color: #f7f7f7;
}

body > .search-dropdown .destination-item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f7;
    border-radius: 8px;
}

body > .search-dropdown .destination-item-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--sb-modal-text, #222222);
}

body > .search-dropdown .destination-item-text {
    font-size: var(--sb-modal-text-size, 16px);
    color: var(--sb-modal-text, #222222);
}

/* Footer styles at body level */
body > .search-dropdown .search-dropdown-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-top: 1px solid var(--sb-modal-border, #f0f0f0);
    background: var(--sb-modal-bg, #ffffff);
}

/* Clear button at body level */
body > .search-dropdown .clear-destination-btn,
body > .search-dropdown .clear-dates-btn,
body > .search-dropdown .clear-guests-btn,
body > .search-dropdown .date-clear-btn {
    background: none;
    border: none;
    padding: 12px 16px;
    font-size: var(--sb-modal-text-size, 14px);
    font-weight: 500;
    color: var(--sb-modal-clear-color, #222222);
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.15s ease;
}

body > .search-dropdown .clear-destination-btn:hover,
body > .search-dropdown .clear-dates-btn:hover,
body > .search-dropdown .clear-guests-btn:hover,
body > .search-dropdown .date-clear-btn:hover {
    background-color: var(--sb-modal-hover-bg, #f7f7f7);
    text-decoration: underline;
}

/* Apply button at body level */
body > .search-dropdown .apply-destination-btn,
body > .search-dropdown .apply-dates-btn,
body > .search-dropdown .date-apply-btn {
    background: var(--sb-modal-apply-bg, #e35323);
    color: var(--sb-modal-apply-text, #ffffff) !important;
    border: none;
    padding: 12px 24px;
    font-size: var(--sb-modal-text-size, 14px);
    font-weight: 600;
    border-radius: var(--sb-btn-radius, 8px);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

body > .search-dropdown .apply-destination-btn:hover,
body > .search-dropdown .apply-dates-btn:hover,
body > .search-dropdown .date-apply-btn:hover {
    filter: brightness(0.9);
}

/* Mobile responsive for body-level dropdowns */
@media (max-width: 768px) {
    body > .search-dropdown {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none;
        width: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    body > .search-dropdown.active {
        transform: none;
    }

    body > .search-dropdown .date-calendars,
    body > .search-dropdown .date-picker-months {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 16px;
    }

    /* Hide second month calendar on mobile */
    body > .search-dropdown .date-picker-months .calendar-month:nth-child(2),
    .cloudstay-search-widget .date-picker-months .calendar-month:nth-child(2),
    .cloudstay-search-widget .mobile-sub-modal .date-picker-months .calendar-month:nth-child(2) {
        display: none;
    }

    /* Hide second month title on mobile */
    body > .search-dropdown .date-picker-title span:nth-child(2),
    .cloudstay-search-widget .date-picker-title span:nth-child(2),
    .cloudstay-search-widget .mobile-sub-modal .date-picker-title span:nth-child(2) {
        display: none;
    }

    /* Remove gap in title since only one month shows */
    body > .search-dropdown .date-picker-title,
    .cloudstay-search-widget .date-picker-title,
    .cloudstay-search-widget .mobile-sub-modal .date-picker-title {
        gap: 0;
    }
}

/* ========================================
   Widget Builder Admin Preview Overrides
   These MUST be at the end to override all other rules
   Uses --sb-* variables from Widget Builder Search Bar settings
   ======================================== */

/* Admin Preview Container - ensure CSS variables cascade properly */
#cs-preview-container .cloudstay-search-widget,
#cs-preview-container .cloudstay-search-bar,
#cs-preview-container .grid-search-bar {
    max-width: var(--sb-container-max-width, 1200px) !important;
    background: var(--sb-container-bg, #ffffff) !important;
    padding: var(--sb-container-padding, 0px) !important;
    border-width: var(--sb-container-border-width, 0px) !important;
    border-color: var(--sb-container-border-color, #e5e7eb) !important;
    border-radius: var(--sb-container-radius, 0px) !important;
}

/* Search fields in preview */
#cs-preview-container .cloudstay-search-widget .search-field,
#cs-preview-container .cloudstay-search-bar .search-field,
#cs-preview-container .grid-search-bar .search-field {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    height: var(--sb-field-height, 56px) !important;
    background: var(--sb-field-bg, #ffffff) !important;
    border-color: var(--sb-field-border, #e5e7eb) !important;
    border-radius: var(--sb-field-radius, 0px) !important;
    padding: var(--sb-inner-padding-y, 12px) var(--sb-inner-padding-x, 16px) !important;
    overflow: visible !important;
}

#cs-preview-container .cloudstay-search-widget .search-field:hover,
#cs-preview-container .cloudstay-search-bar .search-field:hover,
#cs-preview-container .grid-search-bar .search-field:hover {
    background: var(--sb-field-bg-hover, #f7f7f7) !important;
}

/* Labels in preview */
#cs-preview-container .cloudstay-search-widget .search-field-label,
#cs-preview-container .cloudstay-search-bar .search-field-label,
#cs-preview-container .grid-search-bar .search-field-label {
    color: var(--sb-label-color, #1f1f1f) !important;
    font-size: var(--sb-label-size, 12px) !important;
    font-weight: var(--sb-label-weight, 600) !important;
    margin-bottom: 2px !important;
    margin-right: 0 !important;
}

/* Placeholder text in preview */
#cs-preview-container .cloudstay-search-widget .search-field-value,
#cs-preview-container .cloudstay-search-bar .search-field-value,
#cs-preview-container .grid-search-bar .search-field-value {
    color: var(--sb-placeholder-color, #6b7280) !important;
    font-size: var(--sb-placeholder-size, 14px) !important;
    width: 100% !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Search button in preview */
#cs-preview-container .cloudstay-search-widget .search-btn,
#cs-preview-container .cloudstay-search-bar .search-btn,
#cs-preview-container .grid-search-bar .search-btn {
    background: var(--sb-btn-bg, #e35323) !important;
    color: var(--sb-btn-text, #ffffff) !important;
    border-radius: var(--sb-btn-radius, 8px) !important;
    font-size: var(--sb-btn-size, 16px) !important;
    font-weight: var(--sb-btn-weight, 600) !important;
}

#cs-preview-container .cloudstay-search-widget .search-btn:hover,
#cs-preview-container .cloudstay-search-bar .search-btn:hover,
#cs-preview-container .grid-search-bar .search-btn:hover {
    background: var(--sb-btn-bg-hover, #c94a1e) !important;
}

/* Dividers in preview */
#cs-preview-container .cloudstay-search-widget .search-bar-divider,
#cs-preview-container .cloudstay-search-bar .search-bar-divider,
#cs-preview-container .grid-search-bar .search-bar-divider {
    background-color: var(--sb-divider-color, #e5e7eb) !important;
}

/* Field icons in preview */
#cs-preview-container .cloudstay-search-widget .search-field-icon,
#cs-preview-container .cloudstay-search-bar .search-field-icon,
#cs-preview-container .grid-search-bar .search-field-icon {
    color: var(--sb-field-icon-color, #6b7280) !important;
}

/* Modal footer in preview */
#cs-preview-container .search-dropdown-footer,
body > .search-dropdown .search-dropdown-footer {
    border-top-color: var(--sb-modal-border, #e5e7eb) !important;
    background: var(--sb-modal-bg, #ffffff) !important;
}

/* Modal destination items in preview */
#cs-preview-container .destination-item,
body > .search-dropdown .destination-item {
    color: var(--sb-modal-text, #222222) !important;
    font-size: var(--sb-modal-text-size, 14px) !important;
}

/* Modal clear button in preview */
#cs-preview-container .clear-destination-btn,
#cs-preview-container .clear-dates-btn,
#cs-preview-container .clear-guests-btn,
#cs-preview-container .date-clear-btn,
body > .search-dropdown .clear-destination-btn,
body > .search-dropdown .clear-guests-btn {
    color: var(--sb-modal-clear-color, #222222) !important;
    font-size: var(--sb-modal-text-size, 14px) !important;
}

/* Modal apply button in preview */
#cs-preview-container .apply-destination-btn,
#cs-preview-container .apply-dates-btn,
#cs-preview-container .date-apply-btn,
body > .search-dropdown .apply-destination-btn {
    background: var(--sb-modal-apply-bg, #e35323) !important;
    color: var(--sb-modal-apply-text, #ffffff) !important;
    border-radius: var(--sb-btn-radius, 8px) !important;
    font-size: var(--sb-modal-text-size, 14px) !important;
}

/* Modal close button in preview */
#cs-preview-container .search-dropdown-close svg,
body > .search-dropdown .search-dropdown-close svg {
    stroke: var(--sb-modal-close-color, #222222) !important;
}

/* ========================================
   FRONTEND: Stacked Layout (Labels ABOVE Values)
   ======================================== */

/* Search Field - Stacked/column layout */
.cloudstay-search-widget .search-field,
.cloudstay-search-widget .grid-search-bar .search-field,
.cloudstay-search-bar .search-field,
.cloudstay-grid-widget .cloudstay-search-widget .search-field,
.cloudstay-grid-widget .grid-search-bar .search-field,
body .cloudstay-search-widget .search-field,
body .grid-search-bar .search-field {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
    gap: 8px !important;
    height: var(--sb-field-height, 56px) !important;
    padding: var(--sb-inner-padding-y, 12px) var(--sb-inner-padding-x, 16px) !important;
}

/* Field Label - Above the value */
.cloudstay-search-widget .search-field-label,
.cloudstay-search-widget .grid-search-bar .search-field-label,
.cloudstay-search-bar .search-field-label,
.cloudstay-grid-widget .cloudstay-search-widget .search-field-label,
.cloudstay-grid-widget .grid-search-bar .search-field-label,
body .cloudstay-search-widget .search-field-label,
body .grid-search-bar .search-field-label {
    font-family: var(--e-global-typography-text-font-family, inherit) !important;
    margin-bottom: 2px !important;
    margin-right: 0 !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    text-transform: none !important;
    font-size: var(--sb-label-size, 12px) !important;
    font-weight: var(--sb-label-weight, 600) !important;
    color: var(--sb-label-color, #1f1f1f) !important;
}

/* Field Value - Below the label */
.cloudstay-search-widget .search-field-value,
.cloudstay-search-widget .grid-search-bar .search-field-value,
.cloudstay-search-bar .search-field-value,
.cloudstay-grid-widget .cloudstay-search-widget .search-field-value,
.cloudstay-grid-widget .grid-search-bar .search-field-value,
body .cloudstay-search-widget .search-field-value,
body .grid-search-bar .search-field-value {
    font-family: var(--e-global-typography-text-font-family, inherit) !important;
    width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* ============================================
   MOBILE SEARCH MODAL STYLES
   ============================================ */

/* Mobile Trigger Button - Hidden on desktop, shown on mobile */
.mobile-search-trigger {
	display: none;
}

.mobile-search-modal,
.mobile-sub-modal {
	display: none;
}

.grid-search-bar {
	display: flex; /* Shown on desktop */
}

/* Mobile: Show trigger, hide grid */
@media (max-width: 768px) {
	.mobile-search-trigger,
	.cloudstay-search-widget .mobile-search-trigger,
	.cloudstay-search-widget.cloudstay-search-bar .mobile-search-trigger,
	button.mobile-search-trigger {
		display: flex !important;
		align-items: center;
		gap: 12px;
		width: 100%;
		padding: var(--sb-mobile-trigger-padding-y, 14px) var(--sb-mobile-trigger-padding-x, 16px);
		background: var(--sb-mobile-trigger-bg, #2a2a2a);
		color: var(--sb-mobile-trigger-text, #ffffff);
		border: 1px solid #ccc !important;
		border-color: var(--sb-mobile-trigger-border-color, #ccc) !important;
		border-width: var(--sb-mobile-trigger-border-width, 1px) !important;
		border-style: solid !important;
		border-radius: var(--sb-mobile-trigger-radius, 40px);
		font-size: var(--sb-mobile-trigger-font-size, 16px);
		cursor: pointer;
		transition: background 0.2s ease;
	}

	.mobile-search-trigger:active,
	.cloudstay-search-widget .mobile-search-trigger:active {
		background: var(--sb-mobile-trigger-bg-active, #333333);
	}

	.mobile-trigger-icon,
	.cloudstay-search-widget .mobile-trigger-icon {
		width: var(--sb-mobile-icon-size, 32px);
		height: var(--sb-mobile-icon-size, 32px);
		min-width: var(--sb-mobile-icon-size, 32px);
		display: flex;
		align-items: center;
		justify-content: center;
		background: var(--sb-mobile-icon-bg, #ffffff);
		border-radius: 50%;
		flex-shrink: 0;
	}

	.mobile-trigger-icon svg,
	.cloudstay-search-widget .mobile-trigger-icon svg {
		width: var(--sb-mobile-icon-svg-size, 18px);
		height: var(--sb-mobile-icon-svg-size, 18px);
		stroke: var(--sb-mobile-icon-color, #000000);
	}

	.mobile-trigger-text {
		flex: 1;
		text-align: left;
		opacity: 0.9;
	}

	/* Hide the full grid on mobile with maximum specificity */
	.cloudstay-search-widget .grid-search-bar,
	.grid-search-bar,
	body .cloudstay-search-widget .grid-search-bar,
	.cloudstay-search-widget.cloudstay-search-bar .grid-search-bar,
	body .cloudstay-search-widget.cloudstay-search-bar .grid-search-bar {
		display: none !important;
		visibility: hidden !important;
		height: 0 !important;
		overflow: hidden !important;
	}
}

/* Mobile Main Search Modal - Slide-up animation */
@media (max-width: 768px) {
	.cloudstay-search-widget .mobile-search-modal {
		position: fixed;
		inset: 0;
		z-index: 100000;
		display: none;
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.3s ease, visibility 0.3s ease;
	}

	.cloudstay-search-widget .mobile-search-modal.active {
		display: block;
		opacity: 1;
		visibility: visible;
	}

	.cloudstay-search-widget .mobile-modal-overlay {
		position: absolute;
		inset: 0;
		background: rgba(0, 0, 0, 0.5);
	}

	.cloudstay-search-widget .mobile-modal-content {
		position: absolute;
		inset: 0;
		background: var(--sb-mobile-modal-bg, #ffffff);
		border-radius: 0;
		display: flex;
		flex-direction: column;
		transform: translateY(100%);
		transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	}

	.cloudstay-search-widget .mobile-search-modal.active .mobile-modal-content {
		transform: translateY(0);
	}

	.cloudstay-search-widget .mobile-modal-header {
		display: flex;
		align-items: center;
		padding: 16px 20px !important;
		border-bottom: 1px solid var(--sb-mobile-border, #e5e7eb);
		position: relative;
		box-sizing: border-box;
	}

	.cloudstay-search-widget .mobile-modal-back {
		width: 32px;
		height: 32px;
		display: flex;
		align-items: center;
		justify-content: center;
		border: none;
		background: none;
		cursor: pointer;
		margin-right: 12px;
	}

	.cloudstay-search-widget .mobile-modal-back svg {
		width: 20px;
		height: 20px;
		stroke: var(--sb-mobile-text-color, #222222);
	}

	.cloudstay-search-widget .mobile-modal-title {
		font-size: var(--sb-mobile-modal-title-size, 18px);
		font-weight: 600;
		color: var(--sb-mobile-text-color, #222222);
		margin: 0;
		flex: 1;
		text-align: center;
		margin-right: 44px; /* Balance back button */
	}

	.cloudstay-search-widget .mobile-modal-body {
		flex: 1;
		overflow-y: auto;
		padding: 20px !important;
		box-sizing: border-box;
	}

	.cloudstay-search-widget .mobile-filter-btn {
		display: flex;
		align-items: center;
		gap: 16px;
		width: 100%;
		padding: 20px 24px !important;
		margin-bottom: 10px !important;
		background: var(--sb-mobile-filter-bg, #f7f7f7) !important;
		border: 1px solid var(--sb-mobile-border, #e5e7eb) !important;
		border-radius: 16px;
		text-align: left;
		cursor: pointer;
		transition: background 0.2s ease;
		box-sizing: border-box;
	}

	.cloudstay-search-widget .mobile-filter-btn:active {
		opacity: 0.8;
	}

	.cloudstay-search-widget .mobile-filter-icon {
		width: 24px;
		height: 24px;
		display: flex;
		align-items: center;
		justify-content: center;
		flex-shrink: 0;
	}

	.cloudstay-search-widget .mobile-filter-icon svg {
		width: 20px;
		height: 20px;
		stroke: var(--sb-mobile-text-color, #222222);
	}

	.cloudstay-search-widget .mobile-filter-content {
		flex: 1;
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 8px;
	}

	.cloudstay-search-widget .mobile-filter-label {
		font-size: var(--sb-mobile-modal-label-size, 12px);
		font-weight: 600;
		color: var(--sb-mobile-text-color, #222222);
	}

	.cloudstay-search-widget .mobile-filter-value {
		font-size: var(--sb-mobile-modal-text-size, 14px);
		color: var(--sb-mobile-text-secondary, #cccccc);
		opacity: 1;
	}

	.cloudstay-search-widget .mobile-modal-footer {
		display: flex;
		gap: 12px;
		padding: 16px 20px !important;
		border-top: 1px solid var(--sb-mobile-border, #e5e7eb);
		box-sizing: border-box;
	}

	.cloudstay-search-widget .mobile-clear-btn,
	.cloudstay-search-widget .mobile-search-btn {
		flex: 1;
		padding: 14px 24px !important;
		border-radius: 8px;
		font-size: var(--sb-mobile-modal-text-size, 14px);
		font-weight: 600;
		cursor: pointer;
		border: none !important;
		transition: all 0.2s ease;
	}

	.cloudstay-search-widget .mobile-clear-btn {
		background: var(--sb-mobile-clear-btn-bg, #f7f7f7) !important;
		color: var(--sb-mobile-clear-btn-text, #222222) !important;
		border: 1px solid var(--sb-mobile-clear-btn-border, #e5e7eb) !important;
	}

	.cloudstay-search-widget .mobile-search-btn {
		background: var(--sb-btn-bg, #e35323) !important;
		color: var(--sb-btn-text, #ffffff) !important;
	}

	.cloudstay-search-widget .mobile-search-btn:active {
		transform: scale(0.98);
	}

	/* Prevent body scroll when modal is open */
	body.search-modal-open {
		overflow: hidden;
	}
}

/* Mobile Sub-Modal - Slide-in from right animation */
@media (max-width: 768px) {
	.cloudstay-search-widget .mobile-sub-modal {
		position: fixed;
		inset: 0;
		z-index: 100001; /* Above main modal */
		display: none;
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.3s ease, visibility 0.3s ease;
	}

	.cloudstay-search-widget .mobile-sub-modal.active {
		display: block;
		opacity: 1;
		visibility: visible;
	}

	.mobile-sub-modal-overlay {
		position: absolute;
		inset: 0;
		background: rgba(0, 0, 0, 0.5);
	}

	.mobile-sub-modal-content {
		position: absolute;
		inset: 0;
		background: var(--sb-mobile-modal-bg, #ffffff);
		display: flex;
		flex-direction: column;
		transform: translateX(100%);
		transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	}

	.mobile-sub-modal.active .mobile-sub-modal-content {
		transform: translateX(0);
	}

	.cloudstay-search-widget .mobile-sub-modal-header {
		display: flex;
		align-items: center;
		padding: 16px 20px !important;
		border-bottom: 1px solid var(--sb-mobile-border, #e5e7eb);
		background: var(--sb-mobile-modal-bg, #ffffff);
		box-sizing: border-box;
	}

	.cloudstay-search-widget .mobile-sub-modal-back {
		width: 32px;
		height: 32px;
		display: flex;
		align-items: center;
		justify-content: center;
		border: none;
		background: none;
		cursor: pointer;
		margin-right: 12px;
	}

	.mobile-sub-modal-back svg {
		width: 20px;
		height: 20px;
		stroke: var(--sb-mobile-text-color, #222222);
	}

	.mobile-sub-modal-title {
		font-size: var(--sb-mobile-modal-title-size, 18px);
		font-weight: 600;
		color: var(--sb-mobile-text-color, #222222);
		margin: 0;
		flex: 1;
		text-align: center;
		margin-right: 44px;
	}

	/* Sub-modal body background */
	.mobile-sub-modal-body {
		background: var(--sb-mobile-modal-bg, #ffffff);
	}

	.cloudstay-search-widget .mobile-sub-modal-body {
		flex: 1;
		overflow-y: auto;
		padding: 20px !important;
		box-sizing: border-box;
	}

	/* Mobile Sub-Modal Footer */
	.cloudstay-search-widget .mobile-sub-modal-footer {
		padding: 16px 20px !important;
		background: var(--sb-mobile-modal-bg, #ffffff);
		border-top: 1px solid var(--sb-mobile-border, #e5e7eb);
		box-sizing: border-box;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
	}

	/* Universal button styling for ALL sub-modal footers */
	.mobile-sub-modal-footer button,
	.mobile-sub-modal-footer .clear-dates-btn,
	.mobile-sub-modal-footer .close-datepicker-btn,
	.mobile-sub-modal-footer .clear-guests-btn,
	.mobile-sub-modal-footer .apply-btn,
	.mobile-sub-modal-footer .clear-destination-btn,
	.mobile-sub-modal-footer .apply-destination-btn,
	.mobile-sub-modal-footer .clear-filters-btn,
	.mobile-sub-modal-footer .apply-filters-btn {
		flex: 1;
		padding: 14px 24px !important;
		border-radius: 8px;
		font-size: var(--sb-mobile-modal-text-size, 14px);
		font-weight: 600;
		cursor: pointer;
		border: none !important;
		transition: all 0.2s ease;
		box-sizing: border-box;
	}

	/* Clear buttons (hollow outline style for dark mode support) */
	.mobile-sub-modal-footer .clear-dates-btn,
	.mobile-sub-modal-footer .clear-guests-btn,
	.mobile-sub-modal-footer .clear-destination-btn,
	.mobile-sub-modal-footer .clear-filters-btn,
	.mobile-sub-modal-footer button[class*="clear"] {
		background: var(--sb-mobile-clear-btn-bg, #f7f7f7) !important;
		color: var(--sb-mobile-clear-btn-text, #222222) !important;
		border: 1px solid var(--sb-mobile-clear-btn-border, #e5e7eb) !important;
	}

	/* Apply buttons (orange background) */
	.mobile-sub-modal-footer .close-datepicker-btn,
	.mobile-sub-modal-footer .apply-btn,
	.mobile-sub-modal-footer .apply-destination-btn,
	.mobile-sub-modal-footer .apply-filters-btn,
	.mobile-sub-modal-footer button[class*="apply"] {
		background: var(--sb-btn-bg, #e35323) !important;
		color: var(--sb-btn-text, #ffffff) !important;
	}

	/* Hide duplicate month heading in mobile calendar */
	.mobile-sub-modal .calendar-month-title {
		display: none;
	}

	/* Remove body padding when it contains calendar (let calendar be edge-to-edge) */
	.mobile-sub-modal-body:has(.date-picker-months) {
		padding: 0 !important;
	}

	/* Make calendar full width responsive */
	.mobile-sub-modal .date-picker-months {
		width: 100%;
		max-width: 100%;
		padding: 20px;
		box-sizing: border-box;
	}

	.mobile-sub-modal .calendar-month {
		width: 100%;
		max-width: 100%;
	}

	/* Remove divider line from original footer */
	/* Footer in mobile sub-modal body should be hidden (moved to modal footer) */
	.mobile-sub-modal-body .date-picker-footer {
		border-top: none;
		padding: 0;
		display: none;
	}

	/* Footer in mobile-sub-modal-footer should be visible */
	/* Reset ALL desktop footer container styles when inside mobile-sub-modal-footer */
	.mobile-sub-modal-footer .date-picker-footer,
	.mobile-sub-modal-footer .search-dropdown-footer,
	.mobile-sub-modal-footer .guest-dropdown-footer {
		border-top: none !important;
		padding: 0 !important;
		margin: 0 !important;
		display: flex !important;
		width: 100%;
		gap: 12px;
		background: transparent !important;
	}

	/* Mobile calendar responsive grid - remove minmax constraint */
	.mobile-sub-modal .calendar-days,
	.mobile-sub-modal .calendar-weekdays {
		grid-template-columns: repeat(7, 1fr) !important;
		gap: 0 !important;
		width: 100%;
	}

	.mobile-sub-modal .calendar-day {
		min-width: 0 !important;
		width: 100%;
		aspect-ratio: 1 / 1; /* Square cells that scale with width */
		display: flex !important;
		align-items: center;
		justify-content: center;
		padding: 0 !important;
		font-size: clamp(12px, 3.5vw, 16px) !important; /* Responsive font size */
		border-radius: 8px;
	}

	.mobile-sub-modal .calendar-weekday {
		min-width: 0 !important;
		width: 100%;
		padding: 8px 0 !important;
		font-size: clamp(10px, 3vw, 12px) !important;
		text-align: center;
	}

	/* Center calendar content */
	.mobile-sub-modal .date-picker-months {
		display: flex;
		justify-content: center;
		align-items: flex-start;
	}

	.mobile-sub-modal .calendar-month {
		max-width: 400px; /* Prevent too wide on tablets */
	}

	/* Navigation spacing and sizing */
	.mobile-sub-modal .date-picker-nav {
		padding: 16px 20px !important;
		margin-bottom: 12px;
		gap: 16px;
	}

	.mobile-sub-modal .date-picker-nav-btn,
	.mobile-sub-modal .date-nav-btn,
	.mobile-sub-modal .prev-month-btn,
	.mobile-sub-modal .next-month-btn {
		min-width: 44px !important;
		min-height: 44px !important;
		padding: 10px !important;
	}

	/* Ensure title has breathing room */
	.mobile-sub-modal .date-picker-title {
		padding: 0 16px;
		flex: 1;
	}
}

/* Filters Dropdown Styling */
.filter-section {
	margin-bottom: 24px;
}

.filter-section-title {
	font-size: 14px;
	font-weight: 600;
	color: var(--sb-label-color, #222222);
	margin: 0 0 12px 0;
}

.amenity-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.amenity-pill {
	padding: 8px 16px;
	background: var(--sb-field-bg, #f7f7f7);
	border: 1px solid var(--sb-field-border, #e5e7eb);
	border-radius: 20px;
	font-size: 14px;
	color: var(--sb-value-color, #222222);
	cursor: pointer;
	transition: all 0.2s ease;
}

.amenity-pill:hover {
	background: var(--sb-field-bg-hover, #eeeeee);
}

.amenity-pill.active {
	background: var(--sb-btn-bg, #e35323);
	color: var(--sb-btn-text, #ffffff);
	border-color: var(--sb-btn-bg, #e35323);
}

.counter-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid var(--sb-field-border, #e5e7eb);
}

.counter-row:last-child {
	border-bottom: none;
}

.counter-label {
	font-size: 14px;
	font-weight: 500;
	color: var(--sb-label-color, #222222);
}

.counter-controls {
	display: flex;
	align-items: center;
	gap: 12px;
}

.counter-btn {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--sb-field-border, #e5e7eb);
	border-radius: 50%;
	background: var(--sb-field-bg, #f7f7f7);
	color: var(--sb-value-color, #222222);
	font-size: 18px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.counter-btn:hover {
	background: var(--sb-field-bg-hover, #eeeeee);
}

.counter-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.counter-value {
	min-width: 40px;
	text-align: center;
	font-size: 14px;
	font-weight: 500;
	color: var(--sb-value-color, #222222);
}

.filters-actions {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--sb-field-border, #e5e7eb);
}

.clear-filters-btn {
	padding: 10px 20px;
	background: var(--sb-modal-clear-bg, #f7f7f7);
	color: var(--sb-modal-clear-text, #222222);
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease;
}

.clear-filters-btn:hover {
	background: var(--sb-field-bg-hover, #eeeeee);
}

/* ========================================
   MOBILE MODAL FILTER OVERRIDES
   For filters shown inside mobile sub-modals
   ======================================== */
@media (max-width: 768px) {
	/* Filter section title - white text in dark mode */
	.mobile-sub-modal .filter-section-title {
		color: var(--sb-mobile-text-color, #222222);
	}

	/* Filter section accordion header - white text, white arrow */
	.mobile-sub-modal .filter-section--accordion .filter-accordion-header {
		color: var(--sb-mobile-text-color, #222222);
		border-bottom-color: var(--sb-mobile-border, #e5e7eb);
	}

	.mobile-sub-modal .filter-section--accordion .filter-accordion-header svg {
		stroke: var(--sb-mobile-arrow-color, #666666);
	}

	/* Filter section dividers */
	.mobile-sub-modal .filter-section {
		border-bottom: 1px solid var(--sb-mobile-border, #e5e7eb);
		padding-bottom: 24px;
		margin-bottom: 24px;
	}

	.mobile-sub-modal .filter-section:last-child {
		border-bottom: none;
		margin-bottom: 0;
	}

	/* More gap between Rooms and Beds heading and counter rows */
	.mobile-sub-modal .filter-section-title {
		margin-bottom: 16px !important;
	}

	/* Counter rows - more gap for rooms and beds */
	.mobile-sub-modal .counter-row {
		padding: 14px 0;
		border-bottom-color: var(--sb-mobile-border, #e5e7eb);
	}

	.mobile-sub-modal .counter-row:first-of-type {
		padding-top: 0;
	}

	/* Accordion sections - more gap from Rooms and Beds */
	.mobile-sub-modal .filter-section--accordion {
		margin-top: 8px;
	}

	.mobile-sub-modal .counter-label {
		color: var(--sb-mobile-text-color, #222222);
	}

	.mobile-sub-modal .counter-value {
		color: var(--sb-mobile-number-color, #222222);
		min-width: 48px;
	}

	.mobile-sub-modal .counter-btn {
		background: var(--sb-mobile-filter-bg, #f7f7f7);
		border-color: var(--sb-mobile-border, #e5e7eb);
	}

	.mobile-sub-modal .counter-btn svg {
		stroke: var(--sb-mobile-text-color, #222222);
	}

	/* Amenity pills in mobile modal */
	.mobile-sub-modal .amenity-pill {
		background: var(--sb-mobile-filter-bg, #f7f7f7);
		border-color: var(--sb-mobile-border, #e5e7eb);
		color: var(--sb-mobile-text-color, #222222);
	}

	/* Guest rows in mobile modal */
	.mobile-sub-modal .guest-row {
		border-bottom: 1px solid var(--sb-mobile-border, #e5e7eb) !important;
		padding: 20px 0 !important;
	}

	.mobile-sub-modal .guest-row:last-of-type {
		border-bottom: none !important;
	}

	.mobile-sub-modal .guest-info h4 {
		color: var(--sb-mobile-text-color, #222222) !important;
		font-size: 16px;
		font-weight: 600;
		margin: 0 0 4px 0;
	}

	.mobile-sub-modal .guest-info p {
		color: var(--sb-mobile-label-color, #666666) !important;
		font-size: 13px;
		margin: 0;
	}

	.mobile-sub-modal .guest-counter-value {
		color: var(--sb-mobile-number-color, #222222) !important;
		font-size: 16px;
		font-weight: 600;
		min-width: 32px;
		text-align: center;
	}

	.mobile-sub-modal .guest-counter-btn {
		background: var(--sb-mobile-modal-bg, #ffffff) !important;
		border: 1px solid var(--sb-mobile-border, #e5e7eb) !important;
		width: 36px;
		height: 36px;
		border-radius: 50%;
		display: flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
	}

	.mobile-sub-modal .guest-counter-btn svg {
		stroke: var(--sb-mobile-text-color, #222222) !important;
	}

	/* Destination content in mobile sub-modal */
	.mobile-sub-modal .destination-input {
		width: 100%;
		padding: 16px 20px;
		border: 1px solid var(--sb-mobile-border, #e5e7eb);
		border-radius: 12px;
		background: var(--sb-mobile-filter-bg, #f7f7f7);
		color: var(--sb-mobile-text-color, #222222);
		font-size: 16px;
		margin-bottom: 16px;
		box-sizing: border-box;
	}

	.mobile-sub-modal .destination-input::placeholder {
		color: var(--sb-mobile-label-color, #666666);
	}

	.mobile-sub-modal .destination-input:focus {
		outline: none;
		border-color: var(--sb-mobile-text-color, #222222);
	}

	.mobile-sub-modal .destination-suggestions {
		display: flex;
		flex-direction: column;
		gap: 0;
		max-height: none;
		overflow-y: visible;
	}

	.mobile-sub-modal .destination-item {
		padding: 16px 0;
		border-bottom: 1px solid var(--sb-mobile-border, #e5e7eb);
		color: var(--sb-mobile-text-color, #222222);
		font-size: 16px;
		cursor: pointer;
		display: flex;
		align-items: center;
		gap: 12px;
	}

	.mobile-sub-modal .destination-item:last-child {
		border-bottom: none;
	}

	.mobile-sub-modal .destination-item:active {
		opacity: 0.7;
	}

	.mobile-sub-modal .destination-item-icon {
		width: 40px;
		height: 40px;
		background: var(--sb-mobile-filter-bg, #f7f7f7);
		border-radius: 8px;
		display: flex;
		align-items: center;
		justify-content: center;
		flex-shrink: 0;
	}

	.mobile-sub-modal .destination-item-icon svg {
		width: 20px;
		height: 20px;
		stroke: var(--sb-mobile-text-color, #222222);
	}

	.mobile-sub-modal .suggestions-hint {
		color: var(--sb-mobile-label-color, #666666);
		font-size: 14px;
		padding: 20px 0;
		text-align: center;
	}

	/* Hide search input when setting is off */
	.mobile-sub-modal .destination-input.hidden,
	.mobile-sub-modal-body .destination-input.hidden {
		display: none !important;
	}
}

/* ========================================
   VERTICAL SCROLLING CALENDAR (MOBILE)
   Wander.com-style calendar for mobile
   ======================================== */

@media (max-width: 768px) {
	/* ===== VERTICAL CALENDAR CONTAINER ===== */
	.mobile-vertical-calendar {
		display: flex;
		flex-direction: column;
		height: calc(100vh - 120px); /* Full height minus header/footer */
		width: 100%;
	}

	/* ===== SCROLL CONTAINER ===== */
	.vertical-calendar-scroll-container {
		flex: 1;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch; /* Smooth iOS scrolling */
		scroll-behavior: smooth;
		padding: 16px;
	}

	/* ===== MONTHS CONTAINER ===== */
	.vertical-calendar-months {
		display: flex;
		flex-direction: column;
		gap: 32px;
	}

	/* ===== INDIVIDUAL MONTH ===== */
	.vertical-calendar-month {
		width: 100%;
	}

	/* Month header (sticky) */
	.vertical-month-header {
		position: sticky;
		top: 0;
		background: var(--sb-mobile-modal-bg, #ffffff);
		z-index: 10;
		padding: 12px 0;
		margin-bottom: 24px;
		border-bottom: 1px solid var(--sb-mobile-border, #e5e7eb);
	}

	.cloudstay-search-widget .vertical-month-title {
		font-size: 18px;
		font-weight: 600;
		color: var(--sb-mobile-text-color, #222222);
		text-align: center;
		margin: 0 0 10px 0 !important;
	}

	/* ===== CALENDAR GRID ===== */
	.vertical-calendar-weekdays {
		display: grid;
		grid-template-columns: repeat(7, 1fr);
		gap: 4px;
		margin-bottom: 4px;
		padding: 0;
	}

	.vertical-weekday {
		text-align: center;
		font-size: 12px;
		font-weight: 600;
		color: var(--sb-mobile-label-color, #888888);
		padding: 8px 0;
	}

	.vertical-calendar-days {
		display: grid;
		grid-template-columns: repeat(7, 1fr);
		gap: 4px;
		padding: 0;
	}

	/* ===== CALENDAR DAY CELLS ===== */
	.vertical-calendar-day {
		aspect-ratio: 1 / 1; /* Square cells */
		display: flex;
		align-items: center;
		justify-content: center;
		background: transparent;
		border: none;
		border-radius: 4px;
		font-size: 16px;
		font-weight: 400;
		color: var(--sb-mobile-text-color, #222222);
		cursor: pointer;
		transition: all 0.2s ease;
		position: relative;
		min-width: 44px; /* Touch target size */
		min-height: 44px;
	}

	/* ===== DAY STATES ===== */

	/* Hover */
	.vertical-calendar-day:hover:not(.disabled):not(.selected):not(.check-in):not(.check-out):not(.empty) {
		background-color: var(--cal-hover-bg, #f7f7f7);
	}

	/* Empty (other month days) */
	.vertical-calendar-day.empty {
		pointer-events: none;
		visibility: hidden;
	}

	/* Other month */
	.vertical-calendar-day.other-month {
		opacity: var(--cal-other-month-opacity, 0.4);
		color: var(--sb-mobile-label-color, #888888);
	}

	/* Disabled (past dates) */
	.vertical-calendar-day.disabled {
		color: var(--cal-disabled-text, #b0b0b0);
		cursor: not-allowed;
		text-decoration: line-through;
		opacity: 0.5;
	}

	/* Today */
	.vertical-calendar-day.today {
		font-weight: 700;
		border: 2px solid var(--cal-today-border, #222222);
		border-radius: 4px;
	}

	/* Selected: Check-in */
	.vertical-calendar-day.selected.check-in,
	.vertical-calendar-day.check-in {
		background-color: var(--cal-selected-bg, var(--cs-search-primary, #e35323));
		color: var(--cal-selected-text, #ffffff) !important;
		font-weight: 600;
		border-radius: 4px;
	}

	/* Selected: Check-out */
	.vertical-calendar-day.selected.check-out,
	.vertical-calendar-day.check-out {
		background-color: var(--cal-selected-bg, var(--cs-search-primary, #e35323));
		color: var(--cal-selected-text, #ffffff) !important;
		font-weight: 600;
		border-radius: 4px;
	}

	/* In-range (between check-in and check-out) */
	.vertical-calendar-day.in-range {
		background-color: var(--cal-range-bg, rgba(227, 83, 35, 0.1));
		border-radius: 4px;
		color: var(--sb-mobile-text-color, #222222);
	}

	/* Range edge styling */
	.vertical-calendar-day.check-in.in-range {
		border-radius: 4px 0 0 4px; /* Rounded left */
	}

	.vertical-calendar-day.check-out.in-range {
		border-radius: 0 4px 4px 0; /* Rounded right */
	}

	/* Active/pressed state */
	.vertical-calendar-day:active:not(.disabled) {
		transform: scale(0.95);
	}

	/* Focus state (accessibility) */
	.vertical-calendar-day:focus-visible {
		outline: 2px solid var(--cs-search-primary, #e35323);
		outline-offset: 2px;
	}

	/* ===== SELECTION DISPLAY (STICKY FOOTER) ===== */
	.vertical-calendar-selection {
		background: var(--sb-mobile-modal-bg, #ffffff) !important;
		background-color: var(--sb-mobile-modal-bg, #ffffff) !important;
		border-top: 2px solid var(--sb-mobile-border, #e5e7eb);
		padding: 20px 16px 24px;
		display: flex;
		flex-direction: column;
		gap: 12px;
		position: sticky;
		bottom: 0;
		z-index: 10;
		box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
	}

	.cloudstay-search-widget .selection-row {
		display: flex;
		justify-content: space-between;
		align-items: center;
		background: var(--sb-mobile-selection-bg, #ffffff) !important;
		background-color: var(--sb-mobile-selection-bg, #ffffff) !important;
		border: 1px solid var(--sb-mobile-selection-border, #e5e7eb) !important;
		border-radius: 12px;
		padding: 18px 20px !important;
		transition: all 0.2s ease;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	}

	.cloudstay-search-widget .selection-label {
		font-size: 13px;
		font-weight: 600;
		color: var(--sb-mobile-label-color, #666666);
		text-transform: uppercase;
		letter-spacing: 0.5px;
	}

	.cloudstay-search-widget .selection-value {
		font-size: 15px;
		font-weight: 500;
		color: var(--sb-mobile-text-secondary, #888888);
	}

	.cloudstay-search-widget .selection-value.has-value {
		color: var(--sb-mobile-text-color, #222222);
		font-weight: 600;
	}
}

/* ========================================
   Admin Preview Layout Style Overrides
   These MUST be at the very end to override all other rules
   Uses CSS variables to respect Widget Builder settings
   ======================================== */

/* Stacked Layout in Admin Preview */
#cs-preview-container .cloudstay-search-widget.layout-stacked .grid-search-bar,
#cs-preview-container .cloudstay-search-bar.layout-stacked .grid-search-bar,
#cs-preview-container .layout-stacked .grid-search-bar,
.cs-builder__preview-container .cloudstay-search-widget.layout-stacked .grid-search-bar,
.cs-builder__preview-container .layout-stacked .grid-search-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    gap: var(--sb-field-gap, 0px) !important;
}

#cs-preview-container .cloudstay-search-widget.layout-stacked .search-field,
#cs-preview-container .cloudstay-search-bar.layout-stacked .search-field,
#cs-preview-container .layout-stacked .search-field,
.cs-builder__preview-container .cloudstay-search-widget.layout-stacked .search-field,
.cs-builder__preview-container .layout-stacked .search-field {
    flex: none !important;
    width: 100% !important;
    justify-content: flex-start !important;
    height: var(--sb-field-height, 56px) !important;
    padding: var(--sb-inner-padding-y, 12px) var(--sb-inner-padding-x, 16px) !important;
}

#cs-preview-container .cloudstay-search-widget.layout-stacked .search-btn,
#cs-preview-container .cloudstay-search-bar.layout-stacked .search-btn,
#cs-preview-container .layout-stacked .search-btn,
.cs-builder__preview-container .cloudstay-search-widget.layout-stacked .search-btn,
.cs-builder__preview-container .layout-stacked .search-btn {
    width: 100% !important;
    margin: max(var(--sb-field-gap, 0px), 12px) 0 0 0 !important;
    height: var(--sb-field-height, 56px) !important;
}

#cs-preview-container .cloudstay-search-widget.layout-stacked .search-bar-divider,
#cs-preview-container .cloudstay-search-bar.layout-stacked .search-bar-divider,
#cs-preview-container .layout-stacked .search-bar-divider,
.cs-builder__preview-container .cloudstay-search-widget.layout-stacked .search-bar-divider,
.cs-builder__preview-container .layout-stacked .search-bar-divider {
    width: 100% !important;
    height: 1px !important;
}

/* Compact Layout in Admin Preview - Uses min() to respect Widget Builder settings */
#cs-preview-container .cloudstay-search-widget.layout-compact .grid-search-bar,
#cs-preview-container .cloudstay-search-bar.layout-compact .grid-search-bar,
#cs-preview-container .layout-compact .grid-search-bar,
.cs-builder__preview-container .cloudstay-search-widget.layout-compact .grid-search-bar,
.cs-builder__preview-container .layout-compact .grid-search-bar {
    min-height: min(var(--sb-field-height, 56px), 44px) !important;
}

#cs-preview-container .cloudstay-search-widget.layout-compact .search-field,
#cs-preview-container .cloudstay-search-bar.layout-compact .search-field,
#cs-preview-container .layout-compact .search-field,
.cs-builder__preview-container .cloudstay-search-widget.layout-compact .search-field,
.cs-builder__preview-container .layout-compact .search-field {
    height: min(var(--sb-field-height, 56px), 44px) !important;
    min-height: min(var(--sb-field-height, 56px), 44px) !important;
    padding: min(var(--sb-inner-padding-y, 12px), 6px) min(var(--sb-inner-padding-x, 16px), 12px) !important;
    border-radius: var(--sb-field-radius, 8px) !important;
}

#cs-preview-container .cloudstay-search-widget.layout-compact .search-field-label,
#cs-preview-container .cloudstay-search-bar.layout-compact .search-field-label,
#cs-preview-container .layout-compact .search-field-label,
.cs-builder__preview-container .cloudstay-search-widget.layout-compact .search-field-label,
.cs-builder__preview-container .layout-compact .search-field-label {
    font-size: min(var(--sb-label-size, 12px), 10px) !important;
}

#cs-preview-container .cloudstay-search-widget.layout-compact .search-field-value,
#cs-preview-container .cloudstay-search-bar.layout-compact .search-field-value,
#cs-preview-container .layout-compact .search-field-value,
.cs-builder__preview-container .cloudstay-search-widget.layout-compact .search-field-value,
.cs-builder__preview-container .layout-compact .search-field-value {
    font-size: min(var(--sb-value-size, 14px), 12px) !important;
}

#cs-preview-container .cloudstay-search-widget.layout-compact .search-btn,
#cs-preview-container .cloudstay-search-bar.layout-compact .search-btn,
#cs-preview-container .layout-compact .search-btn,
.cs-builder__preview-container .cloudstay-search-widget.layout-compact .search-btn,
.cs-builder__preview-container .layout-compact .search-btn {
    padding: min(var(--sb-inner-padding-y, 12px), 6px) min(var(--sb-inner-padding-x, 24px), 14px) !important;
    font-size: min(var(--sb-btn-size, 16px), 13px) !important;
    height: calc(min(var(--sb-field-height, 56px), 44px) - 8px) !important;
    min-height: calc(min(var(--sb-field-height, 56px), 44px) - 8px) !important;
    max-height: calc(min(var(--sb-field-height, 56px), 44px) - 8px) !important;
    line-height: 1.2 !important;
    border-radius: var(--sb-btn-radius, 8px) !important;
}
