/* ui.css — Loja Ridee (06/11/2026). Frente "ui".
   (A) diálogos MKT.ui.confirm / prompt / alert (estilo 99Food/iFood)
   (B) sem zoom no iPhone: fonte >= 16px nos campos, touch-action, text-size-adjust */

/* ── (B) sem zoom ───────────────────────────────────────────────────────── */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }
body { touch-action: manipulation; }
a, button, label, summary, select, input, textarea,
[role="button"], [data-act], [data-uid], [data-d], [data-entrar], [onclick],
.mkt button, .mkt a, .mkt label { touch-action: manipulation; }

/* O zoom de foco do iOS vem de fonte < 16px no campo. !important porque
   vitrine.css / entrada.css / folhas do vitrine.js definem 13–15px em vários seletores. */
input, select, textarea,
.mkt input, .mkt select, .mkt textarea,
#loginModalClient input, #loginModalClient select, #loginModalClient textarea,
#loginModalClient .authInput,
.mkt-sheet input, .mkt-sheet select, .mkt-sheet textarea,
.mkt .fld .in, .mkt .busca-form .in, .mkt .obs textarea,
.mkt-cupom-linha input, .mkt-aval textarea, .mkt-chat-linha input,
.mkt-ui-campo {
  font-size: 16px !important;
}
@supports (-webkit-touch-callout: none) {
  input, select, textarea, .authInput, .in, .ag-sel { font-size: 16px !important; }
}

/* ── (A) diálogos ───────────────────────────────────────────────────────── */
html.mkt-ui-travado, html.mkt-ui-travado body { overflow: hidden !important; }

.mkt-ui-fundo {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 16px; box-sizing: border-box;
  background: rgba(15, 15, 18, .55);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: mktUiFundoIn .18s ease-out both;
  overscroll-behavior: contain;
}
.mkt-ui-fundo.is-out { animation: mktUiFundoOut .2s ease-in both; pointer-events: none; }

.mkt-ui-card {
  position: relative; width: 100%; max-width: 420px; max-height: calc(100vh - 32px); overflow-y: auto;
  box-sizing: border-box; padding: 28px 22px 20px; text-align: center;
  background: #fff; color: #1A1A1A; border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
  animation: mktUiCardIn .26s cubic-bezier(.2, .9, .3, 1.15) both;
  outline: none; font-family: inherit;
}
.mkt-ui-fundo.is-out .mkt-ui-card { animation: mktUiCardOut .2s ease-in both; }
.mkt-ui-alca { display: none; }

