/* Court promo slideshow + admin/owner uploader — 20261201-3 contain + blur + lightbox + province filter */

.bd-promo-uploader{
  margin:18px 0 22px;
  padding:18px 18px 16px;
  background:#f7fafc;
  border:1px solid #d7e3ef;
  border-radius:16px;
}
.bd-promo-uploader h3{
  margin:0 0 8px;
  font-size:17px;
  color:#11284a;
}
.bd-promo-thumbs{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(120px,1fr));
  gap:12px;
  margin:12px 0 16px;
}
.bd-promo-thumb{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin:0;
  padding:0;
  background:#fff;
  border:1px solid #d7e3ef;
  border-radius:12px;
  overflow:hidden;
  cursor:pointer;
}
.bd-promo-thumb img{
  display:block;
  width:100%;
  aspect-ratio:16/9;
  object-fit:cover;
  background:#e8eef5;
}
.bd-promo-thumb span{
  display:flex;
  align-items:center;
  gap:6px;
  padding:6px 8px 8px;
  font-size:13px;
  color:#334155;
}
.bd-promo-empty{margin:8px 0 14px}
.bd-promo-actions{margin-top:14px}
.bd-promo-picker{margin-top:4px}

/* Homepage / court-page slideshow */
.bd-promo-show{
  width:min(1120px,calc(100% - 28px));
  margin:8px auto 28px;
  padding:0;
}
.bd-promo-show-head{
  margin:0 0 12px;
}
.bd-promo-show-head--filter{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px 20px;
  flex-wrap:wrap;
  margin:0 0 14px;
}
.bd-promo-show-titles{
  flex:1 1 240px;
  min-width:0;
}
.bd-promo-show-kicker{
  display:block;
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#0ea5a0;
  margin-bottom:4px;
}
.bd-promo-show-head h2{
  margin:0;
  font-size:clamp(18px,3.2vw,24px);
  color:#11284a;
  line-height:1.3;
}
.bd-promo-show-filter{
  display:flex;
  flex-direction:column;
  gap:4px;
  flex:0 1 260px;
  min-width:min(100%,200px);
}
.bd-promo-show-filter label{
  font-size:12px;
  font-weight:700;
  color:#4a5d73;
}
.bd-promo-show-filter select{
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  max-width:280px;
  min-height:44px;
  padding:8px 40px 8px 14px;
  border:1px solid #c5d4e4;
  border-radius:12px;
  background-color:#fff;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%2311284a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 12px center;
  background-size:16px;
  color:#11284a;
  font-weight:600;
  cursor:pointer;
  box-shadow:0 1px 2px rgba(16,40,70,.04);
}
.bd-promo-show-filter select:hover{
  border-color:#9bb4cc;
}
.bd-promo-show-filter select:focus,
.bd-promo-show-filter select:focus-visible{
  outline:2px solid #22c5b3;
  outline-offset:2px;
  border-color:#0ea5a0;
}
.bd-promo-show-slide[data-promo-hidden="1"]{
  display:none !important;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
.bd-promo-show.is-filter-fading .bd-promo-show-frame{
  opacity:0;
}
.bd-promo-show-empty{
  display:none;
  margin:0;
  padding:36px 24px;
  text-align:center;
  background:linear-gradient(180deg,#f7fbfc,#eef4fa);
  border:1px dashed #c5d4e4;
  border-radius:20px;
  box-shadow:none;
}
.bd-promo-show-empty p{
  margin:0 0 16px;
  color:#334155;
  font-size:16px;
  line-height:1.6;
}
.bd-promo-show.is-empty .bd-promo-show-viewport,
.bd-promo-show.is-empty .bd-promo-show-nav,
.bd-promo-show.is-empty .bd-promo-show-dots,
.bd-promo-show.is-empty .bd-promo-show-footer-cap{
  display:none !important;
}
.bd-promo-show.is-empty .bd-promo-show-empty{
  display:block;
}
.bd-promo-show-nav[hidden],
.bd-promo-show-dots[hidden]{
  display:none !important;
}
.bd-promo-show-frame{
  position:relative;
  isolation:isolate;
  transition:opacity .22s ease;
}
.bd-promo-show-viewport{
  position:relative;
  height:520px;
  outline:none;
  background:#0b1a2c;
  border-radius:20px;
  overflow:hidden;
  box-shadow:0 16px 36px rgba(16,40,70,.16);
}
.bd-promo-show-track{
  position:absolute;
  inset:0;
}
.bd-promo-show-slide{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  visibility:hidden;
  transition:opacity .55s ease,visibility .55s ease;
  color:inherit;
  text-decoration:none;
}
.bd-promo-show-slide.is-active{
  opacity:1;
  visibility:visible;
  z-index:1;
}
.bd-promo-show-blur{
  position:absolute;
  inset:0;
  overflow:hidden;
  pointer-events:none;
  z-index:0;
}
.bd-promo-show-blur img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  filter:blur(32px) brightness(.42) saturate(1.08);
  transform:scale(1.18);
  transform-origin:center center;
}
.bd-promo-show-photo{
  position:relative;
  z-index:1;
  display:block;
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
  object-position:center;
  background:transparent;
  filter:drop-shadow(0 10px 24px rgba(0,0,0,.35));
}
.bd-promo-show-slide.is-zoomable{cursor:zoom-in}
.bd-promo-show-caption{
  position:absolute;
  width:1px;height:1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  clip-path:inset(50%);
  white-space:nowrap;
  border:0;
  padding:0;
  margin:-1px;
}
.bd-promo-show-footer-cap{
  margin:12px 2px 0;
  min-height:0;
  color:#334155;
  font-size:14px;
  line-height:1.45;
}
.bd-promo-show-footer-cap:empty{display:none}
.bd-promo-show-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  z-index:3;
  width:40px;
  height:40px;
  border:0;
  border-radius:999px;
  background:rgba(255,255,255,.9);
  color:#11284a;
  font-size:26px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 6px 16px rgba(8,22,40,.22);
  display:grid;
  place-items:center;
  padding:0 0 3px;
}
.bd-promo-show-nav:hover,
.bd-promo-show-nav:focus-visible{
  background:#fff;
  outline:2px solid #22c5b3;
  outline-offset:2px;
}
.bd-promo-show-prev{left:10px}
.bd-promo-show-next{right:10px}
.bd-promo-show-dots{
  position:relative;
  z-index:3;
  display:flex;
  justify-content:center;
  gap:7px;
  margin-top:12px;
  pointer-events:none;
}
.bd-promo-show-dot{
  pointer-events:auto;
  width:8px;
  height:8px;
  padding:0;
  border:0;
  border-radius:999px;
  background:#9fb2ca;
  cursor:pointer;
  transition:width .2s ease,background .2s ease;
}
.bd-promo-show-dot.is-active{
  width:22px;
  background:#1769e0;
}
.bd-promo-show-dot:focus-visible{
  outline:2px solid #22c5b3;
  outline-offset:2px;
}

