﻿/* Listas compartilhadas, ranking de lojas, pedido pelo WhatsApp, gastos, código de barras, Comparei+ */

/* ---------- Lista: cabeçalho, compartilhada ---------- */

.lists-head-actions { display: flex; gap: 8px; flex: none; }
.lists-chip__shared { display: inline-flex; color: var(--muted); }
.lists-chip.chip--active .lists-chip__shared { color: var(--on-brand-muted); }
.lists-owner { display: flex; align-items: center; gap: 6px; margin: -4px 4px 14px; font-size: 13px; color: var(--ink-2); }
.lists-owner .icon { flex: none; color: var(--muted); }
.list-tools { flex-wrap: wrap; }

/* ---------- Onde comprar: ranking ---------- */

.plan__total .eyebrow { margin-bottom: -4px; }
.store-ranking { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.store-ranking__row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
    row-gap: 6px;
    padding: 12px 14px 12px 10px;
}
.store-ranking__row + .store-ranking__row { border-top: 1px solid var(--line); }
.store-ranking__row--best { background: color-mix(in srgb, var(--save) 7%, var(--surface)); }
.store-ranking__pos { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; }
.store-ranking__row--best .store-ranking__pos { color: var(--save); }
.store-ranking__store { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 44px; }
.store-ranking__store .store-avatar { width: 32px; height: 32px; border-radius: 10px; font-size: 11.5px; flex: none; }
.store-ranking__body { display: flex; flex-direction: column; min-width: 0; }
.store-ranking__name { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-ranking__meta { font-size: 12.5px; color: var(--muted); }
.store-ranking__missing { color: var(--up); }
.store-ranking__end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.store-ranking__diff { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--up); }
.store-ranking__diff--muted { font-family: var(--font-body); font-weight: 500; color: var(--muted); }
.store-ranking__order {
    grid-column: 2 / -1;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: var(--r-pill);
    border: 1px solid var(--line-strong);
    background: var(--surface);
    font-size: 13px;
    font-weight: 600;
    color: var(--save);
    position: relative;
}
.store-ranking__order::after { content: ""; position: absolute; inset: -4px 0; } /* área de toque ≥ 44px */
.lists-order-btn { margin-top: 12px; color: var(--save); }

/* ---------- Dividir em 2 lojas ---------- */

.list-split { margin-top: 18px; }
.list-split__summary { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 0 4px 14px; }
.list-split__summary > div { display: flex; flex-direction: column; gap: 6px; }
.list-split__stores { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) { .list-split__stores { grid-template-columns: 1fr 1fr; } }
.list-split__store { padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.list-split__head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--line-strong); }
.list-split__head .store-avatar { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; flex: none; }
.list-split__head-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-split__name { font-weight: 650; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-split__meta { font-size: 12px; color: var(--muted); }
.list-split__items { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.list-split__items li { display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; }
.list-split__qty { flex: none; min-width: 34px; font-size: 12px; color: var(--muted); }
.list-split__item { min-width: 0; overflow-wrap: anywhere; }
.list-split__single { margin: 18px 4px 6px; font-size: 14px; color: var(--ink-2); }

.list-split--locked { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.list-split__teaser { font-size: 14px; color: var(--ink-2); margin: 0 4px; }
.list-split__blur { filter: blur(9px); user-select: none; margin: 0 4px; }
.list-split__hint { display: flex; align-items: center; gap: 6px; margin: 0 4px 4px; font-size: 13px; color: var(--ink-2); }
.list-split--locked .btn { margin-top: 2px; }

/* ---------- Compartilhar / entrar ---------- */

.list-share__intro { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.list-share__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--brand-tint); color: var(--brand); }
.list-share__code {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 16px;
    border-radius: var(--r-md);
    background: var(--tag-soft);
    border: 1px dashed var(--tag-deep);
    text-align: center;
}
.list-share__code strong { font-size: 30px; letter-spacing: .12em; color: var(--ink); }
.list-share__count { margin-top: 4px; }
.list-members { list-style: none; margin: 0; padding: 0; }
.list-members__row { min-height: 56px; padding: 8px 12px; }
.list-members__avatar { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-tint-2); color: var(--brand); font-weight: 700; }
.list-members__remove { min-height: 36px; padding: 0 12px; font-size: 13px; color: var(--up); }

.list-join { display: flex; flex-direction: column; gap: 12px; }
.list-join__input { font-size: 22px; letter-spacing: .14em; text-transform: uppercase; text-align: center; }
.list-join__error { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--up); }

/* ---------- Pedido pelo WhatsApp ---------- */


/* ---------- Meus gastos ---------- */