.mkt-ui-icone {
  width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #FFF6C2; color: #8A6D00;
  animation: mktUiPop .42s .08s cubic-bezier(.2, 1.4, .4, 1) both;
}
.mkt-ui-icone svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.tom-perigo .mkt-ui-icone { background: #FDE7E6; color: #E53935; }
.tom-aviso .mkt-ui-icone { background: #FFF0D6; color: #D9810A; }
.tom-sucesso .mkt-ui-icone { background: #E3F6E8; color: #1E9E4B; }

.mkt-ui-titulo { margin: 0 0 8px; font-size: 21px; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; color: #1A1A1A; }
.mkt-ui-texto { margin: 0 0 18px; font-size: 15px; line-height: 1.5; color: #555; white-space: pre-line; overflow-wrap: anywhere; }

.mkt-ui-acoes { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.mkt-ui-texto + .mkt-ui-acoes { margin-top: 0; }
.mkt-ui-btn {
  appearance: none; -webkit-appearance: none; width: 100%; min-height: 50px; padding: 0 18px;
  border-radius: 14px; border: 2px solid transparent; font: inherit; font-size: 16px; font-weight: 800;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: transform .08s ease, filter .15s ease, background .15s ease;
}
.mkt-ui-btn:active { transform: scale(.98); }
.mkt-ui-ok { background: #F9D515; color: #1A1A1A; }
.mkt-ui-ok.is-perigo { background: #E53935; color: #fff; }
.mkt-ui-ok:hover { filter: brightness(.97); }
.mkt-ui-nao { background: transparent; color: #1A1A1A; border-color: #E4E4E4; font-weight: 700; }
.mkt-ui-nao:hover { background: #F6F6F6; }
.mkt-ui-btn:focus-visible { outline: 3px solid #1A1A1A; outline-offset: 2px; }
.mkt-ui-chip:focus-visible, .mkt-ui-campo:focus-visible { outline: 3px solid #1A1A1A; outline-offset: 2px; }
/* ordem: ações destrutivas deixam "cancelar" no mesmo lugar, primário em cima */

.mkt-ui-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 2px 0 12px; }
.mkt-ui-chip {
  appearance: none; -webkit-appearance: none; min-height: 48px; padding: 0 16px; border-radius: 999px;
  border: 2px solid #E4E4E4; background: #fff; color: #1A1A1A; font: inherit; font-size: 15px; font-weight: 700;
  cursor: pointer; touch-action: manipulation;
}
.mkt-ui-chip[aria-pressed="true"] { background: #FFF6C2; border-color: #F9D515; }

.mkt-ui-linha { position: relative; margin: 0 0 4px; text-align: left; }
.mkt-ui-linha[hidden] { display: none; }
.mkt-ui-linha.tem-prefixo .mkt-ui-campo { padding-left: 44px; }
.mkt-ui-prefixo { position: absolute; left: 16px; top: 14px; font-weight: 800; color: #777; font-size: 16px; pointer-events: none; }
.mkt-ui-campo {
  display: block; width: 100%; box-sizing: border-box; min-height: 52px; padding: 13px 16px;
  border-radius: 14px; border: 2px solid #E4E4E4; background: #FAFAFA; color: #1A1A1A;
  font-family: inherit; resize: none; -webkit-appearance: none; appearance: none;
}
.mkt-ui-campo:focus { background: #fff; border-color: #F9D515; }
.mkt-ui-campo.is-erro { border-color: #E53935; background: #FFF6F6; }
.mkt-ui-campo.is-tremendo { animation: mktUiTrem .32s ease both; }
.mkt-ui-contador { text-align: right; font-size: 12px; color: #888; margin: 2px 2px 0; }
.mkt-ui-erro { margin: 6px 2px 0; text-align: left; font-size: 13.5px; font-weight: 700; color: #D32F2F; }
.mkt-ui-erro[hidden] { display: none; }

/* celular: folha embaixo com alça */
@media (max-width: 600px) {
  .mkt-ui-fundo { align-items: flex-end; padding: 0; }
  .mkt-ui-card {
    max-width: none; border-radius: 24px 24px 0 0; padding: 22px 20px calc(18px + env(safe-area-inset-bottom, 0px));
    max-height: 92vh; animation-name: mktUiSheetIn; animation-duration: .3s;
  }
  .mkt-ui-fundo.is-out .mkt-ui-card { animation-name: mktUiSheetOut; }
  .mkt-ui-alca { display: block; width: 40px; height: 5px; border-radius: 3px; background: #D9D9D9; margin: -8px auto 16px; }
}

@keyframes mktUiFundoIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes mktUiFundoOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes mktUiCardIn { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes mktUiCardOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes mktUiSheetIn { from { transform: translateY(100%); } to { transform: none; } }
@keyframes mktUiSheetOut { from { transform: none; } to { transform: translateY(100%); } }
@keyframes mktUiPop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes mktUiTrem { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

@media (prefers-reduced-motion: reduce) {
  .mkt-ui-fundo, .mkt-ui-card, .mkt-ui-icone, .mkt-ui-campo, .mkt-ui-fundo.is-out, .mkt-ui-fundo.is-out .mkt-ui-card,
  .mkt-ui-campo.is-tremendo { animation: none !important; }
  .mkt-ui-btn { transition: none; }
}
