/* The app's identity on the web: the Material Theme Builder colors
   (app/lib/theme/material_theme.dart), Plus Jakarta Sans, cards on a
   tinted page, pill buttons, bottom sheets — and the delivery apps' cart
   usability: items with steppers, a bottom bar with the total. */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/plus-jakarta-sans-latin.woff2?v=cb322c21) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/plus-jakarta-sans-latin-ext.woff2?v=cb322c21) format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Only the icons the page uses (Material Symbols Rounded, Apache 2.0). */
@font-face {
  font-family: "Material Symbols Rounded";
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url(fonts/material-symbols-rounded.woff2?v=cb322c21) format("woff2");
}

:root {
  color-scheme: light;
  --primary: #3e6700;
  --on-primary: #ffffff;
  --primary-fixed: #b2f65f;
  --on-primary-fixed: #102000;
  --secondary-container: #cceea1;
  --on-secondary-container: #516d2f;
  --tertiary-fixed: #7cf9cb8c;
  --on-tertiary-fixed-variant: #00513c;
  --error: #ba1a1a;
  --on-error: #ffffff;
  --error-container: #ffdad6;
  --on-error-container: #93000a;
  --warning-container: #ffe7cc;
  --pending: #f5b70a;
  --on-pending: #3a2c00;
  --on-warning-container: #6b3a00;
  --surface: #f7fbea;
  --on-surface: #191d13;
  --on-surface-variant: #424937;
  --outline: #727a66;
  --outline-variant: #c2cab2;
  --container-lowest: #ffffff;
  --container-low: #f2f5e5;
  --container: #ecf0df;
  --container-high: #e6eada;
  --container-highest: #e0e4d4;
  --inverse-surface: #2e3227;
  --inverse-on-surface: #eff2e2;
  --scrim: rgb(0 0 0 / 0.32);
  --shadow: 0 -4px 24px rgb(25 29 19 / 0.08);
  --radius-card: 20px;
  --radius-sheet: 28px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --primary: #97d945;
    --on-primary: #1f3700;
    --primary-fixed: #b2f65f;
    --on-primary-fixed: #102000;
    --secondary-container: #365016;
    --on-secondary-container: #a3c37b;
    --tertiary-fixed: #00513c;
    --on-tertiary-fixed-variant: #7cf9cb;
    --error: #ffb4ab;
    --on-error: #690005;
    --error-container: #93000a;
    --on-error-container: #ffdad6;
    --warning-container: #5a3300;
    --on-warning-container: #ffdcb8;
    --surface: #11150b;
    --on-surface: #e0e4d4;
    --on-surface-variant: #c2cab2;
    --outline: #8c947e;
    --outline-variant: #424937;
    --container-lowest: #0b0f07;
    --container-low: #191d13;
    --container: #1d2117;
    --container-high: #272b21;
    --container-highest: #32362b;
    --inverse-surface: #e0e4d4;
    --inverse-on-surface: #2e3227;
    --shadow: 0 -4px 24px rgb(0 0 0 / 0.4);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--container-low);
  color: var(--on-surface);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.4;
}

@media (prefers-color-scheme: dark) {
  body {
    background: var(--surface);
  }
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.ms {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* Top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--container-low);
  padding: env(safe-area-inset-top) 16px 0;
}

@media (prefers-color-scheme: dark) {
  .topbar {
    background: var(--surface);
  }
}

.topbar-inner {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.logo {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--primary);
  color: var(--on-primary);
  display: grid;
  place-items: center;
}

.logo .ms {
  font-size: 28px;
}

.topbar-text {
  min-width: 0;
  flex: 1;
}

/* The language switcher, at the top bar's end. */
.language-button {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  padding: 0 12px;
  border: 1.5px solid var(--outline-variant);
  border-radius: 20px;
  background: transparent;
  color: var(--on-surface);
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.language-button .ms {
  font-size: 18px;
}

.language-options {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.language-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 16px;
  border: 1.5px solid var(--outline-variant);
  border-radius: 14px;
  background: transparent;
  color: var(--on-surface);
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  text-align: start;
  cursor: pointer;
}

/* A container color that follows the theme (primary-fixed stays bright in
   dark mode, under light text). */
.language-option.selected {
  border-color: var(--primary);
  background: var(--secondary-container);
  color: var(--on-surface);
}

.language-option .ms {
  color: var(--primary);
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-subtitle {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar-subtitle:empty {
  display: none;
}

.topbar-subtitle.muted {
  color: var(--on-surface-variant);
}

.topbar-subtitle .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.topbar-subtitle .ms {
  font-size: 16px;
}

.topbar-place {
  color: var(--on-surface);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Layout */

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 4px 16px 24px;
}

main.with-bottom-bar {
  padding-bottom: 136px;
}

.loading {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  padding: 48px 0;
  color: var(--on-surface-variant);
}

.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid var(--container-highest);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 3s;
  }
}

.card {
  background: var(--container-lowest);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-bottom: 12px;
}

@media (prefers-color-scheme: dark) {
  .card {
    background: var(--container);
  }
}

.card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
}

