/* Light Beer Unit Tracker — mobile-first styles
   Scoped under .lbt-root so the plugin won't fight your theme. */

.lbt-root {
  --lbt-bg: #0c0a09;
  --lbt-panel: #1c1917;
  --lbt-panel-2: #292524;
  --lbt-border: #44403c;
  --lbt-text: #f5f5f4;
  --lbt-muted: #a8a29e;
  --lbt-faint: #78716c;
  --lbt-accent: #f59e0b;
  --lbt-accent-ink: #0c0a09;

  box-sizing: border-box;
  display: block;
  max-width: 460px;
  margin: 0 auto;
  padding: 22px 20px 40px;
  background: var(--lbt-bg);
  color: var(--lbt-text);
  border-radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.4;
}
.lbt-root *,
.lbt-root *::before,
.lbt-root *::after { box-sizing: border-box; }

.lbt-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* Header */
.lbt-eyebrow {
  color: var(--lbt-accent);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin: 0;
}
.lbt-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 4px 0 0;
  color: #fafaf9;
}
.lbt-sub {
  color: var(--lbt-muted);
  font-size: 14px;
  margin: 4px 0 0;
}

/* Hero readout */
.lbt-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  padding: 18px;
  background: var(--lbt-panel);
  border: 1px solid var(--lbt-border);
  border-radius: 18px;
}
.lbt-hero-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
}
.lbt-hero-label { color: var(--lbt-muted); font-size: 14px; margin-top: 4px; }

.lbt-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.lbt-stat {
  background: rgba(68, 64, 60, 0.5);
  border-radius: 10px;
  padding: 8px 4px;
  text-align: center;
}
.lbt-stat-v {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
}
.lbt-stat-l {
  color: var(--lbt-faint);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* Pacing & sobering */
.lbt-pace {
  margin-top: 14px;
  padding: 16px;
  background: var(--lbt-panel);
  border: 1px solid var(--lbt-border);
  border-radius: 18px;
}
.lbt-pace-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lbt-pace-k {
  color: var(--lbt-faint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.lbt-pace-v {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 24px;
  color: var(--lbt-text);
  margin-top: 2px;
  line-height: 1.1;
}
.lbt-pace-u {
  font-size: 13px;
  color: var(--lbt-faint);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.lbt-pace-sub { color: var(--lbt-faint); font-size: 12px; margin-top: 3px; }
.lbt-pace-note {
  color: var(--lbt-faint);
  font-size: 11px;
  line-height: 1.5;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--lbt-border);
}
.lbt-pace-note b { color: var(--lbt-muted); font-weight: 600; }

/* Sections */
.lbt-section { margin-top: 24px; }
.lbt-label { font-size: 14px; font-weight: 600; color: #e7e5e4; }
.lbt-row { display: flex; align-items: center; justify-content: space-between; }

/* Search */
.lbt-search-wrap { position: relative; margin-top: 8px; }
.lbt-input {
  width: 100%;
  background: var(--lbt-panel);
  border: 1px solid var(--lbt-border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--lbt-text);
  font-size: 16px; /* 16px avoids iOS zoom-on-focus */
  outline: none;
}
.lbt-input::placeholder { color: var(--lbt-faint); }
.lbt-input:focus { border-color: var(--lbt-accent); }

.lbt-dropdown {
  position: absolute;
  z-index: 30;
  left: 0; right: 0;
  margin-top: 8px;
  background: var(--lbt-panel);
  border: 1px solid var(--lbt-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  list-style: none;
  padding: 0;
}
.lbt-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  background: none;
  border: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-size: 15px;
}
.lbt-opt:hover, .lbt-opt:focus { background: var(--lbt-panel-2); }
.lbt-opt-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbt-opt-meta { display: block; color: var(--lbt-faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbt-opt-abv { color: var(--lbt-accent); font-family: ui-monospace, monospace; font-size: 14px; flex-shrink: 0; }
.lbt-opt-custom { color: var(--lbt-accent); font-size: 14px; border-top: 1px solid var(--lbt-border); }

/* Custom ABV row */
.lbt-custom-abv { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.lbt-custom-abv span { font-size: 14px; color: #e7e5e4; }
.lbt-mini-input {
  width: 110px;
  background: var(--lbt-panel);
  border: 1px solid var(--lbt-border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--lbt-text);
  font-family: ui-monospace, monospace;
  font-size: 16px;
  outline: none;
}
.lbt-mini-input:focus { border-color: var(--lbt-accent); }

/* Size chips */
.lbt-sizes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.lbt-chip {
  padding: 9px 16px;
  border-radius: 9px;
  border: 1px solid var(--lbt-border);
  background: var(--lbt-panel);
  color: #e7e5e4;
  font-family: ui-monospace, monospace;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.lbt-chip:hover { border-color: var(--lbt-faint); }
.lbt-chip.is-active {
  background: var(--lbt-accent);
  border-color: var(--lbt-accent);
  color: var(--lbt-accent-ink);
  font-weight: 600;
}
.lbt-size-input {
  width: 78px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--lbt-border);
  background: var(--lbt-panel);
  color: var(--lbt-text);
  font-family: ui-monospace, monospace;
  font-size: 16px;
  outline: none;
}
.lbt-size-input.is-active { border-color: var(--lbt-accent); }
.lbt-preview { font-family: ui-monospace, monospace; font-size: 12px; color: var(--lbt-muted); }

/* Add button */
.lbt-add {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: var(--lbt-accent);
  color: var(--lbt-accent-ink);
  transition: background 0.15s;
}
.lbt-add:hover { background: #fbbf24; }
.lbt-add:disabled {
  background: var(--lbt-panel-2);
  color: var(--lbt-faint);
  cursor: not-allowed;
}

/* Session list */
.lbt-list-head { display: flex; align-items: center; justify-content: space-between; }
.lbt-clear {
  background: none; border: none; cursor: pointer;
  color: var(--lbt-faint); font-size: 14px;
}
.lbt-clear:hover { color: var(--lbt-accent); }

.lbt-empty {
  margin-top: 12px;
  padding: 28px 12px;
  text-align: center;
  color: var(--lbt-faint);
  font-size: 14px;
  border: 1px dashed var(--lbt-border);
  border-radius: 12px;
}

.lbt-list { list-style: none; padding: 0; margin: 12px 0 0; }
.lbt-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  margin-bottom: 8px;
  background: var(--lbt-panel);
  border: 1px solid var(--lbt-border);
  border-radius: 12px;
}
.lbt-item-main { flex: 1; min-width: 0; }
.lbt-item-name { color: var(--lbt-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbt-item-meta { color: var(--lbt-faint); font-size: 12px; font-family: ui-monospace, monospace; }
.lbt-item-units { text-align: right; flex-shrink: 0; }
.lbt-item-units b { font-family: ui-monospace, monospace; font-weight: 600; }
.lbt-item-units span { display: block; color: var(--lbt-faint); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.lbt-remove {
  width: 28px; height: 28px;
  flex-shrink: 0;
  background: none; border: none; cursor: pointer;
  color: var(--lbt-faint); font-size: 22px; line-height: 1;
}
.lbt-remove:hover { color: #f87171; }

.lbt-footer {
  margin-top: 32px;
  color: var(--lbt-faint);
  font-size: 12px;
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  .lbt-root * { transition: none !important; }
}
