/* Guesty direct-booking widgets — scoped under .gw-root */

.gw-root {
  --gw-accent: #2f5d50;
  --gw-accent-text: #ffffff;
  --gw-text: #222222;
  --gw-muted: #6b6b6b;
  --gw-border: #e2e2e2;
  --gw-bg: #ffffff;
  --gw-radius: 10px;
  --gw-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  color: var(--gw-text);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.45;
  box-sizing: border-box;
}
.gw-root *,
.gw-root *::before,
.gw-root *::after {
  box-sizing: inherit;
}
.gw-root button {
  font-family: inherit;
  cursor: pointer;
}

/* ---------- shared controls ---------- */

.gw-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.gw-field > label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gw-muted);
}
.gw-input,
.gw-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--gw-border);
  border-radius: calc(var(--gw-radius) - 4px);
  background: var(--gw-bg);
  color: var(--gw-text);
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  width: 100%;
  min-height: 44px;
}
.gw-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23666' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.gw-input:focus,
.gw-select:focus,
.gw-datebtn:focus {
  outline: 2px solid var(--gw-accent);
  outline-offset: 1px;
}
.gw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: calc(var(--gw-radius) - 4px);
  background: var(--gw-accent);
  color: var(--gw-accent-text);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 20px;
  min-height: 44px;
  text-decoration: none;
  transition: filter 0.15s ease;
}
.gw-btn:hover {
  filter: brightness(1.08);
}
.gw-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.gw-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  min-height: 44px;
  cursor: pointer;
  user-select: none;
}
.gw-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--gw-accent);
}

/* stepper */
.gw-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--gw-border);
  border-radius: calc(var(--gw-radius) - 4px);
  padding: 4px 8px;
  min-height: 44px;
  background: var(--gw-bg);
}
.gw-stepper button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--gw-border);
  background: var(--gw-bg);
  color: var(--gw-text);
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gw-stepper button:hover:not([disabled]) {
  border-color: var(--gw-accent);
  color: var(--gw-accent);
}
.gw-stepper button[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}
.gw-stepper .gw-stepper-val {
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}
.gw-stepper > span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gw-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid var(--gw-border);
  border-top-color: var(--gw-accent);
  border-radius: 50%;
  animation: gw-spin 0.8s linear infinite;
  margin: 24px auto;
}
@keyframes gw-spin {
  to { transform: rotate(360deg); }
}
.gw-error {
  background: #fdf1f1;
  border: 1px solid #eccfcf;
  color: #8d3a3a;
  border-radius: calc(var(--gw-radius) - 4px);
  padding: 10px 14px;
  font-size: 14px;
  margin-top: 12px;
}
.gw-empty {
  text-align: center;
  color: var(--gw-muted);
  padding: 40px 16px;
}

/* ---------- search widget ---------- */

.gw-search-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
  background: var(--gw-bg);
  border: 1px solid var(--gw-border);
  border-radius: var(--gw-radius);
  box-shadow: var(--gw-shadow);
  padding: 16px;
  margin-bottom: 24px;
}
.gw-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.gw-card {
  border: 1px solid var(--gw-border);
  border-radius: var(--gw-radius);
  overflow: hidden;
  background: var(--gw-bg);
  box-shadow: var(--gw-shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gw-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.gw-card-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #f0f0f0;
  overflow: hidden;
}
.gw-card-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gw-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--gw-text);
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 10px;
}
.gw-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.gw-card-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}
.gw-card-loc {
  color: var(--gw-muted);
  font-size: 14px;
}
.gw-card-specs {
  color: var(--gw-muted);
  font-size: 14px;
}
.gw-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  gap: 10px;
}
.gw-card-price {
  font-size: 15px;
}
.gw-card-price strong {
  font-size: 18px;
}
.gw-card-price span {
  color: var(--gw-muted);
  font-size: 13px;
}
.gw-card .gw-btn {
  padding: 10px 16px;
  min-height: 40px;
  font-size: 14px;
}

/* ---------- booking widget ---------- */