.card-title small {
  font-size: 13px;
  font-weight: 600;
  color: var(--on-surface-variant);
}

/* The bill's photo: the button in the items card. */
.photo-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 12px;
  padding: 6px 12px;
  border: 1.5px solid var(--outline-variant);
  border-radius: 20px;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.photo-button .ms {
  font-size: 18px;
}

/* The photo panel (showPhoto in app.js): over the top half of the page,
   with the bill scrolling under it, or all of it. It takes the top bar's
   place, keeping a slim bar of its own. */
.photo-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  height: 50vh;
  height: 50dvh;
  background: var(--container-highest);
  border-bottom: 1px solid var(--outline-variant);
  box-shadow: 0 4px 24px rgb(0 0 0 / 0.12);
}

body.photo-full .photo-panel {
  height: 100vh;
  height: 100dvh;
}

body.photo-half .topbar,
body.photo-full .topbar {
  display: none;
}

body.photo-half main {
  margin-top: 50vh;
  margin-top: 50dvh;
}

/* Full: nothing behind it moves. */
body.photo-full {
  overflow: hidden;
}

.photo-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 52px;
  padding: max(4px, env(safe-area-inset-top)) 8px 4px 16px;
}

.photo-bar > .ms {
  color: var(--primary);
  font-size: 20px;
}

.photo-bar strong {
  flex: 1;
  margin-left: 4px;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-bar .icon-btn {
  color: var(--on-surface);
  text-decoration: none;
  cursor: pointer;
}

/* Scrolls on its own: reaching its end doesn't scroll the page. Pinching
   is handled in app.js (the page itself doesn't zoom). */
.photo-viewport {
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
  background: var(--container);
}

.photo-viewport img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0 auto;
  user-select: none;
  -webkit-user-select: none;
}

/* Notices */

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 14px;
}

.notice .ms {
  font-size: 20px;
  flex: none;
}

.notice.info {
  background: var(--container-high);
  color: var(--on-surface-variant);
}

.notice.success {
  background: var(--primary-fixed);
  color: var(--on-primary-fixed);
}

.notice.warning {
  background: var(--warning-container);
  color: var(--on-warning-container);
}

.notice.error {
  background: var(--error-container);
  color: var(--on-error-container);
}

/* Join */

.join {
  text-align: center;
  padding: 28px 20px 24px;
}

.join .logo {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  margin: 0 auto 16px;
}

.join .logo .ms {
  font-size: 44px;
}

.join h2 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.join p.lead {
  margin: 0 auto 20px;
  max-width: 340px;
  color: var(--on-surface-variant);
}

.join form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--on-surface-variant);
  margin: 0 0 6px 4px;
}

.field input {
  width: 100%;
  border: 1.5px solid var(--outline-variant);
  border-radius: 14px;
  background: var(--container-lowest);
  padding: 14px 16px;
  font-size: 16px;
}

@media (prefers-color-scheme: dark) {
  .field input {
    background: var(--container-low);
  }
}

.field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.field .error-text {
  color: var(--error);
  font-size: 13px;
  font-weight: 600;
  margin: 6px 0 0 4px;
}

.field .hint-text {
  color: var(--on-surface-variant);
  font-size: 13px;
  margin: 6px 0 0 4px;
}

.join-people {
  margin: 20px 0 0;
  text-align: left;
}

.join-people-title {
  margin: 0 0 8px 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--on-surface-variant);
}

.join-people-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.join-person {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: var(--container-low);
  font-size: 14px;
  font-weight: 600;
}

.join p.join-other {
  margin: 16px auto 0;
  max-width: 320px;
  font-size: 13px;
  color: var(--on-surface-variant);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--outline-variant);
  background: transparent;
  border-radius: 12px;
  padding: 6px 12px 6px 6px;
  font-weight: 600;
}

.chip.plain {
  padding: 8px 14px;
}

.chip[aria-pressed="true"] {
  background: var(--secondary-container);
  border-color: var(--secondary-container);
  color: var(--on-secondary-container);
}

.chip:hover {
  background: var(--container-high);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  font-size: 15px;
}

.btn:disabled {
  opacity: 0.5;
}