.bd-promo-show--court{
  width:100%;
  margin:0 0 22px;
}
.bd-promo-show--court .bd-promo-show-viewport{border-radius:18px}

@media (max-width:680px){
  .bd-promo-show{
    width:calc(100% - 20px);
    margin:4px auto 22px;
  }
  .bd-promo-show-head--filter{
    align-items:stretch;
  }
  .bd-promo-show-filter,
  .bd-promo-show-filter select{
    flex-basis:100%;
    max-width:none;
  }
  .bd-promo-show-viewport{height:380px}
  .bd-promo-show-empty{padding:28px 16px}
  .bd-promo-show-nav{
    width:34px;
    height:34px;
    font-size:22px;
  }
  .bd-promo-show-prev{left:6px}
  .bd-promo-show-next{right:6px}
  .bd-promo-thumbs{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (prefers-reduced-motion:reduce){
  .bd-promo-show-slide,
  .bd-promo-show-dot,
  .bd-promo-show-frame,
  .bd-promo-lightbox,
  .bd-promo-lightbox-dialog,
  .bd-promo-lightbox-image{transition:none}
  .bd-promo-show.is-filter-fading .bd-promo-show-frame{opacity:1}
  .bd-promo-show-blur img{filter:blur(18px) brightness(.42) saturate(1.08);transform:none}
}

/* Hidden admin/owner promo submit form (fields use the form= attribute) */
.admin-court-media-hidden-form{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden;margin:0;padding:0;border:0}

/* ตีบุฟเฟต์ ribbon tab on court cards — Slip2Go-style top-right flag */
.listing-card.has-buffet-badge,
.listing-card:has(> .bd-buffet-badge){
  overflow:visible;
  position:relative;
}
.court-search-page .listing-card.has-buffet-badge{
  overflow:visible;
}
.listing-card.has-buffet-badge .listing-image{
  overflow:hidden;
  border-top-left-radius:inherit;
  border-top-right-radius:inherit;
}
.listing-grid:has(.bd-buffet-badge){
  padding-top:18px;
}

.bd-buffet-badge{
  position:absolute;
  top:-11px;
  right:14px;
  z-index:5;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:7px 11px 8px;
  border-radius:7px 7px 0 0;
  background:linear-gradient(180deg,#3b8bff 0%,#1E6FFF 42%,#1454e0 78%,#0f47c8 100%);
  color:#fff;
  font-family:'Kanit',sans-serif;
  font-size:12px;
  font-weight:800;
  letter-spacing:.02em;
  line-height:1.1;
  white-space:nowrap;
  box-shadow:0 4px 10px rgba(16,70,200,.28);
  pointer-events:none;
  isolation:isolate;
  overflow:visible;
}
.bd-buffet-badge-label{position:relative;z-index:1}
/* folded ribbon notch under the right edge */
.bd-buffet-badge::after{
  content:"";
  position:absolute;
  top:100%;
  right:0;
  width:0;
  height:0;
  border-style:solid;
  border-width:0 8px 8px 0;
  border-color:transparent #0a3aa8 transparent transparent;
  filter:brightness(.92);
}
/* subtle shine */
.bd-buffet-badge::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:linear-gradient(110deg,transparent 25%,rgba(255,255,255,.42) 50%,transparent 75%);
  transform:translateX(-130%);
  animation:bd-buffet-shine 3.4s ease-in-out 1s infinite;
  pointer-events:none;
  z-index:0;
}
@keyframes bd-buffet-shine{
  0%,58%{transform:translateX(-130%)}
  82%,100%{transform:translateX(130%)}
}
@media (prefers-reduced-motion:reduce){
  .bd-buffet-badge::before{animation:none;display:none}
}

/* Court detail title: same ribbon, sits beside the heading */
.court-detail-title-row{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:12px 16px;
  position:relative;
}
.court-detail-title-row h1{margin:0}
.bd-buffet-badge--title{
  position:relative;
  top:0;
  right:auto;
  flex:0 0 auto;
  box-shadow:0 4px 12px rgba(0,20,60,.28);
}

.bd-buffet-badge--popular{
  top:12px;
  right:14px;
  font-size:11px;
  padding:6px 10px 7px;
  z-index:6;
}
.bd-promo-show-slide{overflow:hidden}
.bd-promo-show-slide .bd-buffet-badge--popular{pointer-events:none}
.bd-promo-interest{
  display:inline-block;
  margin-top:3px;
  font-size:12px;
  font-style:normal;
  font-weight:700;
  opacity:.95;
}
.bd-promo-click-stats{
  display:flex;
  flex-direction:column;
  gap:1px;
  padding:0 8px 8px;
  font-size:11px;
  line-height:1.35;
  color:#475569;
  font-weight:600;
}

/* Full-size promo lightbox */
.bd-promo-lightbox[hidden]{display:none!important}
.bd-promo-lightbox{
  position:fixed;
  inset:0;
  z-index:100000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:clamp(10px,2.5vw,30px);
  opacity:0;
  visibility:hidden;
  transition:opacity .28s ease,visibility .28s ease;
}
.bd-promo-lightbox.is-open{opacity:1;visibility:visible}
.bd-promo-lightbox-backdrop{
  position:absolute;
  inset:0;
  background:rgba(3,10,22,.9);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}
.bd-promo-lightbox-dialog{
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  width:min(1200px,100%);
  max-height:100%;
  color:#fff;
  transform:translateY(16px) scale(.98);
  transition:transform .32s cubic-bezier(.2,.8,.2,1);
  outline:none;
}
.bd-promo-lightbox.is-open .bd-promo-lightbox-dialog{transform:none}
.bd-promo-lightbox-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:0 2px 12px;
}
.bd-promo-lightbox-counter{
  font-size:13px;
  font-weight:700;
  letter-spacing:.06em;
  color:rgba(255,255,255,.86);
  font-variant-numeric:tabular-nums;
}
.bd-promo-lightbox-close,
.bd-promo-lightbox-arrow{
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.22);
  color:#fff;
  background:rgba(255,255,255,.1);
  backdrop-filter:blur(10px);
  cursor:pointer;
  transition:background .2s ease,transform .2s ease,border-color .2s ease;
}
.bd-promo-lightbox-close{
  width:44px;
  height:44px;
  border-radius:50%;
  font-size:28px;
  line-height:1;
}
.bd-promo-lightbox-close:hover,
.bd-promo-lightbox-arrow:hover{
  background:rgba(255,255,255,.22);
  border-color:rgba(255,255,255,.5);
}
.bd-promo-lightbox-close:focus-visible,
.bd-promo-lightbox-arrow:focus-visible{
  outline:3px solid #8cbcff;
  outline-offset:3px;
}
.bd-promo-lightbox-stage{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:0;
  flex:1;
  overflow:hidden;
  border-radius:18px;
  background:rgba(255,255,255,.035);
  box-shadow:0 24px 80px rgba(0,0,0,.38);
  touch-action:pan-y;
}
.bd-promo-lightbox-image{
  display:block;
  max-width:100%;
  max-height:calc(100vh - 140px);
  width:auto;
  height:auto;
  object-fit:contain;
  border-radius:8px;
  filter:drop-shadow(0 14px 34px rgba(0,0,0,.35));
}
.bd-promo-lightbox-arrow[hidden]{display:none!important}
.bd-promo-lightbox-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:48px;
  height:58px;
  border-radius:15px;
  font-size:30px;
  line-height:1;
  background:rgba(5,20,40,.52);
}
.bd-promo-lightbox-arrow:hover{transform:translateY(-50%) scale(1.04)}
.bd-promo-lightbox-prev{left:14px}
.bd-promo-lightbox-next{right:14px}
.bd-promo-lightbox-caption{
  min-height:22px;
  padding:12px 4px 4px;
  text-align:center;
  color:rgba(255,255,255,.9);
  font-size:14px;
  line-height:1.5;
  overflow-wrap:anywhere;
}
body.bd-promo-lightbox-open{overflow:hidden}
@media (max-width:680px){
  .bd-promo-lightbox{padding:10px}
  .bd-promo-lightbox-image{max-height:calc(100dvh - 120px)}
  .bd-promo-lightbox-arrow{width:40px;height:48px;border-radius:12px;font-size:25px;background:rgba(5,20,40,.62)}
  .bd-promo-lightbox-prev{left:8px}
  .bd-promo-lightbox-next{right:8px}
}

