/* ═══════════════════════════════════════════════════════════════
   U2G Guest Selector — Booking.com style
   Append to hotels.css
   ═══════════════════════════════════════════════════════════════ */

/* ── Trigger button ──────────────────────────────────────────── */
.u2g-gs-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: #1E1E1E;
    cursor: pointer;
    user-select: none;
    transition: border-color .18s;
    width: 100%;
    text-align: left;
    position: relative;
    box-sizing: border-box;
}
.u2g-gs-trigger:hover,
.u2g-gs-trigger.is-open { border-color: #1E963C; }
.u2g-gs-trigger.is-open { box-shadow: 0 0 0 3px rgba(30,150,60,.1); }

.u2g-gs-trigger-icon { color: #888; flex-shrink: 0; }
.u2g-gs-summary { flex: 1; font-size: 14px; color: #666; font-weight: 500; }
.u2g-gs-chevron {
    color: #aaa;
    transition: transform .2s;
    flex-shrink: 0;
}
.u2g-gs-trigger.is-open .u2g-gs-chevron { transform: rotate(180deg); }

/* ── Popover container ───────────────────────────────────────── */
.u2g-gs-popover {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 200;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
    min-width: 320px;
    max-width: 380px;
    padding: 0;
    overflow: hidden;
}

/* ── Room section ────────────────────────────────────────────── */
.u2g-gs-room {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f2f5;
}
.u2g-gs-room:last-of-type { border-bottom: none; }

.u2g-gs-room-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.u2g-gs-room-title {
    font-size: 15px;
    font-weight: 700;
    color: #1E1E1E;
}
.u2g-gs-remove-room {
    background: none;
    border: none;
    color: #DC2626;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: opacity .18s;
}
.u2g-gs-remove-room:hover { opacity: .75; }

/* ── Counter row (Adults / Children) ─────────────────────────── */
.u2g-gs-counter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}
.u2g-gs-counter-row + .u2g-gs-counter-row {
    border-top: 1px solid #f8f8f8;
}
.u2g-gs-counter-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}
.u2g-gs-counter-controls {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.u2g-gs-counter-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #fff;
    font-size: 18px;
    color: #1E963C;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    line-height: 1;
    flex-shrink: 0;
}
.u2g-gs-counter-btn:hover:not(:disabled) { background: #EBF7EF; }
.u2g-gs-counter-btn:disabled { color: #ccc; cursor: not-allowed; }
.u2g-gs-counter-val {
    min-width: 32px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #1E1E1E;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    line-height: 36px;
    height: 36px;
    display: inline-block;
}

/* ── Child age tags (Booking.com style) ──────────────────────── */
.u2g-gs-ages {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f2f5;
}
.u2g-gs-ages-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
    font-weight: 500;
}
.u2g-gs-age-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}

/* Age tag pill */
.u2g-gs-age-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #EBF7EF;
    border: 1.5px solid #A8D8B4;
    border-radius: 20px;
    padding: 4px 8px 4px 10px;
    font-size: 13px;
    color: #166B2B;
    font-weight: 600;
}
.u2g-gs-age-sel {
    background: transparent;
    border: none;
    outline: none;
    font-size: 13px;
    font-weight: 600;
    color: #166B2B;
    cursor: pointer;
    padding: 0;
    max-width: 70px;
    -webkit-appearance: none;
}
.u2g-gs-age-remove {
    background: none;
    border: none;
    color: #888;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    transition: color .15s;
}
.u2g-gs-age-remove:hover { color: #DC2626; }

/* Add child (+) button */
.u2g-gs-add-child {
    width: 30px;
    height: 30px;
    border: 1.5px dashed #A8D8B4;
    border-radius: 50%;
    background: #fff;
    color: #1E963C;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    flex-shrink: 0;
}
.u2g-gs-add-child:hover { background: #EBF7EF; border-style: solid; }

.u2g-gs-age-note {
    font-size: 11px;
    color: #aaa;
    margin: 6px 0 0;
    font-style: italic;
}

/* ── Add room button ─────────────────────────────────────────── */
.u2g-gs-add-room {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 13px 20px;
    border: none;
    background: #f8faf8;
    color: #1E963C;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background .15s;
    border-top: 1px solid #f0f2f5;
}
.u2g-gs-add-room:hover { background: #EBF7EF; 
     color: #1E963C;
}

/* ── Footer / Done button ────────────────────────────────────── */
.u2g-gs-footer {
    padding: 12px 20px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}
.u2g-gs-done {
    padding: 10px 28px;
    background: #1E963C;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s;
}
.u2g-gs-done:hover { background: #166B2B; }

/* ── Integration into search bar field ───────────────────────── */
.u2g-sb-guests-field {
    position: relative;
    flex: 1.5;
    min-width: 200px;
}
.u2g-sb-guests-field .u2g-gs-popover {
    min-width: 340px;
}

/* ── Integration into archive search bar ─────────────────────── */
.u2g-as-guests-field {
    position: relative;
    flex: 1.5;
    min-width: 200px;
}
.u2g-as-guests-field label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 5px;
}
.u2g-as-guests-field .u2g-gs-popover {
    min-width: 340px;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 600px) {
    .u2g-gs-popover {
        min-width: 280px;
        max-width: calc(100vw - 32px);
        left: 50%;
        transform: translateX(-50%);
    }
}
