/* Badge Widget — Hotel Dublin teal palette */

.bw-wrap {
  --ink:       #0a3535;
  --ink-2:     #0d4040;
  --paper:     #fff;
  --paper-2:   #f3f5f7;
  --gold:      #e8a000;
  --gold-2:    #f0b52a;
  --gold-deep: #b87800;
  --teal:      #006e6e;
  --line:      rgba(232,160,0,.4);
  --shadow:    0 1px 3px rgba(0,0,0,.07), 0 4px 14px rgba(0,0,0,.10);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  line-height: 1.5;

  margin: 20px 0;
}

.bw-panel {
  background: var(--paper);
  border-radius: 6px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
}

/* ── head ── */
.bw-head {
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  color: var(--paper);
  padding: 18px 24px;
  position: relative;
  border-bottom: 1px solid var(--gold-deep);
}
.bw-head::before {
  content: ""; position: absolute; inset: 5px;
  border: 1px solid rgba(232,160,0,.3); border-radius: 4px; pointer-events: none;
}
.bw-head::after {
  content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold-2) 50%, var(--gold) 80%, transparent);
  opacity: .75;
}
.bw-head-row { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.bw-crest {
  width: 40px; height: 40px; flex-shrink: 0;
  display: grid; place-items: center;
  border: 1px solid rgba(232,160,0,.6); border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(232,160,0,.15), transparent 70%);
}
.bw-crest svg { width: 20px; height: 20px; }
.bw-head-text .kicker { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 2px; font-weight: 600; }
.bw-head-text h3 { font-weight: 700; font-size: 17px; }
.bw-head-text p { margin-top: 3px; font-size: 12px; color: rgba(251,248,241,.72); max-width: 500px; }
.bw-head-text p strong { color: var(--gold-2); }

