/* =========================================================
   sacola.css — organização da sacola do cliente (menu.html)
   Blocos "Seus dados" e "Como receber", botões de tipo com ícone,
   observação recolhida e o resumo de valores como um recibo.
   Usa as variáveis dos temas (--line, --primary, --primary-soft...),
   então funciona no Clássico, Chocolate escuro e Chocolate branco.
   Carregado depois de temas.css / temas-ajustes.css / entrega-menu.css.
   ========================================================= */

/* título + quantidade */
.sc-topo { display: flex; align-items: baseline; gap: 10px; padding-right: 44px; margin-bottom: 4px; }
.sheet-body .sc-topo h2 { margin: 0; padding: 0; }
.sc-qtd { font-size: .85rem; font-weight: 600; opacity: .6; white-space: nowrap; }

/* itens mais compactos: preço e "Alterar" na mesma linha */
.sc-itens .cart-line { padding: 12px 0; }
.sc-itens .cart-line-main strong { font-size: 1rem; line-height: 1.3; }
.sc-preco { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.sc-itens .cart-line-main .sc-preco span { margin-top: 0; }
.sc-preco .cart-edit { margin: 0; padding: 3px 10px; font-size: .75rem; }
.sc-itens .cart-line:last-child { border-bottom: 0; }

/* blocos */
.sheet-body .order-fields { padding-top: 6px; display: flex; flex-direction: column; gap: 12px; }
.sc-bloco { border: 1px solid var(--line); border-radius: 18px; padding: 14px 14px 4px; background: color-mix(in srgb, var(--ink, #241b16) 2.5%, transparent); }
.sc-tit { margin: 0 0 10px; font-family: inherit; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .6; }
.sc-bloco .field { margin-bottom: 10px; }
.sc-bloco .field > label { font-size: .78rem; }
.sc-dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sc-dupla .field { min-width: 0; }
@media (max-width: 340px) { .sc-dupla { grid-template-columns: 1fr; gap: 0; } }
.sc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* como receber: três botões com ícone */
.o-tipos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.o-tipo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 68px; padding: 10px 4px;
  border: 1px solid var(--line-strong, var(--line)); border-radius: 14px; background: transparent; color: inherit; font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; transition: border-color .15s, background .15s, transform .12s; }
.o-tipo svg { width: 22px; height: 22px; opacity: .8; }
.o-tipo:active:not(:disabled) { transform: scale(.97); }
.o-tipo.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.o-tipo.on svg { opacity: 1; }
.o-tipo:disabled { opacity: .4; cursor: not-allowed; }
.o-tipo small { font-size: .65rem; font-weight: 600; }
.o-tipos.pisca .o-tipo:not(:disabled) { animation: sc-pisca .5s ease 2; }
@keyframes sc-pisca { 50% { border-color: var(--primary); box-shadow: inset 0 0 0 2px var(--primary); } }
body.menu.tema-escuro .o-tipo.on { background: rgba(239, 200, 139, .12); color: var(--champ-1, #f8ddaa); }
body.menu.tema-claro .o-tipo.on { background: rgba(20, 16, 10, .08); }

/* endereço dentro do bloco */
.sc-end { margin: 2px 0 10px; }
.sc-end .loc-btn { margin-bottom: 8px; }

/* observação recolhida */
.sc-obs-btn { align-self: flex-start; padding: 6px 2px; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; font-size: .9rem; opacity: .75; cursor: pointer; }
.sc-obs-btn:hover { opacity: 1; }
.sc-obs { margin-bottom: 4px; }

/* resumo dos valores como um recibo */
.sc-recibo .o-conta { padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px dashed var(--line-strong, var(--line)); gap: 4px; }
.sc-recibo .cart-total { margin-bottom: 8px; }

/* barrinha até a entrega grátis */
.sc-gratis { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--ink, #241b16) 10%, transparent); overflow: hidden; margin: 0 0 6px; }
.sc-gratis i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--primary); transition: width .35s ease; }
.sc-gratis.cheia i { background: #1e9e52; }
.sheet-foot .o-entrega { margin-bottom: 10px; }
#sc-dados .sc-dupla .field input { padding-left: 12px; padding-right: 8px; font-size: 1rem; }      /* 16px: abaixo disso o iPhone dá zoom na tela ao tocar no campo */

/* observação aberta: "Recolher" ao lado do título */
.sc-obs-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sc-obs-fechar { padding: 4px 2px; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; font-size: .8rem; opacity: .7; cursor: pointer; }
.sc-obs-fechar:hover { opacity: 1; }
.sc-obs-btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.sc-obs-topo label { font-size: .82rem; font-weight: 700; color: var(--muted); letter-spacing: .01em; margin: 0 0 .4rem; }

/* sacola: o recibo (subtotal, entrega, total) e o botão "Enviar" ficam no FIM do formulário, rolando junto (não fixos),
   porque o cliente precisa passar por todos os campos antes de enviar e o rodapé fixo comia muito espaço da tela */
#cart-dialog .sheet-foot { position: static; }

/* pagamento: mesmos botões do "Como receber" (os temas já vestem .o-tipo); 4 ou 5 formas cabem numa linha */
.o-pags { grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); }
.o-pags .o-tipo { min-height: 60px; padding: 8px 2px; font-size: .8rem; }
.o-troco { margin: 0 0 10px; }
.o-troco-tit { display: block; margin-bottom: 6px; font-size: .78rem; font-weight: 700; }
.o-trocos { display: flex; flex-wrap: wrap; gap: 6px; }
.o-trocos .o-tipo { flex-direction: row; min-height: 38px; padding: 6px 12px; font-size: .85rem; border-radius: 999px; }
.o-trocos .o-troco-outro { flex: 1 1 96px; justify-content: flex-start; gap: 4px; padding: 0 12px; cursor: text; }
.o-troco-outro i { font-style: normal; font-weight: 700; opacity: .6; }
.o-troco-outro input, .o-troco-outro #o-troco:focus, .o-troco-outro #o-troco:focus-visible { width: 100%; min-width: 0; height: auto; border: 0; border-radius: 0; padding: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; outline: 0; box-shadow: none; }
.o-trocos .o-troco-outro:focus-within { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }      /* o foco aparece na pílula inteira */
.o-trocos.pisca .o-tipo { animation: sc-pisca .5s ease 2; }
.o-troco-info { display: block; margin-top: 6px; font-size: .82rem; font-weight: 700; color: var(--primary-text, var(--primary)); }
.o-troco-info.ruim { color: #e5484d; }
.o-pix { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 10px; padding: 8px 8px 8px 12px; border: 1px dashed var(--line-strong, var(--line)); border-radius: 12px; font-size: .82rem; }
.o-pix span { opacity: .65; font-weight: 600; }
.o-pix b { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.o-pix button { border: 1px solid var(--primary); border-radius: 999px; padding: 4px 12px; background: var(--primary-soft); color: inherit; font: inherit; font-weight: 700; font-size: .78rem; cursor: pointer; }
/* Pix copia e cola: linha própria, com o código numa caixinha mono rolável */
.o-pix-br { flex: 1 1 100%; display: flex; flex-direction: column; gap: 6px; }
.o-pix-br-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.o-pix-br-top span { opacity: .65; font-weight: 600; }
.o-pix-br code { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .68rem; line-height: 1.35; word-break: break-all; opacity: .8; background: var(--primary-soft); border-radius: 8px; padding: 7px 9px; max-height: 60px; overflow: auto; -webkit-overflow-scrolling: touch; }

/* entrega: complemento e ponto de referência (opcionais), lado a lado */
.sc-end .sc-end-extra { margin-top: 8px; gap: 8px; }
.sc-end .sc-end-extra input { min-width: 0; }
@media (max-width: 480px) { .sc-end .sc-end-extra { grid-template-columns: 1fr; } }   /* celular: um embaixo do outro (o texto de exemplo não corta) */

/* ajustar o ponto da entrega no mapa (22/11/2026) */
.loc-ajustar { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 8px; min-height: 40px; padding: 6px 14px; border: 1.5px solid var(--line-strong, var(--line)); border-radius: 999px;
  background: transparent; color: inherit; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; }
.loc-ajustar.forte { border-color: var(--primary); background: var(--primary-soft); }
.loc-dlg { width: min(560px, 100%); padding: 0; border: 0; border-radius: 22px; overflow: hidden; }
.loc-box { display: flex; flex-direction: column; background: var(--surface, #fff); color: var(--ink); }
.loc-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 4px; }
.loc-cab strong { font-size: 1.05rem; }
.loc-x { width: 40px; height: 40px; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--ink) 7%, transparent); color: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.loc-dica { margin: 0 16px 10px; font-size: .88rem; opacity: .75; }
.loc-area { position: relative; height: min(60vh, 460px); }
.loc-mapa { position: absolute; inset: 0; }
.loc-pino { position: absolute; left: 50%; top: 50%; width: 34px; height: 46px; margin: -44px 0 0 -17px; z-index: 1000; pointer-events: none; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .35)); }
.loc-acoes { display: flex; gap: 10px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
.loc-acoes .btn { flex: 1; min-height: 48px; }
@media (max-width: 560px) { .loc-dlg { border-radius: 22px 22px 0 0; margin: auto 0 0; } .loc-area { height: 58vh; } }
