/* ============================================================
   Hotel Booking Search Bar — hotel-booking.css
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --hbs-accent:      #e05a5a;
    --hbs-accent-h:    #c94444;
    --hbs-bg:          #ffffff;
    --hbs-border:      #e0e0e0;
    --hbs-label:       #888888;
    --hbs-text:        #222222;
    --hbs-placeholder: #aaaaaa;
    --hbs-shadow:      0 4px 32px rgba(0,0,0,0.10);
    --hbs-radius:      12px;
    --hbs-cal-today:   #fff3f3;
    --hbs-cal-range:   #fdeaea;
    --hbs-cal-sel:     #e05a5a;
    --hbs-font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Wrapper ────────────────────────────────────────────────── */
.hbs-wrap {
    position: relative;
    width: 100%;
    font-family: var(--hbs-font);
    box-sizing: border-box;
}

/* ── Form Bar ───────────────────────────────────────────────── */
.hbs-form {
    display: flex;
    align-items: center;
    background: var(--hbs-bg);
    border: 1.5px solid var(--hbs-border);
    border-radius: var(--hbs-radius);
    box-shadow: var(--hbs-shadow);
    padding: 0 6px;
    gap: 0;
    flex-wrap: nowrap;
    overflow: visible;
}

/* ── Field ──────────────────────────────────────────────────── */
.hbs-field {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 18px;
    flex: 1 1 0;
    min-width: 0;
    cursor: pointer;
    transition: background 0.15s;
    border-radius: 10px;
}

.hbs-field:hover {
    background: #f8f8f8;
}

/* ── Label ──────────────────────────────────────────────────── */
.hbs-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hbs-label);
    margin-bottom: 4px;
    pointer-events: none;
    white-space: nowrap;
}

.hbs-icon {
    width: 14px;
    height: 14px;
    color: var(--hbs-accent);
    flex-shrink: 0;
}

/* ── Date Input ─────────────────────────────────────────────── */
.hbs-date-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--hbs-text);
    cursor: pointer;
    width: 100%;
    padding: 0;
    font-family: var(--hbs-font);
}

.hbs-date-input::placeholder {
    color: var(--hbs-placeholder);
    font-weight: 400;
}

/* ── Select ─────────────────────────────────────────────────── */
.hbs-select {
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--hbs-text);
    cursor: pointer;
    width: 100%;
    padding: 0;
    font-family: var(--hbs-font);
    appearance: none;
    -webkit-appearance: none;
}

/* ── Counter ─────────────────────────────────────────────────── */
.hbs-counter {
    display: flex !important;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.hbs-cnt-btn {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50%;
    border: 1.5px solid var(--hbs-border) !important;
    background: #fff !important;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    color: var(--hbs-accent) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
    box-shadow: none !important;
    text-decoration: none !important;
}

.hbs-cnt-btn:hover {
    background: var(--hbs-accent) !important;
    border-color: var(--hbs-accent) !important;
    color: #fff !important;
}

.hbs-cnt-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.hbs-counter input[type="number"] {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    text-align: center;
    border: none !important;
    outline: none;
    background: transparent !important;
    font-size: 16px;
    font-weight: 700;
    color: var(--hbs-text);
    font-family: var(--hbs-font);
    -moz-appearance: textfield;
    appearance: textfield;
    pointer-events: none;
    display: block;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    line-height: 1.4;
}

.hbs-counter input[type="number"]::-webkit-outer-spin-button,
.hbs-counter input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ── Divider ────────────────────────────────────────────────── */
.hbs-divider {
    width: 1px;
    height: 36px;
    background: var(--hbs-border);
    flex-shrink: 0;
}

/* ── Search Button ──────────────────────────────────────────── */
.hbs-search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--hbs-accent);
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    margin: 6px;
    transition: background 0.18s, transform 0.12s;
    font-family: var(--hbs-font);
}

.hbs-search-btn:hover {
    background: var(--hbs-accent-h);
    transform: translateY(-1px);
}

.hbs-search-btn:active {
    transform: translateY(0);
}

/* ── Error ───────────────────────────────────────────────────── */
.hbs-err {
    font-size: 11px;
    color: var(--hbs-accent);
    margin-top: 2px;
    min-height: 14px;
    display: block;
}