.spending-month { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; }
.spending-month .icon-btn:disabled { opacity: .35; }
.spending-month__label { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.spending-month__label strong { font-family: var(--font-display); font-size: 19px; font-weight: 650; letter-spacing: -.015em; }
.spending-month__label span { font-size: 12.5px; color: var(--muted); }
.spending-lock { margin: -4px 0 12px; }
.spending-body { transition: opacity .2s; }

.spending-hero { display: flex; flex-direction: column; gap: 8px; }
.spending-hero__total { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 14px; }
.spending-hero__change { display: inline-flex; align-items: center; gap: 6px; padding-bottom: 10px; }
.spending-hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.spending-hero__stats div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.spending-hero__stats .mono { font-size: 15px; font-weight: 600; color: var(--ink); }
.spending-hero__stats span:last-child { font-size: 12px; color: var(--muted); }

.spending-save {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: var(--r-md);
    background: var(--save-soft);
    color: var(--ink);
    font-size: 13.5px;
}
.spending-save > .icon:first-child { flex: none; color: var(--save); }
.spending-save strong { color: var(--save); }
.spending-save > span { flex: 1; }

.spending-bars { display: flex; flex-direction: column; gap: 16px; }
.spending-bar { display: flex; flex-direction: column; gap: 6px; }
.spending-bar__top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.spending-bar__label { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spending-bar__value { flex: none; font-size: 13px; font-weight: 600; }
.spending-bar__track { height: 10px; border-radius: 99px; background: var(--surface-sunk); overflow: hidden; }
.spending-bar__track i { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width .4s var(--ease-out); }
.spending-bar:first-child .spending-bar__track i { background: var(--tag-deep); }
.spending-bar__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }

.spending-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.spending-kind { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px 14px; }
.spending-kind__icon { grid-row: span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--brand-tint); color: var(--brand); }
.spending-kind__name { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.spending-kind__value { font-size: 14px; font-weight: 600; }
.spending-kind__share { grid-column: 2; font-size: 12px; color: var(--muted); }

.spending-amount { font-size: 13.5px; font-weight: 600; }
.spending-item__emoji { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--surface-sunk); font-size: 19px; line-height: 1; }

.spending-trend { display: flex; align-items: stretch; gap: 6px; height: 190px; padding: 14px 12px 12px; }
.spending-trend__col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; border-radius: 12px; padding: 4px 0; }
.spending-trend__col:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }
.spending-trend__value { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.spending-trend__bar { flex: 1; width: 100%; max-width: 34px; display: flex; align-items: flex-end; }
.spending-trend__bar i { display: block; width: 100%; min-height: 3px; border-radius: 8px 8px 3px 3px; background: var(--brand-tint-2); transition: height .4s var(--ease-out); }
.spending-trend__col--on .spending-trend__bar i { background: var(--brand); }
.spending-trend__col--on .spending-trend__value { color: var(--ink); font-weight: 600; }
.spending-trend__label { font-size: 12px; color: var(--ink-2); text-transform: capitalize; }
.spending-trend__col--on .spending-trend__label { font-weight: 700; color: var(--ink); }

/* Perfil: atalho para Meus gastos */
.spending-shortcut { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px 16px; color: var(--ink); }
.spending-shortcut__icon { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 13px; background: var(--brand-tint); color: var(--brand); }
.spending-shortcut__text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.spending-shortcut__text strong { font-size: 15px; color: var(--ink); }

/* ---------- Código de barras ---------- */

.search-row { display: flex; gap: 8px; align-items: center; }
.search-row .search { flex: 1; min-width: 0; }
.search-row__barcode {
    display: grid;
    place-items: center;
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    color: var(--ink);
}
.search-row__barcode:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }

.barcode-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 6px 8px 18px; }
.barcode-hero__icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--tag); color: var(--on-tag); transform: rotate(-4deg); margin-bottom: 4px; }
.barcode-hero p { font-size: 14px; max-width: 320px; }
.barcode-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.barcode-form__row { display: flex; gap: 8px; }
.barcode-form__input { flex: 1; min-width: 0; font-size: 17px; letter-spacing: .06em; }
.barcode-form__row .btn { min-height: 52px; flex: none; }
.barcode-error { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; padding: 12px 14px; border-radius: var(--r-md); background: var(--up-soft); color: var(--ink); font-size: 14px; }
.barcode-error .icon { flex: none; margin-top: 2px; color: var(--up); }

.barcode-result { margin-top: 18px; overflow: hidden; }
.barcode-result__best { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--save) 6%, var(--surface)); }
.barcode-result__prices { list-style: none; margin: 0; padding: 4px 16px 8px; }
.barcode-result__prices li { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; }
.barcode-result__prices li + li { border-top: 1px solid var(--line); }
.barcode-result__store { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barcode-result__empty { padding: 12px 16px; font-size: 14px; border-top: 1px solid var(--line); }
.barcode-result__cta { padding: 4px 16px 16px; }

/* ---------- Comparei+: teste grátis ---------- */

.plus-trial { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; padding: 16px; border-radius: var(--r-lg); background: var(--brand-tint); border: 1px solid var(--brand-tint-2); }
.plus-trial__title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15.5px; color: var(--ink); }
.plus-trial__title .icon { color: var(--brand); }
.plus-trial__text { font-size: 13.5px; color: var(--ink-2); margin-bottom: 4px; }
.plus-or { text-align: center; margin: 0 0 10px; }
