/* Light Beer Tracker — styles v2
 * App-grade dark UI. System font stack (native feel, zero font loading),
 * vivid amber brand gradient, elevated cards, tabular numerals.
 * All selectors scoped under .lbt-app to coexist with any WordPress theme.
 */

.lbt-app {
  --lbt-bg: #0f0d0a;
  --lbt-surface: #1c1712;
  --lbt-raised: #26201a;
  --lbt-line: rgba(255, 247, 234, 0.09);
  --lbt-line-strong: rgba(255, 247, 234, 0.18);
  --lbt-amber: #ffb340;
  --lbt-amber-hot: #ff8a00;
  --lbt-grad: linear-gradient(135deg, #ffc95e 0%, #ffb340 40%, #ff8a00 100%);
  --lbt-ink: #fff7ea;
  --lbt-muted: #9c8e7e;
  --lbt-red: #ff5c49;
  --lbt-r-lg: 22px;
  --lbt-r-md: 15px;
  --lbt-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--lbt-bg);
  color: var(--lbt-ink);
  max-width: 480px;
  margin: 0 auto;
  padding: 18px 16px 30px;
  border-radius: 26px;
  box-sizing: border-box;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
.lbt-app *, .lbt-app *::before, .lbt-app *::after { box-sizing: border-box; }
.lbt-app h1, .lbt-app h2, .lbt-app h3, .lbt-app p, .lbt-app ul { margin: 0; }
.lbt-num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---------- Header ---------- */
.lbt-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 16px;
}
.lbt-brand { display: flex; align-items: center; gap: 10px; }
.lbt-logo {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  background: var(--lbt-grad);
  display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(255, 138, 0, 0.35);
}
.lbt-logo svg { width: 22px; height: 22px; }
.lbt-title { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.lbt-title small {
  display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--lbt-muted);
}
.lbt-reset {
  background: var(--lbt-surface); border: 1px solid var(--lbt-line);
  color: var(--lbt-muted); font: 600 12.5px/1 inherit; font-family: inherit;
  padding: 9px 14px; border-radius: 999px; cursor: pointer;
  transition: color 0.15s, border-color 0.15s, transform 0.1s;
}
.lbt-reset:hover, .lbt-reset:focus-visible { color: var(--lbt-ink); border-color: var(--lbt-line-strong); }
.lbt-reset:active { transform: scale(0.96); }

/* ---------- Tally hero card ---------- */
.lbt-tally {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(255, 138, 0, 0.16), transparent 55%),
    linear-gradient(180deg, var(--lbt-raised), var(--lbt-surface));
  border: 1px solid var(--lbt-line);
  border-radius: var(--lbt-r-lg);
  padding: 22px 18px 16px;
  margin-bottom: 16px;
  text-align: center;
  box-shadow: var(--lbt-shadow);
}
.lbt-tally-number {
  font-size: 68px; font-weight: 800; line-height: 1; letter-spacing: -0.03em;
  background: var(--lbt-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--lbt-amber);
}
.lbt-tally-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--lbt-muted); margin-top: 4px;
}
.lbt-glasses {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 7px;
  margin-top: 16px; min-height: 36px;
}
.lbt-glass { width: 23px; height: 34px; filter: drop-shadow(0 3px 5px rgba(0,0,0,0.35)); }
.lbt-glass-more {
  align-self: center; font-size: 12px; font-weight: 700; color: var(--lbt-muted);
  background: var(--lbt-raised); border: 1px solid var(--lbt-line);
  padding: 4px 9px; border-radius: 999px;
}
.lbt-substats {
  display: flex; justify-content: center; gap: 8px; margin-top: 16px;
}
.lbt-substat {
  flex: 1; max-width: 170px;
  background: rgba(15, 13, 10, 0.55); border: 1px solid var(--lbt-line);
  border-radius: var(--lbt-r-md); padding: 9px 8px 8px;
}
.lbt-substat b { display: block; font-size: 17px; font-weight: 800; }
.lbt-substat span {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--lbt-muted);
}

