/**
 * Tourify Reservation Search Widget (search-widget-two.css)
 * Styled after the dark luxury reservation card reference.
 */

/* Container Card */
.cb-res-widget {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    background: linear-gradient(160deg, #10211a 0%, #0a1611 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 26px;
    padding: 32px 24px;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    color: #ffffff;
    box-sizing: border-box;
    font-family: inherit;
    overflow: hidden;
}

@media (min-width: 640px) {
    .cb-res-widget {
        padding: 36px 30px;
    }
}

/* Background ambient light glow */
.cb-res-widget::before {
    content: "";
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 120px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, rgba(16, 33, 26, 0) 70%);
    pointer-events: none;
}

/* Header */
.cb-res-header {
    text-align: center;
    margin-bottom: 22px;
    position: relative;
    z-index: 1;
}

.cb-res-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-secondary, #f59e0b);
    margin-bottom: 8px;
}

.cb-res-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.01em;
}

@media (min-width: 640px) {
    .cb-res-title {
        font-size: 28px;
    }
}

/* Form Layout */
.cb-res-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
}

/* Individual Field Pill */
.cb-res-field {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 14px;
    padding: 10px 14px;
    min-height: 48px;
    box-sizing: border-box;
    transition: all 0.22s ease-in-out;
}

.cb-res-field:hover,
.cb-res-field:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(245, 158, 11, 0.55);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
}

/* Field Labels */
.cb-res-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    cursor: pointer;
}

.cb-res-label svg {
    width: 15px;
    height: 15px;
    color: rgba(255, 255, 255, 0.6);
}

/* Input / Select Controls */
.cb-res-control-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-grow: 1;
    min-width: 0;
}

.cb-res-select,
.cb-res-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
    text-align: right;
    cursor: pointer;
    padding: 4px 0;
    width: 100%;
    max-width: 100%;
}

.cb-res-select option {
    background-color: #122119;
    color: #ffffff;
    padding: 8px 12px;
}

/* Trailing arrow chevron for dropdowns */
.cb-res-chevron {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    pointer-events: none;
    color: rgba(255, 255, 255, 0.7);
    transition: transform 0.2s ease;
}

.cb-res-field:focus-within .cb-res-chevron {
    transform: rotate(180deg);
    color: var(--color-secondary, #f59e0b);
}

/* Date input styling with flatpickr */
.cb-res-date-input {
    cursor: pointer;
    text-align: right;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
}

.cb-res-date-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
    font-weight: 400;
}

.cb-res-cal-icon {
    width: 15px;
    height: 15px;
    color: rgba(255, 255, 255, 0.65);
    flex-shrink: 0;
    pointer-events: none;
}

/* Two Columns Row (for Guests: Adults & Children) */
.cb-res-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.cb-res-row-2col .cb-res-field {
    padding: 10px 12px;
}

.cb-res-row-2col .cb-res-label {
    font-size: 12.5px;
}

.cb-res-row-2col .cb-res-select {
    font-size: 13px;
}

/* Submit Action Button */
.cb-res-submit-wrap {
    margin-top: 6px;
}

.cb-res-submit {
    position: relative;
    width: 100%;
    padding: 14px 22px;
    background: linear-gradient(135deg, var(--color-secondary, #f59e0b) 0%, #d97706 100%);
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 22px -3px rgba(245, 158, 11, 0.45);
    transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    box-sizing: border-box;
}

.cb-res-submit:hover {
    background: linear-gradient(135deg, #fbbf24 0%, var(--color-secondary, #f59e0b) 100%);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -3px rgba(245, 158, 11, 0.55);
}

.cb-res-submit:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px -2px rgba(245, 158, 11, 0.45);
}

.cb-res-submit-arrow {
    display: inline-block;
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.cb-res-submit:hover .cb-res-submit-arrow {
    transform: translateX(4px);
}

/* Flatpickr Theme Customization for Widget */
.flatpickr-calendar.cb-res-flatpickr {
    background: #112019 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 16px !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6) !important;
    color: #ffffff !important;
    font-family: inherit !important;
}

.flatpickr-calendar.cb-res-flatpickr .flatpickr-months {
    background: #0d1a14 !important;
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
    color: #ffffff !important;
    padding: 6px 0 !important;
}

.flatpickr-calendar.cb-res-flatpickr .flatpickr-month {
    color: #ffffff !important;
    fill: #ffffff !important;
}

.flatpickr-calendar.cb-res-flatpickr .flatpickr-current-month .cur-month {
    font-weight: 700 !important;
    color: #ffffff !important;
}

.flatpickr-calendar.cb-res-flatpickr .flatpickr-weekday {
    color: var(--color-secondary, #f59e0b) !important;
    font-weight: 600 !important;
    font-size: 11px !important;
}

.flatpickr-calendar.cb-res-flatpickr .flatpickr-day {
    color: #ffffff !important;
    border-radius: 8px !important;
    border: 1px solid transparent !important;
}

.flatpickr-calendar.cb-res-flatpickr .flatpickr-day:hover {
    background: rgba(255, 255, 255, 0.12) !important;
}

.flatpickr-calendar.cb-res-flatpickr .flatpickr-day.selected {
    background: var(--color-secondary, #f59e0b) !important;
    border-color: var(--color-secondary, #f59e0b) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

.flatpickr-calendar.cb-res-flatpickr .flatpickr-day.flatpickr-disabled,
.flatpickr-calendar.cb-res-flatpickr .flatpickr-day.flatpickr-disabled:hover {
    color: rgba(255, 255, 255, 0.2) !important;
}

.flatpickr-calendar.cb-res-flatpickr.arrowTop:before,
.flatpickr-calendar.cb-res-flatpickr.arrowTop:after {
    border-bottom-color: #0d1a14 !important;
}

.flatpickr-months .flatpickr-next-month {
    color: #ffffff !important;
    fill: #ffffff !important;
}

.flatpickr-months .flatpickr-next-month:hover svg {
    color: var(--color-secondary, #f59e0b) !important;
    fill: var(--color-secondary, #f59e0b) !important;
}