/* Sam's Birds — Purchase Widget v7
   All px — immune to gallery rem/em cascade */

/* ── Buy button in #lb-bar — same height as other lb-btn ── */
#sbs-lb-buy-btn, .sbs-lb-buy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #c8960a; color: #1a0f00;
  border: none; border-radius: 20px;
  padding: 0 16px;
  height: 44px;          /* match lb-bar button height */
  font-size: 15px;
  font-family: Georgia, serif; font-weight: 500;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: background 0.15s; line-height: 1;
  vertical-align: middle;
}
#sbs-lb-buy-btn:hover, .sbs-lb-buy-btn:hover { background: #a87c08; }

/* ── Backdrop ── */
#sbs-wrap {
  display: none; position: absolute; inset: 0; z-index: 350;
  background: rgba(8,4,1,0.84);
  align-items: flex-start; justify-content: center;
  padding: 12px 12px 0;
  opacity: 0; transition: opacity 0.22s ease;
  pointer-events: auto; box-sizing: border-box;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
#sbs-wrap.sbs-vis { opacity: 1; }

/* ── Modal ── */
#sbs-modal {
  background: #fdf8f0; border: 1px solid #c9b080;
  border-radius: 14px; width: 100%; max-width: 460px;
  padding: 18px 20px 20px;
  font-family: Georgia, serif; color: #3a2208;
  font-size: 16px; line-height: 1.5;
  transform: translateY(-6px); transition: transform 0.22s ease;
  touch-action: pan-y; box-sizing: border-box;
  position: relative; margin-bottom: 12px;
}
#sbs-wrap.sbs-vis #sbs-modal { transform: translateY(0); }

/* ── Close — dark gold pill, top right, easy to tap ── */
#sbs-x {
  position: absolute; top: 14px; right: 14px;
  background: #7a5c0a; color: #fdf4e0;
  border: none; border-radius: 20px;
  padding: 0 14px; height: 34px;
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2; gap: 5px;
  font-family: sans-serif; letter-spacing: 0.03em;
  white-space: nowrap;
}
#sbs-x:hover { background: #634d08; }

/* ── Header: thumb + text ── */
#sbs-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px; padding-right: 80px;
}
#sbs-thumb {
  display: none; width: auto; height: 72px;
  object-fit: contain; border-radius: 8px;
  border: 1px solid #d4b87a; flex-shrink: 0;
  background: #ede0cc;
}
#sbs-headtext  { flex: 1; min-width: 0; }
#sbs-site      { font-size: 12px; letter-spacing: 0.09em; text-transform: uppercase; color: #9a7840; font-family: sans-serif; }
#sbs-title     { font-size: 20px; font-weight: 500; color: #3a2208; }
#sbs-photo-ref { font-size: 13px; color: #c8960a; font-family: sans-serif; font-weight: 500; margin-top: 3px; word-break: break-all; min-height: 16px; }