/* ---------- Search ---------- */
.lbt-search-wrap { position: relative; margin-bottom: 12px; }
.lbt-search-icon {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--lbt-muted); pointer-events: none;
}
.lbt-search {
  width: 100%; padding: 15px 44px 15px 42px;
  font: 400 16px/1.3 inherit; font-family: inherit;
  background: var(--lbt-surface); color: var(--lbt-ink);
  border: 1px solid var(--lbt-line); border-radius: var(--lbt-r-md);
  outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.lbt-search::placeholder { color: var(--lbt-muted); }
.lbt-search:focus {
  border-color: var(--lbt-amber-hot);
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.18);
}
.lbt-search::-webkit-search-cancel-button { -webkit-appearance: none; }
.lbt-search-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: var(--lbt-raised); border: 1px solid var(--lbt-line);
  color: var(--lbt-muted); font-size: 15px; line-height: 1;
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer; display: none;
}
.lbt-search-clear.lbt-show { display: block; }
.lbt-search-clear:hover { color: var(--lbt-ink); }

.lbt-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 40;
  background: var(--lbt-raised); border: 1px solid var(--lbt-line-strong);
  border-radius: var(--lbt-r-md); overflow: hidden auto;
  max-height: 300px; display: none;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
}
.lbt-suggest.lbt-show { display: block; animation: lbt-pop 0.16s ease-out; }
@keyframes lbt-pop {
  from { opacity: 0; transform: translateY(-4px) scale(0.99); }
  to { opacity: 1; transform: none; }
}
.lbt-suggest-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 12px 14px; color: var(--lbt-ink);
  font: 400 15.5px/1.3 inherit; font-family: inherit;
  border-bottom: 1px solid var(--lbt-line);
}
.lbt-suggest-item:last-child { border-bottom: none; }
.lbt-suggest-item:hover, .lbt-suggest-item.lbt-active { background: rgba(255, 179, 64, 0.08); }
.lbt-suggest-name { min-width: 0; }
.lbt-suggest-name b { color: var(--lbt-amber); font-weight: 700; }
.lbt-suggest-brewery { display: block; font-size: 12.5px; color: var(--lbt-muted); }
.lbt-suggest-abv {
  flex: none; font-size: 12.5px; font-weight: 700; color: var(--lbt-ink);
  background: var(--lbt-surface); border: 1px solid var(--lbt-line);
  padding: 5px 9px; border-radius: 999px;
}
.lbt-suggest-custom { color: var(--lbt-amber); font-weight: 700; }

