/* TBM Form — matches travel.p-pgroup.com/stay-booking-form.html exactly */

/* ── Wrapper ── */
.tbm-form-outer {
  background: #f0f4f8;
  padding: 24px 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
  color: #1a2b3c;
}

/* ── Form card ── */
.tbm-form-card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #dce6f0;
  max-width: 680px;
  margin: 0 auto;
  overflow: hidden;
}

/* ── Tab header (blue pill like "Stay Booking Request") ── */
.tbm-form-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1a3d6e;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 0;
  margin: 0;
}

/* ── Spam notice bar ── */
.tbm-spam-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0faf4;
  border: 1px solid #b8e6cc;
  border-radius: 6px;
  padding: 9px 14px;
  font-size: 13px;
  color: #27614a;
  margin: 16px 20px 0;
}
.tbm-spam-notice::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #2ecc71;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Form body ── */
.tbm-form-body {
  padding: 0 20px 24px;
}

/* ── Section header — teal/blue uppercase with gold underline ── */
.tbm-section-head {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #1a5276;
  margin: 22px 0 14px;
  padding-bottom: 0;
}
.tbm-section-head::after {
  content: '';
  flex: 1;
  height: 2px;
  background: #c9a02a;
  margin-left: 10px;
  border-radius: 1px;
}

/* ── Grid rows ── */
.tbm-row {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}
.tbm-row-2 { grid-template-columns: 1fr 1fr; }
.tbm-row-3 { grid-template-columns: 1fr 1fr auto; }
.tbm-row-1 { grid-template-columns: 1fr; }

/* ── Field wrapper ── */
.tbm-f { margin-bottom: 0; }

