/* Revital Booking Widget */
:root {
  --rbw-blue: #005b99;
  --rbw-blue-dark: #004a80;
  --rbw-blue-light: #e8f2fa;
  --rbw-green: #2a7a50;
  --rbw-green-light: #e0f0e8;
  --rbw-red: #c0392b;
  --rbw-red-light: #fde8e8;
  --rbw-border: #dde3ea;
  --rbw-bg: #f7f9fb;
  --rbw-text: #1a2030;
  --rbw-muted: #6b7a8d;
  --rbw-radius: 10px;
}

.rbw-root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 15px;
  color: var(--rbw-text);
  max-width: 600px;
  margin: 0 auto;
}

/* ── Step bar ── */
.rbw-steps {
  display: flex;
  margin-bottom: 20px;
  position: relative;
}
.rbw-steps::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--rbw-border);
  z-index: 0;
}
.rbw-step-item {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}
.rbw-step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  background: #fff;
  border: 2px solid var(--rbw-border);
  color: var(--rbw-muted);
  transition: all 0.2s;
}
.rbw-step-item.active .rbw-step-dot {
  background: var(--rbw-blue);
  border-color: var(--rbw-blue);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(0,91,153,.15);
}
.rbw-step-item.done .rbw-step-dot {
  background: var(--rbw-green);
  border-color: var(--rbw-green);
  color: #fff;
}
.rbw-step-label {
  font-size: 12px;
  color: var(--rbw-muted);
  font-weight: 500;
}
.rbw-step-item.active .rbw-step-label { color: var(--rbw-blue); font-weight: 600; }
.rbw-step-item.done .rbw-step-label { color: var(--rbw-green); }

/* ── Card ── */
.rbw-card {
  background: #fff;
  border: 1px solid var(--rbw-border);
  border-radius: var(--rbw-radius);
  padding: 28px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}

/* ── Form ── */
.rbw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.rbw-grid .rbw-full { grid-column: 1 / -1; }

.rbw-field { display: flex; flex-direction: column; gap: 5px; }
.rbw-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--rbw-muted);
  letter-spacing: .01em;
}
.rbw-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 13px;
  border: 1.5px solid var(--rbw-border);
  border-radius: 7px;
  font-size: 15px;
  color: var(--rbw-text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  -webkit-appearance: none;
}
.rbw-input:focus {
  border-color: var(--rbw-blue);
  box-shadow: 0 0 0 3px rgba(0,91,153,.12);
}
.rbw-input.error { border-color: var(--rbw-red); }
.rbw-hint { font-size: 12px; color: var(--rbw-muted); }

/* ── Room cards ── */
.rbw-rooms { display: flex; flex-direction: column; gap: 14px; }

.rbw-room-card {
  border: 2px solid var(--rbw-border);
  border-radius: var(--rbw-radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.rbw-room-card:hover {
  border-color: var(--rbw-blue);
  box-shadow: 0 4px 12px rgba(0,91,153,.12);
  transform: translateY(-1px);
}
.rbw-room-card.selected {
  border-color: var(--rbw-blue);
  box-shadow: 0 4px 12px rgba(0,91,153,.15);
}
.rbw-room-card.checking {
  border-color: var(--rbw-blue);
  opacity: .8;
}

/* Photo gallery */
.rbw-room-photos {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: #eef1f4;
}
.rbw-room-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s;
}
.rbw-room-photo.visible { opacity: 1; }

.rbw-photo-nav {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}
.rbw-photo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.6);
  cursor: pointer;
  transition: background 0.15s;
}
.rbw-photo-dot.active { background: #fff; }

.rbw-photo-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.85);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--rbw-text);
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 2;
}
.rbw-room-photos:hover .rbw-photo-btn { opacity: 1; }
.rbw-photo-btn-prev { left: 8px; }
.rbw-photo-btn-next { right: 8px; }

/* Room info */
.rbw-room-body { padding: 14px 16px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }

.rbw-room-info { flex: 1; min-width: 0; }
.rbw-room-name { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.rbw-room-desc { font-size: 13px; color: var(--rbw-muted); line-height: 1.5; margin-bottom: 8px; }
.rbw-room-features { display: flex; flex-wrap: wrap; gap: 6px; }
.rbw-room-feature {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: var(--rbw-muted);
  background: var(--rbw-bg);
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid var(--rbw-border);
}

.rbw-room-right { text-align: right; flex-shrink: 0; }
.rbw-room-price { font-size: 20px; font-weight: 800; color: var(--rbw-blue); }
.rbw-room-per-night { font-size: 12px; color: var(--rbw-muted); display: block; }

.rbw-selected-badge {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--rbw-blue);
  margin-top: 6px;
}
.rbw-room-card.selected .rbw-selected-badge { display: flex; }