.gw-booking {
  border: 1px solid var(--gw-border);
  border-radius: var(--gw-radius);
  background: var(--gw-bg);
  box-shadow: var(--gw-shadow);
  padding: 20px;
  max-width: 420px;
}
.gw-booking-price {
  font-size: 15px;
  margin-bottom: 14px;
}
.gw-booking-price strong {
  font-size: 22px;
}
.gw-booking-price span {
  color: var(--gw-muted);
}
.gw-dates {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--gw-border);
  border-radius: calc(var(--gw-radius) - 4px);
  overflow: visible;
  margin-bottom: 12px;
}
.gw-datebtn {
  border: none;
  background: var(--gw-bg);
  text-align: left;
  padding: 8px 12px;
  min-height: 54px;
  border-radius: 0;
}
.gw-datebtn:first-child {
  border-right: 1px solid var(--gw-border);
  border-radius: calc(var(--gw-radius) - 5px) 0 0 calc(var(--gw-radius) - 5px);
}
.gw-datebtn:last-of-type {
  border-radius: 0 calc(var(--gw-radius) - 5px) calc(var(--gw-radius) - 5px) 0;
}
.gw-datebtn .gw-datebtn-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gw-muted);
}
.gw-datebtn .gw-datebtn-value {
  font-size: 15px;
  color: var(--gw-text);
}
.gw-datebtn .gw-datebtn-value.gw-placeholder {
  color: var(--gw-muted);
}
.gw-booking-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.gw-booking-row.gw-single {
  grid-template-columns: 1fr;
}

/* calendar popover */
.gw-cal {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 9999;
  background: var(--gw-bg);
  border: 1px solid var(--gw-border);
  border-radius: var(--gw-radius);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.16);
  padding: 14px;
  width: 320px;
  max-width: calc(100vw - 32px);
}
.gw-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.gw-cal-title {
  font-weight: 700;
  font-size: 15px;
}
.gw-cal-nav {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--gw-border);
  background: var(--gw-bg);
  color: var(--gw-text);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gw-cal-nav[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
}
.gw-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.gw-cal-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--gw-muted);
  padding: 4px 0;
}
.gw-cal-day {
  border: none;
  background: transparent;
  color: var(--gw-text);
  aspect-ratio: 1;
  border-radius: 50%;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.gw-cal-day:hover:not([disabled]):not(.gw-sel) {
  background: #f0f0f0;
}
.gw-cal-day[disabled] {
  color: #c6c6c6;
  cursor: not-allowed;
  text-decoration: line-through;
}
.gw-cal-day.gw-pad {
  visibility: hidden;
}
.gw-cal-day.gw-inrange {
  background: color-mix(in srgb, var(--gw-accent) 14%, transparent);
  border-radius: 0;
}
.gw-cal-day.gw-sel {
  background: var(--gw-accent);
  color: var(--gw-accent-text);
  font-weight: 700;
}
.gw-cal-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--gw-muted);
  text-align: center;
  min-height: 16px;
}
.gw-cal-clear {
  background: none;
  border: none;
  color: var(--gw-accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  padding: 4px;
}

/* quote breakdown */
.gw-quote {
  border-top: 1px solid var(--gw-border);
  margin-top: 16px;
  padding-top: 14px;
}
.gw-quote-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14.5px;
  padding: 3px 0;
}
.gw-quote-line span:first-child {
  color: var(--gw-muted);
}
.gw-quote-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 17px;
  border-top: 1px solid var(--gw-border);
  margin-top: 8px;
  padding-top: 10px;
}
.gw-quote-note {
  font-size: 12.5px;
  color: var(--gw-muted);
  text-align: center;
  margin-top: 10px;
}
.gw-booking .gw-btn.gw-wide {
  width: 100%;
  margin-top: 14px;
  font-size: 16px;
}

@media (max-width: 560px) {
  .gw-search-bar {
    grid-template-columns: 1fr 1fr;
  }
  .gw-search-bar .gw-search-submit {
    grid-column: 1 / -1;
  }
  .gw-booking {
    max-width: none;
  }
}
