/* ═══════════════════════════════════════════════════════
   BOOKING FORM COMPONENTS — custom-select.css
   Loaded only by index.html. Keeps style.css clean.
   ═══════════════════════════════════════════════════════ */

/* ── Hidden native <select> ── */
.book-form .cs-native { display: none !important; }

/* ── Custom select wrapper ── */
.custom-select { position: relative; display: block; }

.cs-btn {
  width: 100%; padding: 14px 44px 14px 18px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #ffffff;
  font-family: 'DM Sans', sans-serif; font-size: .9rem; font-weight: 300;
  text-align: left; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  outline: none;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.cs-btn:hover { border-color: rgba(255,255,255,0.35); background-color: rgba(255,255,255,0.09); }
.custom-select.cs-open .cs-btn,
.cs-btn:focus {
  border-color: rgba(212,189,120,0.6);
  box-shadow: 0 0 0 3px rgba(212,189,120,0.15);
}
.cs-val { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-val.cs-empty { color: rgba(255,255,255,0.32); }

.cs-arrow { width: 12px; height: 8px; flex-shrink: 0; transition: transform .25s cubic-bezier(.4,0,.2,1); }
.custom-select.cs-open .cs-arrow { transform: rotate(180deg); }

/* ── Options list ── */
.cs-list {
  display: none; position: absolute;
  top: calc(100% + 6px); left: 0; right: 0;
  background: #252523;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px; padding: 6px;
  margin: 0; list-style: none;
  z-index: 9999;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55);
  max-height: 224px; overflow-y: auto;
  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}
/* WebKit */
.cs-list::-webkit-scrollbar { width: 4px; }
.cs-list::-webkit-scrollbar-track { background: transparent; }
.cs-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 99px; }
.cs-list::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.35); }

.custom-select.cs-open .cs-list { display: block; }

.cs-option {
  padding: 10px 14px; border-radius: 8px; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: .9rem; font-weight: 300;
  color: #ffffff; transition: background .15s, color .15s;
}
.cs-option:hover { background: rgba(255,255,255,0.08); }
.cs-option.cs-selected { color: #D4BD78; }
.cs-option.cs-ph { color: rgba(255,255,255,0.32); font-style: italic; }

/* ── Field validation error state ── */
.field-error {
  border-color: rgba(220,80,80,0.75) !important;
  box-shadow: 0 0 0 3px rgba(220,80,80,0.14) !important;
}

/* ── Character counter (notes textarea) ── */
.char-counter {
  text-align: right;
  font-size: .75rem;
  color: rgba(255,255,255,0.3);
  margin-top: 5px;
  transition: color .2s;
  font-family: 'DM Sans', sans-serif;
}
.char-counter.near-limit { color: rgba(220,130,80,0.85); }
.char-counter.at-limit    { color: rgba(220,80,80,0.9);  }

/* ── Address autocomplete list ── */
.addr-wrap { position: relative; }
.addr-list {
  display: none; position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  background: #252523;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px; padding: 6px;
  list-style: none; margin: 0;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  max-height: 200px; overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}
.addr-list::-webkit-scrollbar { width: 4px; }
.addr-list::-webkit-scrollbar-track { background: transparent; }
.addr-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 99px; }
.addr-list.visible { display: block; }
.addr-option {
  padding: 10px 14px; border-radius: 7px; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: .85rem; font-weight: 300;
  color: #ffffff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background .15s;
}
.addr-option:hover { background: rgba(255,255,255,0.08); }
.addr-spinner {
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif; font-size: .82rem;
  color: rgba(255,255,255,0.38); font-style: italic;
}

/* ═══════════════════════════════════════════════════════
   MOBILE — clamp dropdown lists to viewport width so they
   never trigger horizontal page scroll. Long options wrap.
═══════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .cs-list,
  .addr-list {
    max-width: calc(100vw - 24px);
  }
  .cs-option,
  .addr-option {
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4;
  }
  .cs-btn { padding: 12px 40px 12px 16px; font-size: .88rem; }
}