/* ── Labels ── */
.tbm-f > label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: #4a5568;
  margin-bottom: 6px;
}
.tbm-f > label .req { color: #e53935; font-size: 12px; }
.tbm-f > label .tbm-info {
  width: 15px;
  height: 15px;
  border: 1.5px solid #aac0d6;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #7a92a8;
  cursor: help;
  font-weight: 700;
  font-style: normal;
}

/* ── Inputs, selects, textareas ── */
.tbm-f input[type=text],
.tbm-f input[type=email],
.tbm-f input[type=tel],
.tbm-f input[type=number],
.tbm-f input[type=date],
.tbm-f input[type=time],
.tbm-f input[type=url],
.tbm-f select,
.tbm-f textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccd8e4;
  border-radius: 6px;
  font-size: 14px;
  color: #1a2b3c;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.tbm-f input:focus,
.tbm-f select:focus,
.tbm-f textarea:focus {
  border-color: #1a5276;
  outline: none;
  box-shadow: 0 0 0 3px rgba(26,82,118,.1);
}
.tbm-f input.tbm-error,
.tbm-f select.tbm-error { border-color: #e53935; }
.tbm-f .tbm-err-msg { font-size: 11px; color: #e53935; margin-top: 4px; }
.tbm-f textarea { resize: vertical; min-height: 80px; }
.tbm-f select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M6 8L0 0h12z' fill='%234a5568'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }

/* ── Hotel autocomplete field ── */
.tbm-hotel-wrap { position: relative; }
.tbm-hotel-wrap .tbm-hotel-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #7a92a8;
  font-size: 14px;
  pointer-events: none;
}
.tbm-hotel-wrap input {
  padding-left: 32px !important;
}
.tbm-hotel-hint {
  font-size: 11px;
  color: #7a92a8;
  margin-top: 5px;
  line-height: 1.5;
}
.tbm-ac-list {
  position: absolute;
  top: calc(100% + 3px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid #ccd8e4;
  border-radius: 7px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
.tbm-ac-list.open { display: block; }
.tbm-ac-item {
  padding: 9px 13px;
  font-size: 13px;
  color: #1a2b3c;
  cursor: pointer;
  border-bottom: 1px solid #f0f4f8;
  line-height: 1.4;
}
.tbm-ac-item:last-child { border-bottom: none; }
.tbm-ac-item:hover { background: #f0f4f8; }
.tbm-ac-item .ac-name { font-weight: 600; }
.tbm-ac-item .ac-addr { font-size: 11px; color: #7a92a8; display: block; margin-top: 1px; }
.tbm-ac-empty { padding: 10px 13px; font-size: 13px; color: #7a92a8; }

/* ── Date picker row with nights pill ── */
.tbm-dates-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}
.tbm-nights-pill {
  background: #1a3d6e;
  color: #fff;
  border-radius: 7px;
  padding: 10px 14px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  min-width: 60px;
  line-height: 1.3;
}
.tbm-nights-pill .nights-num {
  display: block;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 2px;
}

/* ── Counter (rooms, guests) ── */
.tbm-counter {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  border: 1px solid #ccd8e4;
  border-radius: 6px;
  overflow: hidden;
  height: 40px;
}
.tbm-cnt-btn {
  background: #1a3d6e;
  color: #fff;
  border: none;
  font-size: 20px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .1s;
  padding: 0;
  line-height: 1;
}
.tbm-cnt-btn:hover { background: #1a5276; }
.tbm-cnt-val {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #1a2b3c;
  border-left: 1px solid #ccd8e4;
  border-right: 1px solid #ccd8e4;
  background: #fff;
}

/* ── Phone row ── */
.tbm-phone-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px;
}
.tbm-phone-hint { font-size: 11px; color: #7a92a8; margin-top: 4px; }

/* ── Math captcha ── */
.tbm-math-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f7fafc;
  border: 1px solid #ccd8e4;
  border-radius: 6px;
  padding: 10px 14px;
}
.tbm-math-eq {
  font-size: 15px;
  font-weight: 700;
  color: #1a3d6e;
  letter-spacing: .5px;
  white-space: nowrap;
}
.tbm-math-equals { color: #7a92a8; font-size: 14px; }
.tbm-math-row input {
  width: 70px !important;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
}
.tbm-math-refresh {
  background: none;
  border: none;
  color: #7a92a8;
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
  flex-shrink: 0;
}
.tbm-math-hint { font-size: 11px; color: #7a92a8; }

/* ── Submit button — YELLOW ── */
.tbm-submit {
  width: 100%;
  padding: 15px;
  background: #d4a017;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s, transform .1s;
}
.tbm-submit:hover { background: #b8890f; }
.tbm-submit:active { transform: scale(.99); }
.tbm-submit:disabled { opacity: .6; cursor: not-allowed; }
.tbm-submit::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M2 21L23 12 2 3v7l15 2-15 2z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* ── Messages ── */
.tbm-success-box {
  text-align: center;
  padding: 36px 20px;
}
.tbm-success-icon {
  width: 60px;
  height: 60px;
  background: #eafaf1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 28px;
  color: #27ae60;
}
.tbm-success-box h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1a2b3c;
  margin: 0 0 8px;
}
.tbm-success-box p {
  font-size: 14px;
  color: #6b7a8d;
  margin: 0;
  line-height: 1.6;
}
.tbm-error-bar {
  background: #fde8e8;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: #c0392b;
  margin-top: 10px;
  display: none;
}

/* ── Floating trigger ── */
.tbm-float-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #d4a017;
  color: #fff;
  padding: 13px 26px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  letter-spacing: .2px;
  transition: background .15s;
}
.tbm-float-btn:hover { background: #b8890f; }

/* ── Modal overlay ── */
.tbm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,30,60,.6);
  z-index: 9999;
  overflow-y: auto;
  padding: 30px 16px;
}
.tbm-overlay.open { display: block; }
.tbm-modal {
  background: #fff;
  border-radius: 10px;
  max-width: 640px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

/* ── Modal header ── */
.tbm-modal-head {
  background: #0b2545;
  padding: 20px 24px 16px;
}
.tbm-modal-head h2 {
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  margin: 0 32px 3px 0;
}
.tbm-modal-head p {
  color: rgba(255,255,255,.6);
  font-size: 13px;
  margin: 0;
}
.tbm-modal-head::after {
  content: '';
  display: block;
  height: 3px;
  background: #c9a02a;
  margin: 14px -24px -16px;
}
.tbm-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  background: rgba(255,255,255,.15);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tbm-modal-close:hover { background: rgba(255,255,255,.25); }
.tbm-modal-body { padding: 20px 24px 28px; }

/* ── Consent text ── */
.tbm-consent-txt {
  font-size: 12px;
  color: #8a9bb0;
  line-height: 1.6;
  margin-top: 14px;
  text-align: center;
}
.tbm-consent-txt a { color: #1a5276; }

/* ── Step indicator (multi-step) ── */
.tbm-steps {
  display: flex;
  border: 1px solid #ccd8e4;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 20px;
}
.tbm-step {
  flex: 1;
  padding: 9px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #7a92a8;
  background: #f7fafc;
  border-right: 1px solid #ccd8e4;
}
.tbm-step:last-child { border-right: none; }
.tbm-step.active { background: #1a3d6e; color: #fff; }
.tbm-step.done { background: #eafaf1; color: #27614a; }

/* ── Responsive ── */
@media (max-width: 540px) {
  .tbm-row-2, .tbm-row-3 { grid-template-columns: 1fr; }
  .tbm-dates-row { grid-template-columns: 1fr 1fr; }
  .tbm-dates-row .tbm-nights-pill { grid-column: 1/-1; display: flex; align-items: center; justify-content: center; gap: 8px; }
  .tbm-dates-row .tbm-nights-pill .nights-num { display: inline; font-size: 16px; }
  .tbm-phone-row { grid-template-columns: 130px 1fr; }
}

/* ── Mobile-first improvements ── */
@media (max-width: 640px) {
  .tbm-form-card { border-radius: 0; border-left: none; border-right: none; }
  .tbm-form-body { padding: 16px 14px 20px; }
  .tbm-modal { border-radius: 0; min-height: 100vh; }
  .tbm-overlay { padding: 0; align-items: flex-end; }
  .tbm-modal-head { padding: 16px 16px 14px; }
  .tbm-modal-body { padding: 16px 14px 20px; }
  .tbm-dates-row { grid-template-columns: 1fr 1fr; }
  .tbm-dates-row .tbm-nights-pill { grid-column: 1/-1; flex-direction: row; gap: 8px; }
  .tbm-dates-row .tbm-nights-pill .nights-num { display: inline; font-size: 16px; }
  .tbm-phone-row { grid-template-columns: 120px 1fr; }
  .tbm-section-head { font-size: 10px; }
  .tbm-f > label { font-size: 10px; }
  .tbm-f input, .tbm-f select, .tbm-f textarea { font-size: 16px !important; } /* prevent iOS zoom */
  .tbm-submit { font-size: 15px; padding: 13px; }
  .tbm-spam-notice { font-size: 12px; margin: 10px 12px 0; }
  .tbm-chips { gap: 5px; }
  .tbm-chip { padding: 5px 11px; font-size: 12px; }
}

@media (max-width: 400px) {
  .tbm-dates-row { grid-template-columns: 1fr; }
  .tbm-dates-row .tbm-nights-pill { grid-column: auto; }
}
