/* =========================================================
   ABH Search – base
   ====================================================== */

.abh-search-shell {
    max-width: 1120px;
    margin: 40px auto;
    padding: 24px 32px 28px;
    background: rgba(255,255,255,0.96);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.10);
    box-sizing: border-box;
    font-family: inherit;
}

.abh-search-bar {
    margin: 0;
}

.abh-search-shell *,
.abh-search-shell *::before,
.abh-search-shell *::after {
    box-sizing: border-box;
}

/* =========================================================
   Layout
   ====================================================== */

.abh-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

/* main row field widths */
.abh-field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.abh-field--dest   { flex: 2.0 1 260px; }
.abh-field--dep    { flex: 1.1 1 150px; }
.abh-field--date   { flex: 1.1 1 150px; }
.abh-field--nights { flex: 0.9 1 130px; }
.abh-field--guests { flex: 1.2 1 160px; }
.abh-field--submit { flex: 0.8 0 120px; }

.abh-flight-options-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 18px;
    align-items: center;
}

.abh-field--airline,
.abh-field--class {
    flex: 1.3 1 210px;
}

.abh-direct-only-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    font-size: 13px;
}

/* =========================================================
   Labels / inputs
   ====================================================== */

.abh-label {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #999;
}

.abh-input,
.abh-select,
.abh-guests-toggle,
.abh-search-submit-btn {
    width: 100%;
    height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid #ddd;
    background-color: #fff;
    font-size: 14px;
    line-height: 1;
    color: #333;
    outline: none;
    transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
    appearance: none;
}

.abh-input:focus,
.abh-select:focus,
.abh-guests-toggle:focus,
.abh-search-submit-btn:focus {
    border-color: #7db921;
    box-shadow: 0 0 0 3px rgba(125,185,33,0.24);
}

/* vertically centre content inside pill controls */
.abh-input,
.abh-select {
    display: flex;
    align-items: center;
}

/* selects: show dropdown arrow */
.abh-select {
    padding-right: 34px;
    background-image: linear-gradient(45deg, transparent 50%, #777 50%), 
                      linear-gradient(135deg, #777 50%, transparent 50%);
    background-position: calc(100% - 18px) 20px, calc(100% - 12px) 20px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

/* Guests toggle button */
.abh-guests-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border: 1px solid #ddd;
    background-color: #fff;
}

.abh-guests-text {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.abh-guests-caret {
    margin-left: 10px;
    font-size: 11px;
}

/* Search submit */
.abh-search-submit-btn {
    background-color: #7db921;
    color: #fff;
    font-weight: 600;
    border-color: #7db921;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.abh-search-submit-btn:hover {
    background-color: #6aa11c;
    border-color: #6aa11c;
}

/* Small selects in row 2 */
.abh-select--small {
    height: 44px;
    padding-left: 14px;
}

/* Debug box */
.abh-search-debug {
    max-width: 1120px;
    margin: 0 auto 20px;
    padding: 16px 18px;
    background: #f6faf1;
    border: 1px solid #dbe9c5;
    border-radius: 10px;
    font-size: 13px;
}

.abh-search-debug pre {
    background: #fff;
    padding: 12px;
    border-radius: 6px;
    overflow: auto;
}

/* =========================================================
   Destination autocomplete
   ====================================================== */

.abh-field--dest {
    /* needed so suggestions can sit under this */
}

.abh-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 30;
    display: none;
}

.abh-suggestions-inner {
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 16px 30px rgba(0,0,0,0.16);
    border: 1px solid #e4e4e4;
    padding: 4px 0;
}

.abh-suggestion,
.abh-suggestions-inner div {
    padding: 7px 14px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    cursor: pointer;
}

.abh-suggestion:hover,
.abh-suggestions-inner div:hover {
    background: #f5f8fb;
}

.abh-suggestion-main {
    font-weight: 500;
    color: #222;
}

.abh-suggestion-meta {
    font-size: 12px;
    color: #888;
}

/* =========================================================
   Guests popup
   ====================================================== */

.abh-field--guests {
    position: relative;
}

.abh-guests-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 460px;
    max-width: calc(100vw - 40px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.32);
    z-index: 50;
    display: none;
}

.abh-guests-panel-inner {
    padding: 22px 22px 18px;
}

.abh-guests-panel-title {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 18px;
}

.abh-rooms-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 380px;
    overflow-y: auto;
}