/* ── Calendar Popup ─────────────────────────────────────────── */
.hbs-calendar-popup {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 9999;
    background: #fff;
    border: 1.5px solid var(--hbs-border);
    border-radius: var(--hbs-radius);
    box-shadow: 0 8px 40px rgba(0,0,0,0.13);
    padding: 0;
    min-width: 560px;
    overflow: hidden;
    animation: hbs-fadein 0.18s ease;
}

@keyframes hbs-fadein {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Calendar Header */
.hbs-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #2d2d2d;
    color: #fff;
    padding: 12px 20px;
}

.hbs-cal-nav {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 2px 10px;
    border-radius: 6px;
    line-height: 1;
    transition: background 0.15s;
}

.hbs-cal-nav:hover {
    background: rgba(255,255,255,0.15);
}

.hbs-cal-months {
    display: flex;
    gap: 120px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Calendar Body */
.hbs-cal-body {
    display: flex;
    padding: 16px 20px 8px;
    gap: 24px;
}

/* Month Grid */
.hbs-month {
    flex: 1;
}

.hbs-month-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--hbs-text);
    margin-bottom: 10px;
    text-align: center;
    display: none; /* shown in header instead */
}

.hbs-day-names {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 4px;
}

.hbs-day-name {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #aaa;
    padding: 4px 0;
    letter-spacing: 0.04em;
}

.hbs-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.hbs-day {
    text-align: center;
    padding: 7px 2px;
    font-size: 13px;
    font-weight: 500;
    color: var(--hbs-text);
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.12s, color 0.12s;
    user-select: none;
    position: relative;
}

.hbs-day:hover:not(.hbs-day-disabled):not(.hbs-day-selected) {
    background: var(--hbs-cal-today);
    color: var(--hbs-accent);
}

.hbs-day-empty {
    cursor: default;
}

.hbs-day-disabled {
    color: #ccc;
    cursor: not-allowed;
    text-decoration: line-through;
}

.hbs-day-today {
    font-weight: 800;
    color: var(--hbs-accent);
}

.hbs-day-selected {
    background: var(--hbs-cal-sel) !important;
    color: #fff !important;
    border-radius: 6px;
    font-weight: 700;
}

.hbs-day-range {
    background: var(--hbs-cal-range);
    color: var(--hbs-accent);
    border-radius: 0;
}

.hbs-day-range-start {
    background: var(--hbs-cal-sel) !important;
    color: #fff !important;
    border-radius: 6px 0 0 6px;
}

.hbs-day-range-end {
    background: var(--hbs-cal-sel) !important;
    color: #fff !important;
    border-radius: 0 6px 6px 0;
}

/* Calendar month separator */
.hbs-cal-sep {
    width: 1px;
    background: var(--hbs-border);
    align-self: stretch;
    flex-shrink: 0;
}

/* Calendar Footer */
.hbs-cal-footer {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px 14px;
    border-top: 1px solid var(--hbs-border);
}

.hbs-cal-clear,
.hbs-cal-close {
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--hbs-accent);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s;
    font-family: var(--hbs-font);
}

.hbs-cal-clear:hover,
.hbs-cal-close:hover {
    background: #fff3f3;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
    .hbs-form {
        flex-wrap: wrap;
        border-radius: 12px;
        padding: 6px;
        gap: 0;
    }

    .hbs-field {
        flex: 1 1 45%;
        border-radius: 8px;
        padding: 10px 14px;
    }

    .hbs-divider {
        display: none;
    }

    .hbs-search-btn {
        width: calc(100% - 12px);
        justify-content: center;
        margin: 4px 6px 6px;
    }

    .hbs-calendar-popup {
        min-width: 0;
        width: 100%;
        left: 0;
        right: 0;
    }

    .hbs-cal-body {
        flex-direction: column;
        padding: 12px 12px 6px;
    }

    .hbs-cal-sep {
        display: none;
    }

    .hbs-cal-months {
        gap: 40px;
    }
}

@media (max-width: 520px) {
    .hbs-field {
        flex: 1 1 100%;
    }

    .hbs-date-input,
    .hbs-select,
    .hbs-counter input[type="number"] {
        font-size: 14px;
    }
}