.btn.tonal {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

.btn.text {
  background: transparent;
  color: var(--primary);
}

.btn.danger {
  background: transparent;
  color: var(--error);
}

.btn.block {
  width: 100%;
}

.icon-btn {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--on-surface-variant);
  display: grid;
  place-items: center;
}

.icon-btn:hover:not(:disabled) {
  background: var(--container-high);
}

.icon-btn:disabled {
  opacity: 0.38;
}

/* The bottom bar's round "Pronto" button, like the app's */

.round-btn {
  position: relative;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: var(--on-primary);
  display: grid;
  place-items: center;
}

.round-btn.tonal {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

.round-btn.outlined {
  background: transparent;
  color: var(--primary);
  box-shadow: inset 0 0 0 2px var(--primary);
}

.btn.danger-filled {
  background: var(--error);
  color: var(--on-error);
}

/* The quick actions above the items, as tiles, like the app's */

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 6px;
  border: none;
  border-radius: 16px;
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}

.quick-action:hover:not(:disabled) {
  filter: brightness(0.96);
}

.quick-action:active:not(:disabled) {
  transform: scale(0.97);
}

.quick-action:disabled {
  opacity: 0.45;
  cursor: default;
}

.quick-action .ms {
  font-size: 24px;
}

/* "Dividir igual": what the guest's part comes to, or why it can't be done */

.sheet .notice {
  margin: 20px 0 8px;
}

.split-preview {
  margin: 20px 0 8px;
  padding: 16px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--primary-fixed) 45%, transparent);
  font-size: 17px;
  font-weight: 800;
}

.tag .ms {
  font-size: 12px;
  vertical-align: -2px;
  margin-right: 2px;
}

/* Items, like a delivery app's cart */

.item {
  padding: 14px 0;
  border-bottom: 1px solid var(--outline-variant);
}

.item:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}

.item-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.item-icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--container-high);
  color: var(--on-surface-variant);
}

.item-icon.drink {
  background: var(--tertiary-fixed);
  color: var(--on-tertiary-fixed-variant);
}

.item-icon.food {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

.item-main {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.item-meta {
  font-size: 13px;
  color: var(--on-surface-variant);
  margin-top: 2px;
}

.item-claimers {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--on-surface-variant);
  min-width: 0;
}

.item-claimers span.names {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-price {
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
}

.item-price small {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}

.item-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0 60px;
}

.item-progress {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--on-warning-container);
  white-space: nowrap;
}

.item-progress.complete {
  color: var(--primary);
}

.item-progress .ms {
  font-size: 16px;
}

.bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--container-highest);
  overflow: hidden;
  min-width: 32px;
}

.bar > span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: #e08a00;
  transition: width 0.25s;
}

.complete .bar > span,
.bar.primary > span {
  background: var(--primary);
}

.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  background: var(--container-high);
  color: var(--on-surface-variant);
  vertical-align: 2px;
}

.tag.primary {
  background: var(--primary-fixed);
  color: var(--on-primary-fixed);
}

.stepper {
  flex: none;
  display: flex;
  align-items: center;
  height: 40px;
  border-radius: 20px;
  background: var(--container-high);
  color: var(--on-surface-variant);
}

.stepper.active {
  background: var(--primary-fixed);
  color: var(--on-primary-fixed);
}

.stepper button {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: inherit;
}

.stepper button.up {
  color: var(--primary);
}

.stepper.active button.up {
  color: var(--on-primary-fixed);
}

.stepper button:disabled {
  opacity: 0.38;
}

.stepper button .ms {
  font-size: 20px;
}

.stepper .amount {
  min-width: 24px;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
}

/* People */

.avatar {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
}

.avatar.small {
  width: 22px;
  height: 22px;
  font-size: 10px;
}

/* Someone who said "Pronto": a check on their initial. */
.avatar-done {
  position: relative;
  flex: none;
  display: inline-grid;
}

.avatar-check {
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 0 0 2px var(--container-lowest);
  display: grid;
  place-items: center;
}

.avatar-check .ms {
  font-size: 11px;
}

.avatar-check.pending {
  background: var(--pending);
  color: var(--on-pending);
}

/* Over the people: the bill's total, what's picked, what's left. */
.bill-summary {
  display: grid;
  gap: 8px;
  padding-bottom: 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--outline-variant);
}

.summary-figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.summary-figure span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--on-surface-variant);
}

.summary-figure strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}

.summary-figure.picked strong {
  color: var(--primary);
}

.summary-figure.left strong {
  color: var(--error);
}

.summary-progress {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--on-surface-variant);
}

.summary-progress.done {
  color: var(--primary);
  font-weight: 700;
}

.summary-progress.done .ms {
  font-size: 16px;
}