/* Room block */
.abh-room-block {
    border-radius: 14px;
    background: #f7f8fb;
    border: 1px solid #e4e6ef;
    padding: 14px 14px 12px;
}

.abh-room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.abh-room-title {
    font-weight: 600;
    font-size: 15px;
}

.abh-room-remove {
    border: none;
    background: transparent;
    color: #c2c2c2;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

.abh-room-remove:hover {
    color: #ff6666;
}

.abh-room-row {
    display: flex;
    gap: 20px;
    margin-bottom: 14px;
}

.abh-room-col {
    flex: 1 1 0;
}

.abh-room-label {
    font-size: 14px;
    margin-bottom: 6px;
}

.abh-room-label-small {
    font-size: 12px;
    color: #888;
}

/* steppers */
.abh-stepper {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #ddd;
    overflow: hidden;
    min-width: 110px;
}

.abh-stepper-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: #f0f0f0;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.abh-stepper-btn:hover {
    background: #e4e4e4;
}

.abh-stepper-value {
    min-width: 30px;
    text-align: center;
    font-size: 15px;
    padding: 0 8px;
}

/* children ages */
.abh-room-children-ages {
    padding-top: 6px;
    border-top: 1px solid #e2e5ef;
}

.abh-room-children-title {
    font-size: 13px;
    margin-bottom: 8px;
}

.abh-room-child-age {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.abh-room-child-age label {
    font-size: 12px;
    color: #666;
}

.abh-room-child-age select {
    height: 40px;
    border-radius: 999px;
    border: 1px solid #d4d4d4;
    padding: 0 14px;
    font-size: 13px;
}

/* put age selectors on one line on wider view */
@media (min-width: 520px) {
    .abh-room-children-ages {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .abh-room-children-ages .abh-room-child-age {
        margin-bottom: 0;
    }

    .abh-room-children-ages .abh-room-child-age-wrapper {
        display: flex;
        gap: 10px;
    }
}

/* Add another room / footer buttons */
.abh-add-room-btn {
    margin-top: 14px;
    width: 100%;
    height: 46px;
    border-radius: 999px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
}

.abh-add-room-btn:hover {
    background: #f4f4f4;
}

.abh-guests-footer {
    display: flex;
    gap: 12px;
    margin-top: 14px;
}

.abh-guests-footer button {
    flex: 1 1 0;
    height: 44px;
    border-radius: 999px;
    border: 1px solid #ddd;
    font-size: 14px;
    cursor: pointer;
}

.abh-guests-cancel {
    background: #f5f5f5;
}

.abh-guests-apply {
    background: #7db921;
    border-color: #7db921;
    color: #fff;
    font-weight: 600;
}

.abh-guests-apply:hover {
    background: #6aa11c;
}

/* =========================================================
   jQuery UI datepicker – 2-month layout & styling
   ====================================================== */

.ui-datepicker {
    font-size: 13px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.25);
    border-radius: 14px;
    border: 1px solid #e0e0e0;
    padding: 10px 12px 12px;
    background: #fff;
    z-index: 9999 !important;
}

.ui-datepicker-multi {
    width: auto !important;
}

.ui-datepicker-group {
    float: left;
    margin: 0 6px;
}

.ui-datepicker-header {
    border: none;
    background: transparent;
    color: #333;
}

.ui-datepicker-title {
    font-weight: 600;
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    top: 10px;
}

.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span {
    margin-top: -1px;
}

.ui-datepicker th {
    font-weight: 600;
    color: #999;
}

.ui-datepicker td span,
.ui-datepicker td a {
    text-align: center;
    padding: 4px 0;
    border-radius: 999px;
}

.ui-datepicker .ui-state-default {
    border: none;
    background: transparent;
}

.ui-datepicker .ui-state-hover {
    background: #f0f4ff;
}

.ui-datepicker .ui-state-active {
    background: #7db921;
    color: #fff;
}

/* =========================================================
   Responsive tweaks
   ====================================================== */

@media (max-width: 960px) {
    .abh-search-shell {
        padding: 20px 18px 22px;
    }

    .abh-direct-only-wrap {
        margin-left: 0;
    }
}

@media (max-width: 720px) {
    .abh-search-row {
        gap: 12px;
    }

    .abh-field--submit {
        flex: 1 1 100%;
    }

    .abh-search-submit-btn {
        width: 100%;
    }

    .abh-guests-panel {
        right: auto;
        left: 0;
    }
}