/* ── tier banner ── */
.bw-tier { display: flex; align-items: center; gap: 14px; padding: 13px 24px; background: var(--paper-2); border-bottom: 1px solid rgba(10,53,53,.08); }
.bw-medal {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, var(--tg-1, #FFD96B), var(--tg-2, #e8a000) 60%, var(--tg-3, #9C6A0E));
  box-shadow: inset 0 0 0 2px var(--paper), 0 2px 6px rgba(0,0,0,.18);
  color: #fff; font-weight: 800; font-size: 13px; text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.bw-tier-text { flex: 1; min-width: 0; }
.bw-tier-text .label { font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 2px; font-weight: 600; }
.bw-tier-text .name { font-size: 14px; font-weight: 700; color: var(--ink); }
.bw-tier-text .name .pill { display: inline-block; margin-left: 7px; padding: 1px 7px; border-radius: 99px; background: var(--tg-2, var(--gold)); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; vertical-align: middle; }
.bw-tier-meta { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #6b7280; font-weight: 600; }

.bw-panel.t-gold   { --tg-1:#FFD96B; --tg-2:#E8B339; --tg-3:#9C6A0E; }
.bw-panel.t-silver { --tg-1:#D7DCE4; --tg-2:#8C95A3; --tg-3:#48505E; }
.bw-panel.t-bronze { --tg-1:#E8A574; --tg-2:#B5663C; --tg-3:#6E3915; }
.bw-panel.t-teal   { --tg-1:#4db8b8; --tg-2:#006e6e; --tg-3:#004040; }

/* ── body ── */
.bw-body { display: grid; grid-template-columns: 250px 1fr; min-height: 440px; }
@media (max-width: 680px) { .bw-body { grid-template-columns: 1fr; } }

.bw-controls {
  padding: 18px;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  border-right: 1px solid rgba(10,53,53,.08);
}
@media (max-width: 680px) { .bw-controls { border-right: none; border-bottom: 1px solid rgba(10,53,53,.08); } }

.bw-ctrl { margin-bottom: 16px; }
.bw-ctrl-label { font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 9px; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.bw-ctrl-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }

.bw-seg { display: grid; grid-template-columns: 1fr 1fr; background: rgba(10,53,53,.05); border-radius: 4px; padding: 3px; border: 1px solid rgba(10,53,53,.08); gap: 2px; }
.bw-seg.cols3 { grid-template-columns: repeat(3, 1fr); }
.bw-seg button { appearance: none; border: none; background: transparent; padding: 8px 5px; border-radius: 3px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: #4b5563; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 4px; transition: all .18s; }
.bw-seg button svg { width: 12px; height: 12px; }
.bw-seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(10,53,53,.08); }

.bw-toggle { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: #fff; border: 1px solid rgba(10,53,53,.08); border-radius: 4px; cursor: pointer; }
.bw-toggle .tog-text { font-size: 12px; font-weight: 600; color: var(--ink); }
.bw-toggle .tog-text small { display: block; font-weight: 500; color: #6b7280; font-size: 10px; margin-top: 1px; }
.bw-switch { width: 36px; height: 20px; background: rgba(10,53,53,.15); border-radius: 99px; position: relative; flex-shrink: 0; transition: background .2s; }
.bw-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,.18); transition: transform .22s; }
.bw-toggle.on .bw-switch { background: var(--ink); }
.bw-toggle.on .bw-switch::after { transform: translateX(16px); }

.bw-color-row { display: flex; align-items: center; gap: 7px; }
.bw-swatches { display: flex; gap: 5px; flex: 1; }
.bw-swatch { appearance: none; border: none; cursor: pointer; flex: 1; aspect-ratio: 1/1; background: var(--c, #fff); box-shadow: inset 0 0 0 1px rgba(10,53,53,.12); padding: 0; transition: transform .14s, box-shadow .14s; border-radius: 2px; }
.bw-swatch:hover { transform: translateY(-1px); }
.bw-swatch.on { box-shadow: inset 0 0 0 1px rgba(10,53,53,.12), inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--ink); }
.bw-swatch-pick { flex-shrink: 0; width: 30px; aspect-ratio: 1/1; display: grid; place-items: center; cursor: pointer; background: var(--paper); color: var(--gold-deep); border: 1px dashed var(--gold); position: relative; transition: all .18s; border-radius: 2px; }
.bw-swatch-pick:hover { border-style: solid; color: var(--ink); border-color: var(--ink); }
.bw-swatch-pick svg { width: 12px; height: 12px; }
.bw-swatch-pick input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: none; padding: 0; background: transparent; }

/* ── preview ── */
.bw-preview { padding: 20px; background: var(--paper); display: flex; flex-direction: column; gap: 12px; }
.bw-section-label { font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 7px; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.bw-section-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }

.bw-stage { display: flex; justify-content: center; align-items: center; padding: 10px 0; min-height: 240px; }

/* ── sticker badge ── */
.b-sticker {
  --frame: #e8a000; --inner: #006e6e; --frame-text: #0a3535;
  position: relative; background: var(--frame);
width: 280px; aspect-ratio: 1/1; padding: 24px;
}
.b-sticker.shape-rect { width: 360px; aspect-ratio: 1.45/1; }

.b-sticker.t-gold   { --frame: #F4C842; --inner: #006e6e; --frame-text: #0a3535; }
.b-sticker.t-silver { --frame: #D7DCE4; --inner: #0a3535; --frame-text: #0a3535; }
.b-sticker.t-bronze { --frame: #E8A574; --inner: #0a3535; --frame-text: #0a3535; }
.b-sticker.t-teal   { --frame: #e8a000; --inner: #006e6e; --frame-text: #0a3535; }

.b-sticker .inner { position: absolute; inset: 24px; background: var(--inner); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff; padding: 12px; overflow: hidden; }
.b-sticker .inner.photo { background: #0a3535; }
.b-sticker .inner.photo .photo-bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.b-sticker .inner.photo .photo-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,53,53,.45), rgba(10,53,53,.65)); z-index: 1; }
.b-sticker .inner.photo > *:not(.photo-bg):not(.photo-overlay) { position: relative; z-index: 2; }

.b-sticker .ring { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.b-sticker .ring text { fill: var(--frame-text); font-weight: 700; font-size: 8px; letter-spacing: .14em; text-transform: uppercase; }

.b-sticker .rank-num { font-weight: 900; font-size: 72px; line-height: .85; color: #fff; letter-spacing: -.04em; display: flex; align-items: flex-start; justify-content: center; }
.b-sticker .rank-num .hash { font-size: 36px; line-height: .95; margin-right: 2px; margin-top: 6px; font-weight: 800; }
.b-sticker .rank-label { font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .16em; margin-top: 8px; }
.b-sticker .rank-name { font-weight: 700; font-size: 12px; line-height: 1.2; margin-top: 5px; padding: 0 4px; max-width: 100%; }
.b-sticker .rank-divider { width: 34px; height: 2px; background: #fff; opacity: .5; margin: 7px 0; }
.b-sticker .rank-meta { font-size: 9px; font-weight: 700; opacity: .9; letter-spacing: .16em; text-transform: uppercase; line-height: 1.3; }

.b-sticker.size-m { width: 190px; padding: 16px; }
.b-sticker.size-m .inner { inset: 16px; }
.b-sticker.size-m .rank-num { font-size: 44px; }
.b-sticker.size-m .rank-num .hash { font-size: 21px; margin-top: 4px; }
.b-sticker.size-m .rank-label { font-size: 8px; }
.b-sticker.size-m .rank-name { font-size: 9px; }
.b-sticker.size-m .rank-meta { font-size: 6.5px; }

.b-sticker.size-s { width: 135px; padding: 13px; }
.b-sticker.size-s .inner { inset: 13px; }
.b-sticker.size-s .rank-num { font-size: 30px; }
.b-sticker.size-s .rank-num .hash { font-size: 14px; margin-top: 3px; }
.b-sticker.size-s .rank-label { font-size: 6px; }
.b-sticker.size-s .rank-name { font-size: 6px; }
.b-sticker.size-s .rank-meta { font-size: 5px; font-weight: 700; }

.b-sticker.shape-rect .rank-num { font-size: 68px; }
.b-sticker.shape-rect .rank-num .hash { font-size: 32px; }
.b-sticker.shape-rect .rank-name { font-size: 13px; padding: 0 10px; }
.b-sticker.shape-rect.size-m { width: 245px; }
.b-sticker.shape-rect.size-m .rank-num { font-size: 48px; }
.b-sticker.shape-rect.size-s { width: 190px; }
.b-sticker.shape-rect.size-s .rank-num { font-size: 34px; }

/* embed */
.bw-embed-box { background: var(--ink); color: #D7DCE4; font-family: 'Courier New', monospace; font-size: 11px; line-height: 1.6; padding: 11px; border-radius: 4px; position: relative; border: 1px solid rgba(232,160,0,.25); max-height: 105px; overflow: hidden; }
.bw-embed-box::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background: linear-gradient(to top, var(--ink), transparent); pointer-events: none; }
.bw-embed-box pre { margin: 0; white-space: pre-wrap; word-break: break-all; font: inherit; color: inherit; }
.bw-embed-box .etag  { color: #7BAA92; }
.bw-embed-box .eattr { color: var(--gold-2); }
.bw-embed-box .estr  { color: #E0CFA1; }

.bw-copy-btn { position: absolute; top: 7px; right: 7px; appearance: none; background: var(--gold); color: var(--ink); border: none; padding: 5px 9px; border-radius: 3px; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 4px; z-index: 2; transition: all .18s; }
.bw-copy-btn:hover { background: var(--gold-2); }
.bw-copy-btn.copied { background: #3B6F58; color: #fff; }
.bw-copy-btn svg { width: 9px; height: 9px; }


.bw-foot { font-size: 11px; color: #6b7280; line-height: 1.5; }
.bw-foot strong { color: var(--ink); font-weight: 600; }

/* ── award mode ── */
.b-sticker .rank-num.award-icon {
  font-size: 56px; line-height: 1; display: block;
  text-align: center; margin-bottom: 2px;
  font-weight: 400; letter-spacing: 0;
}
.b-sticker.size-m .rank-num.award-icon { font-size: 38px; }
.b-sticker.size-s .rank-num.award-icon { font-size: 26px; }

.bw-award-list {
  display: flex; flex-direction: column; gap: 5px;
}
.bw-award-btn {
  appearance: none; border: 1px solid rgba(10,53,53,.12);
  background: #fff; border-radius: 99px;
  padding: 7px 13px; font-size: 11px; font-weight: 600;
  color: var(--ink); cursor: pointer; text-align: left;
  transition: all .17s; line-height: 1.3;
}
.bw-award-btn:hover { border-color: var(--teal); color: var(--teal); background: rgba(0,110,110,.06); }
.bw-award-btn.on { background: var(--teal); color: #fff; border-color: var(--teal); }