.avatar-stack {
  display: inline-flex;
}

.avatar-stack .avatar {
  box-shadow: 0 0 0 2px var(--container-lowest);
}

.avatar-stack .avatar + .avatar {
  margin-left: -6px;
}

.person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.person-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.person-total {
  font-weight: 700;
}

/* Totals breakdown */

.amount-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  color: var(--on-surface-variant);
}

.amount-row.discount {
  color: var(--primary);
}

.amount-row.total {
  border-top: 1px solid var(--outline-variant);
  margin-top: 6px;
  padding-top: 12px;
  color: var(--on-surface);
  font-weight: 800;
  font-size: 18px;
}

/* Bottom total bar */

.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  background: var(--container-lowest);
  box-shadow: var(--shadow);
  border-radius: 24px 24px 0 0;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
}

@media (prefers-color-scheme: dark) {
  .bottom-bar {
    background: var(--container);
  }
}

.bottom-bar-inner {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.bottom-bar-total {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  padding: 0;
  text-align: left;
}

.bottom-bar-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--on-surface-variant);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-bar-amount {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

/* The count of this guest's items, with the arrow that opens them. */
.amount-pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 2px 0 9px;
  border-radius: 13px;
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.amount-pill .ms {
  font-size: 22px;
}

.bottom-bar-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--on-surface-variant);
  margin-top: 4px;
}

.bottom-bar-progress.done {
  color: var(--primary);
}

.bottom-bar-progress.done .ms {
  font-size: 16px;
}

/* A confirm sheet's figures ("Pegar o que falta?"). */
.sheet-summary {
  display: flex;
  margin: 4px 0 16px;
  padding: 14px 8px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--primary-fixed) 45%, transparent);
  color: var(--on-primary-fixed);
  text-align: center;
}

.sheet-summary > div {
  flex: 1;
}

.sheet-summary-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.sheet-summary strong {
  font-size: 22px;
  font-weight: 800;
}

/* Bottom sheets */

dialog.sheet {
  position: fixed;
  inset: auto 0 0 0;
  margin: 0 auto;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  border: none;
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  padding: 0;
  background: var(--container-low);
  color: var(--on-surface);
  overflow: auto;
}

dialog.sheet::backdrop {
  background: var(--scrim);
}

dialog.sheet[open] {
  animation: sheet-up 0.22s ease-out;
}

@keyframes sheet-up {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog.sheet[open] {
    animation: none;
  }
}

.sheet-handle {
  width: 32px;
  height: 4px;
  border-radius: 2px;
  background: var(--outline-variant);
  margin: 12px auto 4px;
}

.sheet-body {
  padding: 8px 24px calc(24px + env(safe-area-inset-bottom));
}

.sheet h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
}

.sheet .sheet-subtitle {
  margin: 0 0 16px;
  color: var(--on-surface-variant);
}

.sheet h3 {
  margin: 20px 0 10px;
  font-size: 14px;
  font-weight: 700;
}

.sheet .chips {
  justify-content: flex-start;
}

.sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}

.my-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.my-item .item-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.my-item .item-icon .ms {
  font-size: 22px;
}

.my-item-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
}

.my-item-name .tag {
  margin-left: 6px;
}

/* Toast (snackbar) */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(150px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 20;
  width: max-content;
  max-width: calc(100% - 32px);
  background: var(--inverse-surface);
  color: var(--inverse-on-surface);
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.2);
}

/* The app's pitch, at the bottom of the page */

.promo {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

.promo .logo {
  width: 40px;
  height: 40px;
}

.promo strong {
  display: block;
  color: var(--on-surface);
}

.promo p {
  margin: 0;
  font-size: 13px;
}

.promo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 4px;
}

.promo a.promo-privacy,
.promo a.promo-download {
  display: inline-block;
  font-size: 12px;
  color: inherit;
}

.promo a.promo-download {
  font-weight: 700;
}

/* After picking: the invite to host next time, with a real button. */
.promo.invite {
  align-items: flex-start;
  padding: 20px;
}

.promo.invite strong {
  font-size: 17px;
}

.promo.invite p {
  margin: 4px 0 12px;
  font-size: 14px;
}

.promo .promo-download-btn {
  min-height: 44px;
  padding: 0 20px;
  text-decoration: none;
}

/* A space for an ad (placeholder until real ads). */
.ad-slot {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  margin-top: 20px;
  min-height: 250px;
  border-radius: var(--radius-card);
  border: 1px solid var(--outline-variant);
  background: var(--container-low);
  color: var(--on-surface-variant);
  font-size: 13px;
}

.ad-slot .ad-label {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--outline-variant);
  font-size: 11px;
  font-weight: 700;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
