/* Free swatch request page — after sonno.co.uk/pages/free-swatches:
   fabric families as headed sections of large tiles, a tick on selection,
   a sticky "Selected n of 6" bar, then the delivery details step. */
.bbc-sw{--sw-navy:#2b2e52;--sw-beige:#efe8de;--sw-gold:#c9a86a;--sw-line:#e6e7ee;--sw-muted:#6b6f86;--sw-warn:#b4341f;
  color:#24263d;font-size:15px;line-height:1.5}
.bbc-sw *,.bbc-sw *::before,.bbc-sw *::after{box-sizing:border-box}

.bbc-sw__head{display:flex;align-items:center;gap:12px;margin:30px 0 16px}
.bbc-sw__step{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;
  background:var(--sw-navy);color:#fff;font-weight:700;font-size:15px}
.bbc-sw .bbc-sw__title{margin:0;font-size:22px;line-height:1.25;letter-spacing:-.01em}
.bbc-sw__count{margin:2px 0 0;font-size:14px;font-weight:600;color:var(--sw-muted)}
.bbc-sw__count.is-full{color:var(--sw-navy)}

/* Quick links to each fabric family. */
.bbc-sw__jump{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 6px}
.bbc-sw__jump a{padding:6px 12px;border:1px solid var(--sw-line);border-radius:999px;background:#fff;
  color:#24263d;font-size:13px;font-weight:600;text-decoration:none;transition:border-color .2s,background-color .2s}
.bbc-sw__jump a:hover{border-color:var(--sw-navy);background:var(--sw-beige)}

.bbc-sw__family{display:flex;align-items:baseline;gap:8px;margin:30px 0 14px;padding-bottom:10px;
  border-bottom:1px solid var(--sw-line);font-size:18px;font-weight:700;color:#24263d;scroll-margin-top:130px}
.bbc-sw__family-n{font-size:12.5px;font-weight:600;color:var(--sw-muted)}

.bbc-sw__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:16px;margin:0;padding:0;list-style:none}
.bbc-sw__grid li{margin:0}

.bbc-sw__item{display:block;cursor:pointer}
.bbc-sw__item input{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

.bbc-sw__box{display:block;text-align:center}
.bbc-sw__chip{position:relative;display:block;aspect-ratio:1;overflow:hidden;background:#f1efeb;
  border:2px solid transparent;border-radius:4px;transition:border-color .2s,box-shadow .2s}
.bbc-sw__chip img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .35s}
.bbc-sw__item:hover .bbc-sw__chip img{transform:scale(1.04)}

/* Tick badge in the centre, as on Sonno. */
.bbc-sw__tick{position:absolute;top:50%;left:50%;display:grid;place-items:center;width:34px;height:34px;margin:-17px 0 0 -17px;
  border-radius:50%;background:var(--sw-gold);color:#fff;box-shadow:0 4px 12px rgba(0,0,0,.25);
  opacity:0;transform:scale(.6);transition:opacity .18s,transform .18s}
.bbc-sw__tick svg{width:18px;height:18px}
.bbc-sw__item input:checked + .bbc-sw__box .bbc-sw__chip{border-color:var(--sw-navy);box-shadow:0 8px 20px -12px rgba(43,46,82,.7)}
.bbc-sw__item input:checked + .bbc-sw__box .bbc-sw__tick{opacity:1;transform:scale(1)}
.bbc-sw__item input:focus-visible + .bbc-sw__box .bbc-sw__chip{outline:3px solid var(--sw-navy);outline-offset:2px}

.bbc-sw__name{display:block;margin-top:8px;font-size:13px;line-height:1.3;color:#3c4257}
.bbc-sw__item input:checked + .bbc-sw__box .bbc-sw__name{font-weight:700;color:var(--sw-navy)}

/* At the limit, the ones you have not picked dim rather than vanish. */
.bbc-sw.is-full .bbc-sw__item input:not(:checked) + .bbc-sw__box{opacity:.38}
.bbc-sw.is-full .bbc-sw__item input:not(:checked) + .bbc-sw__box img{transform:none}

/* Sticky selection bar. */
.bbc-sw__bar{position:sticky;bottom:12px;z-index:30;margin:28px 0 0}
.bbc-sw__bar[hidden]{display:none}
.bbc-sw__bar-inner{display:flex;align-items:center;gap:14px;padding:10px 12px 10px 14px;border-radius:14px;
  background:var(--sw-navy);color:#fff;box-shadow:0 14px 34px -14px rgba(20,22,48,.7)}
.bbc-sw__slots{display:flex;gap:6px;margin:0;padding:0;list-style:none}
.bbc-sw__slots li{width:36px;height:36px;margin:0;border-radius:6px;border:1.5px dashed rgba(255,255,255,.35);overflow:hidden;background-size:cover;background-position:center}
.bbc-sw__slots li.is-filled{border:1.5px solid #fff}
.bbc-sw__bar-count{flex:1;margin:0;font-size:14.5px;font-weight:700}
.bbc-sw .bbc-sw__continue{flex:none;padding:11px 20px;border-radius:10px;background:#fff;color:var(--sw-navy);
  font-size:14.5px;font-weight:800;text-decoration:none;letter-spacing:.01em;transition:background-color .2s}
.bbc-sw .bbc-sw__continue:hover{background:var(--sw-beige)}

/* Details step. */
.bbc-sw__details{margin-top:28px;padding:4px 22px 22px;border:1px solid var(--sw-line);border-radius:16px;background:#fff;scroll-margin-top:120px}
.bbc-sw__details .bbc-sw__head{margin-top:20px}
.bbc-sw__chosen{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.bbc-sw__chosen[hidden]{display:none}
.bbc-sw__chosen span{display:inline-flex;align-items:center;gap:7px;padding:4px 10px 4px 4px;border-radius:999px;background:var(--sw-beige);font-size:12.5px;font-weight:600}
.bbc-sw__chosen img{width:24px;height:24px;border-radius:50%;object-fit:cover}

.bbc-sw__fields{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;margin-top:6px}
.bbc-sw__fields label{display:flex;flex-direction:column;gap:5px;font-size:13px}
.bbc-sw__fields label > span{font-weight:700;color:#24263d}
.bbc-sw__wide{grid-column:1/-1}
.bbc-sw__fields input{width:100%;height:46px;padding:10px 13px;border:1.5px solid var(--sw-line);border-radius:10px;font:inherit;font-size:15px;background:#fff}
.bbc-sw__fields input:focus{outline:none;border-color:var(--sw-navy);box-shadow:0 0 0 3px rgba(43,46,82,.12)}

.bbc-sw__hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

.bbc-sw__submit{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:22px 0 0}
.bbc-sw .bbc-sw__button,.bbc-sw__done .bbc-sw__button{display:inline-block;padding:15px 28px;border:0;border-radius:10px;background:var(--sw-navy);
  color:#fff;font:inherit;font-size:15px;font-weight:800;letter-spacing:.02em;cursor:pointer;text-decoration:none}
.bbc-sw .bbc-sw__button:hover,.bbc-sw__done .bbc-sw__button:hover{background:#1f2140;color:#fff}
.bbc-sw .bbc-sw__button[disabled]{opacity:.5;cursor:not-allowed}
.bbc-sw__note{font-size:13px;color:var(--sw-muted)}

.bbc-sw__error{margin:0 0 14px;padding:11px 13px;border:1px solid #f3d3cb;border-left:3px solid var(--sw-warn);
  border-radius:9px;background:#fdf2ef;color:#8d2718;font-size:13.5px}

.bbc-sw__done{max-width:640px;margin:10px auto;padding:30px;border:1px solid #cfe8da;border-radius:16px;background:#f2faf6;text-align:center}
.bbc-sw__done-icon{display:inline-grid;place-items:center;width:52px;height:52px;margin-bottom:10px;border-radius:50%;background:#1f7a4d;color:#fff}
.bbc-sw__done-icon svg{width:26px;height:26px}
.bbc-sw__done h3{margin:0 0 6px;font-size:21px}
.bbc-sw__done p{margin:0 0 14px;color:#3c4257}

@media(max-width:768px){
  .bbc-sw__grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
  .bbc-sw__name{font-size:12px}
  .bbc-sw__tick{width:28px;height:28px;margin:-14px 0 0 -14px}
  /* Clear WoodMart's fixed bottom toolbar on phones. */
  .bbc-sw__bar{bottom:66px}
  .bbc-sw__slots li{width:26px;height:26px}
  .bbc-sw__bar-inner{gap:10px;padding:8px 8px 8px 10px}
  .bbc-sw__bar-count{font-size:13px}
  .bbc-sw .bbc-sw__continue{padding:10px 14px}
  .bbc-sw__details{padding:4px 14px 18px}
  .bbc-sw__fields{grid-template-columns:1fr}
  .bbc-sw .bbc-sw__button{width:100%}
}
@media(max-width:380px){ .bbc-sw__slots{display:none} }
@media (prefers-reduced-motion: reduce){.bbc-sw *{transition:none!important}}

/* A colour on sale whose swatch photo has not been uploaded yet. */
.bbc-sw__noimg{position:absolute;inset:0;display:grid;place-items:center;padding:10px;text-align:center;
  background:repeating-linear-gradient(135deg,#f4f1ec 0 10px,#ece7df 10px 20px);color:#8a8070;font-size:11.5px;font-weight:600;line-height:1.3}

/* WoodMart's back-to-top button sat on top of "Continue" on phones. */
@media(max-width:768px){
  body:has(.bbc-sw__bar:not([hidden])) .scrollToTop{opacity:0 !important;pointer-events:none !important}
}