/* ── Progress ── */
#sbs-prog { display: flex; align-items: center; margin-bottom: 14px; }
.sbs-ps  { display: flex; align-items: center; gap: 5px; font-size: 13px; font-family: sans-serif; color: #bba870; white-space: nowrap; }
.sbs-pd  { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #d4b87a; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; color: #bba870; font-family: sans-serif; flex-shrink: 0; }
.sbs-pl  { flex: 1; height: 1px; background: #e0cebc; margin: 0 5px; min-width: 6px; }
.sbs-ps.sbs-done         { color: #7a5c0a; }
.sbs-ps.sbs-done .sbs-pd { background: #7a5c0a; border-color: #7a5c0a; color: #fdf4e0; }
.sbs-ps.sbs-cur          { color: #3a2208; font-weight: 600; }
.sbs-ps.sbs-cur  .sbs-pd { border-color: #8b6914; color: #3a2208; }

/* ── Steps ── */
.sbs-step { display: block; }
.sbs-h    { display: none !important; }

/* section label */
.sbs-flabel { font-size: 13px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #8a6830; font-family: sans-serif; margin-bottom: 7px; }
.sbs-f      { margin-bottom: 12px; }
.sbs-f label{ display: block; font-size: 13px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #8a6830; font-family: sans-serif; margin-bottom: 5px; }

/* ── Licence tiles 2×2 ── */
#sbs-ltiles { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 0; }
.sbs-ltile {
  display: flex; align-items: center; justify-content: space-between;
  background: #fffdf5; border: 1.5px solid #d4b87a; border-radius: 9px;
  padding: 11px 14px; cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.sbs-ltile:hover   { background: #fdf4e3; border-color: #b89040; }
.sbs-ltile.sbs-lsel{ border: 2.5px solid #8b6914; background: #fdf0d0; }
.sbs-ltname  { font-size: 16px; font-weight: 500; color: #3a2208; font-family: Georgia, serif; }
.sbs-ltprice { font-size: 16px; font-weight: 700; color: #7a5c0a; font-family: sans-serif; }

/* ── File version tiles 2 col ── */
#sbs-ftiles { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.sbs-ftile {
  background: #fffdf5; border: 1.5px solid #d4b87a; border-radius: 9px;
  padding: 11px 14px; cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  display: flex; flex-direction: column; gap: 3px;
}
.sbs-ftile:hover    { background: #fdf4e3; border-color: #b89040; }
.sbs-ftile.sbs-fsel { border: 2.5px solid #8b6914; background: #fdf0d0; }
.sbs-ftname  { font-size: 16px; font-weight: 500; color: #3a2208; font-family: Georgia, serif; }
.sbs-ftnote  { font-size: 14px; color: #8a6830; font-family: sans-serif; }
.sbs-ftprice { font-size: 15px; font-weight: 700; color: #c8760a; font-family: sans-serif; margin-top: 3px; }

/* ── Name + email ── */
#sbs-namerow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
#sbs-modal input[type="text"],
#sbs-modal input[type="email"] {
  width: 100%; padding: 10px 12px;
  border: 1px solid #d4b87a; border-radius: 8px;
  font-size: 15px; color: #3a2208; background: #fffdf5;
  font-family: sans-serif; outline: none; box-sizing: border-box;
}
#sbs-modal input:focus { border-color: #8b6914; box-shadow: 0 0 0 2px rgba(139,105,20,0.15); }
#sbs-modal input::placeholder { color: #bba870; }

/* error */
#sbs-err { display: none; font-size: 13px; color: #b03000; font-family: sans-serif; margin: 6px 0 4px; }

/* ── Summary ── */
.sbs-sum  { background: #fdf4e3; border: 1px solid #d9c9b0; border-radius: 9px; padding: 12px 14px; margin-bottom: 12px; }
.sbs-sr   { display: flex; justify-content: space-between; align-items: flex-start; font-size: 14px; font-family: sans-serif; padding: 3px 0; }
.sbs-sl   { color: #8a6830; flex-shrink: 0; margin-right: 10px; }
.sbs-sv   { color: #3a2208; font-weight: 500; text-align: right; font-size: 14px; word-break: break-all; }
.sbs-tot  { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #e0cebc; margin-top: 8px; padding-top: 9px; font-size: 15px; font-family: sans-serif; color: #7a5c0a; }
.sbs-tnum { font-size: 26px; font-weight: 500; color: #3a2208; font-family: Georgia, serif; }

/* note */
.sbs-note { font-size: 13px; color: #8a6830; font-family: sans-serif; line-height: 1.65; margin-bottom: 12px; }

/* ── Buttons — all pill-shaped ── */
.sbs-btn {
  display: block; width: 100%; padding: 13px;
  background: #7a5c0a; color: #fdf4e0;
  border: none; border-radius: 24px;
  font-size: 16px; font-family: Georgia, serif;
  cursor: pointer; letter-spacing: 0.02em;
  transition: background 0.15s; box-sizing: border-box; margin-top: 10px;
}
.sbs-btn:hover { background: #634d08; }

.sbs-btn2 {
  display: block; width: 100%; padding: 12px;
  background: #fdf8f0; color: #5a4020;
  border: 1px solid #d4b87a; border-radius: 24px;
  font-size: 15px; font-family: sans-serif;
  cursor: pointer; margin-top: 8px; box-sizing: border-box;
}
.sbs-btn2:hover { background: #f5ead6; }

.sbs-btnpp {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px;
  background: #FFC439; color: #003087;
  border: none; border-radius: 24px;
  font-size: 16px; font-family: sans-serif; font-weight: 700;
  cursor: pointer; box-sizing: border-box; margin-top: 10px;
}
.sbs-btnpp:hover { background: #e8b030; }
.sbs-pp      { font-size: 18px; font-weight: 800; color: #003087; }
.sbs-pp span { color: #009cde; }

/* done */
#sbs-check  { width: 54px; height: 54px; background: #f5ead6; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 4px auto 14px; }
#sbs-done-t { font-size: 22px; font-weight: 500; color: #3a2208; text-align: center; margin-bottom: 8px; font-family: Georgia, serif; }
#sbs-done-s { font-size: 15px; color: #7a5c2a; font-family: sans-serif; text-align: center; line-height: 1.7; }

/* ══════════════════════════════════
   MOBILE — bottom sheet
   ══════════════════════════════════ */
@media (max-width: 600px) {
  #sbs-wrap  { padding: 8px 8px 0; align-items: flex-start; }
  #sbs-modal { padding: 16px 14px 20px; border-radius: 16px; }

  #sbs-thumb     { width: auto; height: 60px; }
  #sbs-title     { font-size: 22px; }
  #sbs-photo-ref { font-size: 13px; }
  #sbs-x         { height: 38px; padding: 0 14px; font-size: 15px; top: 13px; right: 12px; }

  .sbs-ps   { font-size: 13px; }
  .sbs-pd   { width: 24px; height: 24px; font-size: 12px; }

  .sbs-flabel  { font-size: 14px; }
  .sbs-f label { font-size: 14px; }

  .sbs-ltname  { font-size: 16px; }
  .sbs-ltprice { font-size: 16px; }
  .sbs-ftname  { font-size: 16px; }
  .sbs-ftnote  { font-size: 14px; }
  .sbs-ftprice { font-size: 15px; }

  #sbs-namerow { grid-template-columns: 1fr; }
  #sbs-modal input[type="text"],
  #sbs-modal input[type="email"] { font-size: 16px; padding: 12px 13px; }

  .sbs-sl   { font-size: 15px; }
  .sbs-sv   { font-size: 14px; }
  .sbs-tnum { font-size: 28px; }
  .sbs-note { font-size: 14px; }

  .sbs-btn    { font-size: 18px; padding: 15px; }
  .sbs-btn2   { font-size: 16px; padding: 13px; }
  .sbs-btnpp  { font-size: 18px; padding: 15px; }
  .sbs-pp     { font-size: 20px; }

  #sbs-done-t { font-size: 24px; }
  #sbs-done-s { font-size: 16px; }

  #sbs-lb-buy-btn, .sbs-lb-buy-btn { font-size: 15px; height: 44px; padding: 0 15px; }
}
