/* BWD Booking — guest reviews. Themes can override the variables below. */
.bwdb-reviews, .bwdb-rating-badge {
  --bwdb-primary: #0E7C86;
  --bwdb-primary-soft: #E6F3F4;
  --bwdb-accent: #F2784B;
  --bwdb-accent-dark: #D96135;
  --bwdb-star: #F5A524;
  --bwdb-text: #1C2B2D;
  --bwdb-muted: #53676A;
  --bwdb-line: #E2DBD0;
  --bwdb-bg: #FFFFFF;
  --bwdb-soft: #F7F3EC;
  --bwdb-radius: 14px;
}
.bwdb-reviews { color: var(--bwdb-text); }
.bwdb-reviews .bwdb-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.4rem; border: 0; border-radius: 999px; background: var(--bwdb-accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: background .2s, transform .2s; }
.bwdb-reviews .bwdb-btn:hover:not(:disabled) { background: var(--bwdb-accent-dark); transform: translateY(-1px); color: #fff; }
.bwdb-reviews .bwdb-btn:disabled { opacity: .55; cursor: progress; }
.bwdb-reviews .bwdb-btn-ghost { background: transparent; color: var(--bwdb-primary); border: 2px solid var(--bwdb-primary); }
.bwdb-reviews .bwdb-btn-ghost:hover:not(:disabled) { background: var(--bwdb-primary); color: #fff; }

/* Stars: grey track with a gold fill clipped to the rating. */
.bwdb-stars { position: relative; display: inline-block; width: max-content; justify-self: start; font-size: 1.05em; line-height: 1; letter-spacing: 2px; color: #D9D2C5; vertical-align: -.1em; }
.bwdb-stars::before { content: "★★★★★"; }
.bwdb-stars-fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; white-space: nowrap; color: var(--bwdb-star); }
.bwdb-stars-fill::before { content: "★★★★★"; }

.bwdb-rating-badge { display: inline-flex; align-items: center; gap: .4rem; color: inherit; text-decoration: none; font-size: .95rem; }
.bwdb-rating-badge:hover strong { text-decoration: underline; }

/* Summary */
.bwdb-reviews-summary { display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem 2.5rem; align-items: center; padding: 1.5rem; background: var(--bwdb-bg); border: 1px solid var(--bwdb-line); border-radius: var(--bwdb-radius); }
.bwdb-reviews-score { display: grid; justify-items: center; gap: .35rem; text-align: center; }
.bwdb-reviews-avg { font-size: 3rem; font-weight: 800; line-height: 1; }
.bwdb-reviews-score .bwdb-stars { font-size: 1.25rem; }
.bwdb-reviews-count { color: var(--bwdb-muted); font-size: .9rem; }
.bwdb-reviews-dist { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-size: .9rem; }
.bwdb-reviews-dist li { display: grid; grid-template-columns: 2.2em 1fr 2em; gap: .6rem; align-items: center; }
.bwdb-reviews-dist li > span:last-child { color: var(--bwdb-muted); text-align: right; }
.bwdb-bar { height: 8px; border-radius: 99px; background: var(--bwdb-soft); overflow: hidden; }
.bwdb-bar > span { display: block; height: 100%; background: var(--bwdb-star); border-radius: inherit; }

.bwdb-reviews-empty { text-align: center; padding: 2rem 1.5rem; background: var(--bwdb-bg); border: 1px dashed var(--bwdb-line); border-radius: var(--bwdb-radius); }
.bwdb-reviews-empty p { margin: 0 0 1rem; color: var(--bwdb-muted); }

/* Photos */
.bwdb-reviews-gallery { display: flex; gap: .5rem; overflow-x: auto; margin: 1.25rem 0 0; padding-bottom: .25rem; scroll-snap-type: x proximity; }
.bwdb-reviews-gallery .bwdb-photo { flex: 0 0 96px; scroll-snap-align: start; }
.bwdb-photo { display: block; border-radius: 10px; overflow: hidden; background: var(--bwdb-soft); aspect-ratio: 1; }
.bwdb-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.bwdb-photo:hover img { transform: scale(1.05); }

.bwdb-reviews-tools { display: flex; justify-content: flex-end; margin: 1.25rem 0 0; font-size: .9rem; }
.bwdb-reviews-tools select { margin-left: .4rem; padding: .35rem .6rem; border: 1px solid var(--bwdb-line); border-radius: 8px; background: var(--bwdb-bg); font: inherit; }

/* Cards */
.bwdb-reviews-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.bwdb-review { display: flex; flex-direction: column; gap: .7rem; padding: 1.25rem; background: var(--bwdb-bg); border: 1px solid var(--bwdb-line); border-radius: var(--bwdb-radius); }
.bwdb-review header { display: grid; gap: .35rem; }
.bwdb-review-title { margin: 0; font-size: 1.05rem; line-height: 1.35; }
.bwdb-review-body p { margin: 0 0 .6em; line-height: 1.6; }
.bwdb-review-body p:last-child { margin-bottom: 0; }
.bwdb-review-body.is-clamped { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.bwdb-readmore { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--bwdb-primary); font: inherit; font-weight: 600; cursor: pointer; }
.bwdb-review-photos { display: flex; flex-wrap: wrap; gap: .4rem; }
.bwdb-review-photos .bwdb-photo { width: 72px; }
.bwdb-review-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; margin-top: auto; padding-top: .6rem; border-top: 1px solid var(--bwdb-line); font-size: .88rem; }
.bwdb-review-author { font-weight: 700; }
.bwdb-review-verified { color: var(--bwdb-primary); font-weight: 600; }
.bwdb-review-verified::before { content: "✔ "; }
.bwdb-review-sub { flex-basis: 100%; color: var(--bwdb-muted); }
.bwdb-review-reply { padding: .8rem 1rem; background: var(--bwdb-primary-soft); border-radius: 10px; font-size: .92rem; }
.bwdb-review-reply p { margin: .3rem 0 0; }
.bwdb-reviews-more-wrap { text-align: center; margin: 1.5rem 0 0; }

/* Form */
.bwdb-review-form, .bwdb-review-thanks { margin-top: 1.5rem; padding: 1.5rem; background: var(--bwdb-bg); border: 1px solid var(--bwdb-line); border-radius: var(--bwdb-radius); }
.bwdb-review-form h3, .bwdb-review-thanks h3 { margin: 0 0 1rem; }
.bwdb-review-thanks p { margin: 0; }
.bwdb-review-verified-note { margin: -.5rem 0 1rem; color: var(--bwdb-primary); font-weight: 600; }
.bwdb-field { display: grid; gap: .3rem; margin: 0 0 1rem; border: 0; padding: 0; min-width: 0; }
.bwdb-field > span, .bwdb-field legend { font-weight: 600; font-size: .92rem; padding: 0; }
.bwdb-field input[type="text"], .bwdb-field input[type="email"], .bwdb-field select, .bwdb-field textarea { width: 100%; padding: .7rem .8rem; border: 1px solid var(--bwdb-line); border-radius: 10px; background: #fff; font: inherit; font-size: 16px; color: inherit; box-sizing: border-box; }
.bwdb-field textarea { resize: vertical; min-height: 7rem; }
.bwdb-field input:focus, .bwdb-field select:focus, .bwdb-field textarea:focus { outline: 2px solid var(--bwdb-primary); outline-offset: 1px; border-color: transparent; }
.bwdb-field small, .bwdb-review-note { color: var(--bwdb-muted); font-size: .82rem; }
.bwdb-counter { justify-self: end; }
.bwdb-field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 1rem; }
.bwdb-error { color: #B42318; font-size: .85rem; }
.bwdb-error:empty { display: none; }
.bwdb-field.has-error input, .bwdb-field.has-error textarea { border-color: #B42318; }

/* Star input: reversed order so ":hover ~ label" fills the stars to the left. */
.bwdb-rating-stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: .15rem; }
.bwdb-rating-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bwdb-rating-stars label { cursor: pointer; font-size: 2.2rem; line-height: 1; color: #D9D2C5; padding: .1rem; }
.bwdb-rating-stars label::before { content: "★"; }
.bwdb-rating-stars input:checked ~ label, .bwdb-rating-stars label:hover, .bwdb-rating-stars label:hover ~ label { color: var(--bwdb-star); }
.bwdb-rating-stars input:focus-visible + label { outline: 2px solid var(--bwdb-primary); border-radius: 6px; }

.bwdb-photo-previews { display: flex; flex-wrap: wrap; gap: .5rem; }
.bwdb-photo-preview { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--bwdb-soft); }
.bwdb-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.bwdb-photo-preview.is-busy::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.6); }
.bwdb-photo-preview button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.bwdb-photo-add { display: inline-flex; align-self: start; padding: .6rem 1rem; border: 2px dashed var(--bwdb-line); border-radius: 10px; color: var(--bwdb-primary); font-weight: 600; cursor: pointer; }
.bwdb-photo-add:hover { border-color: var(--bwdb-primary); }
.bwdb-photo-add input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bwdb-photo-add.is-full { display: none; }
.bwdb-consent { display: flex; gap: .5rem; align-items: flex-start; font-size: .92rem; }
.bwdb-consent input { margin-top: .25rem; }
.bwdb-hp { position: absolute !important; left: -9999px; }
.bwdb-review-message { margin: 1rem 0 0; padding: .7rem 1rem; border-radius: 10px; background: #FEF3F2; color: #B42318; }
.bwdb-progress { height: 6px; margin: 1rem 0 0; border-radius: 99px; background: var(--bwdb-soft); overflow: hidden; }
.bwdb-progress span { display: block; height: 100%; width: 0; background: var(--bwdb-primary); transition: width .2s; }
.bwdb-reviews .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Lightbox */
.bwdb-lightbox { max-width: min(96vw, 1200px); max-height: 94vh; padding: 0; border: 0; border-radius: 12px; background: #000; overflow: visible; }
.bwdb-lightbox::backdrop { background: rgba(0,0,0,.85); }
.bwdb-lightbox img { display: block; max-width: min(96vw, 1200px); max-height: 94vh; width: auto; height: auto; border-radius: 12px; }
.bwdb-lightbox button { position: absolute; border: 0; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; border-radius: 50%; width: 44px; height: 44px; font-size: 28px; line-height: 1; }
.bwdb-lightbox-close { top: 8px; right: 8px; }
.bwdb-lightbox-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.bwdb-lightbox-next { right: 8px; top: 50%; transform: translateY(-50%); }
.bwdb-lightbox button[hidden] { display: none; }

@media (max-width: 720px) {
  .bwdb-reviews-summary { grid-template-columns: 1fr; text-align: center; gap: 1.25rem; padding: 1.25rem; }
  .bwdb-reviews-cta .bwdb-btn { width: 100%; }
  .bwdb-reviews-list { grid-template-columns: 1fr; }
  .bwdb-review-form, .bwdb-review-thanks { padding: 1.1rem; }
}