/* Checking spinner overlay */
.rbw-room-checking {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.7);
  align-items: center;
  justify-content: center;
  border-radius: var(--rbw-radius);
}
.rbw-room-card.checking .rbw-room-checking { display: flex; }

/* ── Availability badge ── */
.rbw-avail {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
.rbw-avail.ok { background: var(--rbw-green-light); color: var(--rbw-green); }
.rbw-avail.no { background: var(--rbw-red-light); color: var(--rbw-red); }

/* ── Summary box ── */
.rbw-summary {
  background: var(--rbw-bg);
  border: 1px solid var(--rbw-border);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 22px;
}
.rbw-summary-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rbw-border);
}
.rbw-summary-thumb {
  width: 72px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--rbw-border);
}
.rbw-summary-room-name { font-weight: 700; font-size: 15px; }
.rbw-summary-room-meta { font-size: 13px; color: var(--rbw-muted); margin-top: 2px; }

.rbw-summary-rows { display: flex; flex-direction: column; gap: 6px; }
.rbw-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  line-height: 1.5;
}
.rbw-summary-row .lbl { color: var(--rbw-muted); }
.rbw-summary-row .val { font-weight: 500; }
.rbw-summary-divider { border: none; border-top: 1px solid var(--rbw-border); margin: 8px 0; }
.rbw-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
}
.rbw-summary-total .amount { color: var(--rbw-blue); font-size: 20px; }

/* ── Buttons ── */
.rbw-btn-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

.rbw-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border: none;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  white-space: nowrap;
}
.rbw-btn:active { transform: translateY(1px); }

.rbw-btn-primary {
  background: var(--rbw-blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,91,153,.25);
}
.rbw-btn-primary:hover { background: var(--rbw-blue-dark); box-shadow: 0 4px 12px rgba(0,91,153,.3); }
.rbw-btn-primary:disabled { background: #aac5dc; box-shadow: none; cursor: not-allowed; transform: none; }

.rbw-btn-secondary { background: var(--rbw-bg); color: var(--rbw-text); border: 1.5px solid var(--rbw-border); }
.rbw-btn-secondary:hover { background: #edf0f3; }

/* ── Alert ── */
.rbw-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 7px;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.rbw-alert.error { background: var(--rbw-red-light); color: var(--rbw-red); border: 1px solid #f5bcbc; }
.rbw-alert.info { background: var(--rbw-blue-light); color: var(--rbw-blue); border: 1px solid #c0d8ec; }

/* ── Spinner ── */
.rbw-spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rbw-spin 0.6s linear infinite;
  flex-shrink: 0;
}
.rbw-spinner-dark {
  border-color: rgba(0,91,153,.2);
  border-top-color: var(--rbw-blue);
}
@keyframes rbw-spin { to { transform: rotate(360deg); } }

/* ── Success ── */
.rbw-success {
  text-align: center;
  padding: 24px 16px 16px;
}
.rbw-success-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--rbw-green-light);
  color: var(--rbw-green);
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.rbw-success-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.rbw-success-sub { color: var(--rbw-muted); font-size: 14px; margin-bottom: 20px; line-height: 1.6; }
.rbw-success-ref {
  display: inline-block;
  background: var(--rbw-bg);
  border: 1px solid var(--rbw-border);
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 13px;
  color: var(--rbw-muted);
}
.rbw-success-ref strong { color: var(--rbw-text); font-size: 15px; display: block; margin-top: 2px; }

/* ── Section title ── */
.rbw-section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--rbw-text);
}

/* ── Loading state ── */
.rbw-loading-rooms {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 32px 0;
  justify-content: center;
  color: var(--rbw-muted);
  font-size: 14px;
}

/* ── Responsive ── */
@media (max-width: 500px) {
  .rbw-card { padding: 20px 16px; }
  .rbw-grid { grid-template-columns: 1fr; }
  .rbw-grid .rbw-full { grid-column: 1; }
  .rbw-room-photos { height: 160px; }
  .rbw-summary-thumb { width: 56px; height: 44px; }
  .rbw-btn-row { flex-direction: column-reverse; }
  .rbw-btn { justify-content: center; }
}
