/* ===== RWM SELECT SYSTEM ===== */

.ts-wrapper {
    width: 100%;
    position: relative;
    font-family: inherit;
}

.ts-control {
    width: 100%;
    min-height: 45px;
    padding: 8px 48px 8px 18px;
    border-radius: 16px;
    border: 1px solid #e4d8c3;
    background: #fffaf2;
    color: #1f2937;
    font-size: 13px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.ts-control::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #7a5a12;
    pointer-events: none;
}

/* Hover */
.ts-control:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* Focus ring */
.ts-wrapper.focus .ts-control {
    border-color: #c9a24a;
    box-shadow: 0 0 0 4px rgba(201,162,74,0.25);
}

/* Dropdown */
.ts-dropdown {
    position: absolute;
    margin-top: 8px;
    border-radius: 16px;
    border: 1px solid #e4d8c3;
    background: white;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    overflow: hidden;
    z-index: 9999;
    animation: fadeDown 0.2s ease forwards;
}

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

/* Dropdown items */
.ts-dropdown .option {
    padding: 14px 18px;
    cursor: pointer;
    color: #1f2937;
    transition: background 0.2s ease;
}

.ts-dropdown .option:hover,
.ts-dropdown .active {
    background: #f0e6d3;
    color: #1f2937;
}

.ts-dropdown .option.selected {
    background: #e7dcc7;
    color: #1f2937;
}

.searchable-select .ts-control input {
    min-width: 150px;
    color: #1f2937;
    font: inherit;
}

.searchable-select .ts-control input::placeholder {
    color: #7b8492;
}

/* Page form styles must not resize the native control hidden by Tom Select.
   Clipping alone does not prevent an absolute control from widening the page. */
select.ts-hidden-accessible {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px !important;
    min-height: 0 !important;
    min-width: 0 !important;
    max-width: 1px !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px !important;
}

/* ===== REMOVE DOUBLE FIELD EFFECT ===== */

.booking-input.ts-wrapper {
    border: 1px solid #e6dccb;
    background: #fffaf0;
    border-radius: 14px;
    box-shadow: none;
    padding: 0;
}

.booking-input .ts-control {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 12px 44px 12px 16px;
    min-height: auto;
    background-image: none;
}

/* keep dropdown normal */
.booking-input .ts-dropdown {
    margin-top: 8px;
}

/* ===== SITE-WIDE DARK SELECT THEME ===== */

body select:not(.ts-hidden-accessible) {
    color-scheme: dark;
    border-color: rgba(214, 170, 56, 0.28) !important;
    background-color: #191d13 !important;
    color: #f5efe2 !important;
}

body select:not(.ts-hidden-accessible) option,
body select:not(.ts-hidden-accessible) optgroup {
    background: #151a10 !important;
    color: #f5efe2 !important;
}

body .ts-wrapper,
body .booking-input.ts-wrapper {
    border-color: rgba(214, 170, 56, 0.28) !important;
    background: #191d13 !important;
}

body .ts-control,
body .ts-wrapper.single .ts-control,
body .booking-input .ts-control {
    border-color: rgba(214, 170, 56, 0.28) !important;
    background: #191d13 !important;
    background-image: none !important;
    color: #f5efe2 !important;
    box-shadow: none !important;
}

body .ts-control > .item,
body .ts-control input,
body .searchable-select .ts-control input {
    color: #f5efe2 !important;
}

body .ts-control input::placeholder,
body .searchable-select .ts-control input::placeholder {
    color: rgba(245, 239, 226, 0.5) !important;
}

body .ts-control::after,
body .ts-wrapper.single .ts-control::after {
    border-top-color: #d8aa32 !important;
}

body .ts-control:hover {
    border-color: rgba(224, 180, 57, 0.55) !important;
    background: #1d2216 !important;
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.2) !important;
}

body .ts-wrapper.focus .ts-control,
body .ts-wrapper.dropdown-active .ts-control {
    border-color: #d8aa32 !important;
    background: #1b2015 !important;
    box-shadow: 0 0 0 3px rgba(216, 170, 50, 0.14) !important;
}

body .ts-dropdown,
body .ts-wrapper .ts-dropdown {
    border: 1px solid rgba(214, 170, 56, 0.38) !important;
    border-radius: 10px !important;
    background: #11170e !important;
    color: #f5efe2 !important;
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.48) !important;
}

body .ts-dropdown .dropdown-input-wrap {
    border-bottom: 1px solid rgba(214, 170, 56, 0.2) !important;
    background: #11170e !important;
}

body .ts-dropdown .dropdown-input {
    border-color: rgba(214, 170, 56, 0.25) !important;
    background: #1a2015 !important;
    color: #f5efe2 !important;
}

body .ts-dropdown .option,
body .ts-dropdown [data-selectable] {
    background: #11170e !important;
    color: rgba(245, 239, 226, 0.86) !important;
}

body .ts-dropdown .option:hover,
body .ts-dropdown .option.active,
body .ts-dropdown .active {
    background: #252817 !important;
    color: #ffffff !important;
}

body .ts-dropdown .option.selected,
body .ts-dropdown .selected {
    background: rgba(202, 161, 45, 0.22) !important;
    color: #f5cf67 !important;
}

body .ts-dropdown .no-results,
body .ts-dropdown .create {
    background: #11170e !important;
    color: rgba(245, 239, 226, 0.62) !important;
}