/* ---------- Picker card ---------- */
.lbt-picker {
  background: var(--lbt-surface); border: 1px solid var(--lbt-line);
  border-radius: var(--lbt-r-lg); padding: 16px; margin-bottom: 16px;
  display: none; box-shadow: var(--lbt-shadow);
}
.lbt-picker.lbt-show { display: block; animation: lbt-pop 0.18s ease-out; }
.lbt-picked-head { display: flex; align-items: center; gap: 11px; }
.lbt-picked-badge {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 800; color: #2a1300;
  background: var(--lbt-grad);
}
.lbt-picked-name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.lbt-picked-meta { font-size: 13px; color: var(--lbt-muted); margin-top: 1px; }
.lbt-sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 4px; }
.lbt-size {
  background: var(--lbt-raised); border: 1.5px solid var(--lbt-line); border-radius: 12px;
  color: var(--lbt-ink); padding: 10px 2px 9px; cursor: pointer; text-align: center;
  font-family: inherit;
  transition: border-color 0.12s, background 0.12s, transform 0.08s;
}
.lbt-size:active { transform: scale(0.95); }
.lbt-size .lbt-oz { font-size: 16px; font-weight: 800; display: block; letter-spacing: -0.02em; }
.lbt-size .lbt-oz-label {
  font-size: 9.5px; font-weight: 600; color: var(--lbt-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.lbt-size.lbt-active {
  border-color: var(--lbt-amber-hot);
  background: rgba(255, 138, 0, 0.13);
}
.lbt-size.lbt-active .lbt-oz { color: var(--lbt-amber); }
.lbt-custom-row { display: none; gap: 8px; margin-top: 10px; }
.lbt-custom-row.lbt-show { display: flex; }
.lbt-custom-row input {
  flex: 1; padding: 12px; font: 400 16px inherit; font-family: inherit;
  background: var(--lbt-raised); color: var(--lbt-ink);
  border: 1px solid var(--lbt-line); border-radius: 12px; min-width: 0; outline: none;
}
.lbt-custom-row input:focus { border-color: var(--lbt-amber-hot); }
.lbt-preview { font-size: 13.5px; color: var(--lbt-muted); margin-top: 12px; min-height: 18px; }
.lbt-preview b { color: var(--lbt-amber); font-size: 15px; }
.lbt-add {
  width: 100%; margin-top: 12px; padding: 16px;
  font: 800 16px inherit; font-family: inherit; letter-spacing: -0.01em;
  background: var(--lbt-grad); color: #2a1300;
  border: none; border-radius: var(--lbt-r-md); cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 138, 0, 0.3);
  transition: transform 0.1s, box-shadow 0.15s, opacity 0.15s;
}
.lbt-add:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.lbt-add:not(:disabled):active { transform: scale(0.97); }

/* ---------- Session tab list ---------- */
.lbt-tab-head { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 2px 10px; }
.lbt-tab-title { font-size: 14px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lbt-muted); }
.lbt-tab-count { font-size: 13px; font-weight: 600; color: var(--lbt-muted); }
.lbt-empty {
  border: 1.5px dashed var(--lbt-line-strong); border-radius: var(--lbt-r-lg);
  padding: 26px 16px; text-align: center; color: var(--lbt-muted); font-size: 14.5px;
}
.lbt-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lbt-row {
  display: flex; align-items: center; gap: 11px;
  background: var(--lbt-surface); border: 1px solid var(--lbt-line);
  border-radius: var(--lbt-r-md); padding: 11px 12px;
  animation: lbt-pop 0.18s ease-out;
}
.lbt-row-badge {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800; color: #2a1300;
}
.lbt-row-main { flex: 1; min-width: 0; }
.lbt-row-name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbt-row-meta { font-size: 12.5px; color: var(--lbt-muted); }
.lbt-row-lbu { flex: none; text-align: right; font-size: 18px; font-weight: 800; color: var(--lbt-amber); }
.lbt-row-lbu small {
  display: block; font-size: 9px; font-weight: 700; color: var(--lbt-muted);
  letter-spacing: 0.12em;
}
.lbt-remove {
  flex: none; background: none; border: none; color: var(--lbt-muted);
  font-size: 17px; width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  transition: color 0.12s, background 0.12s;
}
.lbt-remove:hover, .lbt-remove:focus-visible { color: var(--lbt-red); background: rgba(255, 92, 73, 0.12); }

/* ---------- Toast ---------- */
.lbt-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(16px);
  z-index: 90; pointer-events: none; opacity: 0;
  background: var(--lbt-raised); border: 1px solid var(--lbt-line-strong);
  color: var(--lbt-ink); font: 700 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 12px 18px; border-radius: 999px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
  transition: opacity 0.2s, transform 0.2s;
}
.lbt-toast b { color: var(--lbt-amber); }
.lbt-toast.lbt-show { opacity: 1; transform: translateX(-50%) translateY(0); }

.lbt-footnote { margin-top: 18px; font-size: 11.5px; color: var(--lbt-muted); text-align: center; line-height: 1.5; }

/* Accessibility */
.lbt-app button:focus-visible, .lbt-app input:focus-visible {
  outline: 2px solid var(--lbt-amber); outline-offset: 2px;
}
.lbt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .lbt-app *, .lbt-toast { transition: none !important; animation: none !important; }
}

@media (min-width: 420px) {
  .lbt-tally-number { font-size: 76px; }
  .lbt-glass { width: 25px; height: 37px; }
}
