/* ==========================================================
   Leeve - simulações interativas (PDV no computador e maquininha)
   Usado pela home e pela página /sistema-pdv-maquininha/
   ========================================================== */

.pdvd,
.posd,
.pdvd-tabs {
    --d-blue: #1D6CF2;
    --d-blue-soft: #EAF2FF;
    --d-green: #03BF65;
    --d-green-soft: #E6F9EF;
    --d-ink: #0F172A;
    --d-text: #334155;
    --d-muted: #64748B;
    --d-line: #E2E8F0;
    --d-bg: #F8FAFC;
    font-family: "Inter", "Inter Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.pdvd *,
.posd * {
    box-sizing: border-box;
}

.pdvd svg,
.posd svg {
    display: block;
}

/* ---------------- PDV (computador) ---------------- */

.pdvd {
    width: 100%;
}

.pdvd-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 5px;
    margin-bottom: 16px;
    border: 1px solid var(--d-line);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 20px -12px rgba(15, 23, 42, .25);
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.pdvd-tabs::-webkit-scrollbar {
    display: none;
}

.pdvd-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--d-text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.pdvd-tab:hover {
    color: var(--d-ink);
}

.pdvd-tab:hover {
    background: var(--d-bg);
}

.pdvd-tab.is-active {
    background: var(--d-blue);
    color: #fff;
    box-shadow: 0 6px 14px -6px rgba(37, 117, 252, .7);
}

.pdvd-tab-emoji {
    font-size: 16px;
    line-height: 1;
}

.pdvd-tab:focus-visible {
    outline: 2px solid var(--d-blue);
    outline-offset: 2px;
}

.pdvd-stage {
    position: relative;
    width: 100%;
    min-height: 200px;
}

.pdvd-window {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    overflow: hidden;
    border: 1px solid #D5DCE6;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 24px 60px -12px rgba(15, 23, 42, .22);
    color: var(--d-text);
    font-size: 12px;
    line-height: 1.35;
    user-select: none;
}

.pdvd-titlebar {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 34px;
    padding: 0 14px;
    border-bottom: 1px solid var(--d-line);
    background: var(--d-bg);
}

.pdvd-dots {
    display: flex;
    gap: 6px;
}

.pdvd-dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #CBD5E1;
}

.pdvd-title {
    font-weight: 700;
    color: var(--d-ink);
}

.pdvd-store {
    margin-left: auto;
    padding: 3px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--d-line);
    color: var(--d-muted);
    font-size: 11px;
    font-weight: 600;
}

.pdvd-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 252px;
    grid-template-rows: minmax(0, 1fr);
    height: calc(100% - 34px);
}

.pdvd-catalog {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    min-width: 0;
    background: var(--d-bg);
}

.pdvd-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--d-line);
    border-radius: 9px;
    background: #fff;
    color: #94A3B8;
}

.pdvd-search svg {
    width: 15px;
    height: 15px;
}

.pdvd-search kbd,
.pdvd-pay kbd {
    margin-left: auto;
    padding: 1px 5px;
    border: 1px solid var(--d-line);
    border-radius: 4px;
    font: inherit;
    font-size: 10px;
    color: var(--d-muted);
    background: var(--d-bg);
}

.pdvd-chips {
    display: flex;
    gap: 6px;
}

.pdvd-chip {
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid var(--d-line);
    background: #fff;
    font-size: 11px;
    font-weight: 600;
    color: var(--d-muted);
    white-space: nowrap;
}

.pdvd-chip.is-active {
    border-color: var(--d-blue);
    background: var(--d-blue);
    color: #fff;
}

.pdvd-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 10px;
    min-height: 0;
}

.pdvd-product {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 7px;
    border: 1.5px solid var(--d-line);
    border-radius: 11px;
    background: #fff;
    min-height: 0;
    transition: border-color .2s, transform .15s, box-shadow .2s;
}

.pdvd-product.is-selected {
    border-color: var(--d-blue);
    box-shadow: 0 0 0 3px rgba(37, 117, 252, .12);
}

.pdvd-product.is-pressed,
.pdvd-pay.is-pressed,
.pdvd-method.is-pressed {
    transform: scale(.96);
}

.pdvd-art {
    flex: 1;
    display: grid;
    place-items: center;
    min-height: 0;
    border-radius: 8px;
}

.pdvd-art svg {
    width: auto;
    height: 72%;
    max-height: 70px;
}

.pdvd-name {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--d-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdvd-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px;
}

.pdvd-meta strong {
    font-size: 12px;
    color: var(--d-ink);
}

.pdvd-meta small {
    font-size: 9.5px;
    color: var(--d-muted);
    white-space: nowrap;
    border-radius: 4px;
    padding: 0 3px;
}

.pdvd-meta small.is-flash {
    animation: pdvd-flash 1.6s ease;
}

@keyframes pdvd-flash {
    0%, 60% {
        background: #FEF3C7;
        color: #92400E;
    }
    100% {
        background: transparent;
    }
}

.pdvd-qty {
    position: absolute;
    top: -7px;
    right: -7px;
    z-index: 1;
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--d-blue);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    transform: scale(0);
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
}

.pdvd-product.is-selected .pdvd-qty {
    transform: scale(1);
}

.pdvd-cart {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-left: 1px solid var(--d-line);
    background: #fff;
    min-height: 0;
}

.pdvd-cart-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.pdvd-cart-head strong {
    font-size: 14px;
    color: var(--d-ink);
}

.pdvd-cart-head span {
    font-size: 10.5px;
    color: var(--d-muted);
}

.pdvd-lines {
    flex: 1;
    min-height: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
}

.pdvd-line {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid #F1F5F9;
}

.pdvd-line.is-new {
    animation: pdvd-line-in .35s ease;
}

@keyframes pdvd-line-in {
    from {
        opacity: 0;
        transform: translateX(12px);
        background: var(--d-blue-soft);
    }
}

.pdvd-line-art {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 7px;
}

.pdvd-line-art svg {
    width: 24px;
    height: 24px;
}

.pdvd-line-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pdvd-line-info strong {
    font-size: 11.5px;
    color: var(--d-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdvd-line-info small {
    font-size: 10px;
    color: var(--d-muted);
}

.pdvd-line-total {
    font-weight: 700;
    color: var(--d-ink);
    font-size: 11.5px;
}

.pdvd-empty {
    margin: 0;
    padding: 18px 8px;
    border: 1.5px dashed var(--d-line);
    border-radius: 10px;
    color: #94A3B8;
    text-align: center;
    font-size: 11px;
}

.pdvd-totals {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--d-line);
}

.pdvd-totals > div {
    display: flex;
    justify-content: space-between;
    color: var(--d-muted);
    font-size: 11px;
}

.pdvd-total {
    margin-top: 2px;
    align-items: baseline;
}

.pdvd-total span {
    color: var(--d-ink);
    font-weight: 600;
    font-size: 12px;
}

.pdvd-total strong {
    color: var(--d-ink);
    font-size: 20px;
    letter-spacing: -.02em;
}

.pdvd-pay {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: #CBD5E1;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    transition: background .25s, transform .15s;
}

.pdvd-pay kbd {
    margin: 0;
    border-color: rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .15);
    color: #fff;
}

.pdvd-pay.is-ready {
    background: var(--d-blue);
}

/* Modal de pagamento */
.pdvd-modal {
    position: absolute;
    z-index: 4;
    inset: 34px 0 0;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, .32);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}

.pdvd-modal.is-open {
    opacity: 1;
}

.pdvd-modal-card {
    width: 360px;
    padding: 18px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .25);
    transform: translateY(10px) scale(.98);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}

.pdvd-modal.is-open .pdvd-modal-card {
    transform: none;
}

.pdvd-modal-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}

.pdvd-modal-head span {
    font-weight: 600;
    color: var(--d-muted);
}

.pdvd-modal-head strong {
    font-size: 20px;
    color: var(--d-ink);
    letter-spacing: -.02em;
}

.pdvd-methods {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.pdvd-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 4px;
    border: 1.5px solid var(--d-line);
    border-radius: 10px;
    background: #fff;
    color: var(--d-text);
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    transition: border-color .2s, background .2s, transform .15s;
}

.pdvd-method svg {
    width: 20px;
    height: 20px;
}

.pdvd-method.is-chosen {
    border-color: var(--d-blue);
    background: var(--d-blue-soft);
    color: var(--d-blue);
}

.pdvd-status {
    min-height: 74px;
    margin-top: 12px;
}

.pdvd-pix,
.pdvd-card-wait,
.pdvd-approved {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--d-bg);
    animation: pdvd-fade .3s ease;
}

.pdvd-pix svg {
    width: 54px;
    height: 54px;
    padding: 3px;
    background: #fff;
    border-radius: 4px;
}

.pdvd-pix div,
.pdvd-card-wait div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pdvd-pix strong,
.pdvd-card-wait strong {
    color: var(--d-ink);
    font-size: 13px;
}

.pdvd-card-wait span:not(.pdvd-contactless) {
    color: var(--d-muted);
}

.pdvd-waiting {
    color: var(--d-muted);
}

.pdvd-waiting::after {
    content: "";
    animation: pdvd-dots 1.2s steps(4) infinite;
}

@keyframes pdvd-dots {
    0% { content: ""; }
    25% { content: "."; }
    50% { content: ".."; }
    75% { content: "..."; }
}

.pdvd-contactless {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--d-blue-soft);
    color: var(--d-blue);
    animation: pdvd-pulse 1.2s ease-in-out infinite;
}

.pdvd-contactless svg {
    width: 24px;
    height: 24px;
}

@keyframes pdvd-pulse {
    50% {
        box-shadow: 0 0 0 8px rgba(37, 117, 252, .12);
    }
}

.pdvd-approved {
    justify-content: center;
    min-height: 74px;
    background: var(--d-green-soft);
    color: #047857;
    font-size: 15px;
}

.pdvd-approved span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--d-green);
    color: #fff;
    animation: pdvd-pop .4s cubic-bezier(.34, 1.56, .64, 1);
}

.pdvd-approved svg {
    width: 20px;
    height: 20px;
    stroke-width: 3;
}

@keyframes pdvd-pop {
    from { transform: scale(0); }
}

@keyframes pdvd-fade {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
}

/* Aviso de venda concluída */
.pdvd-toast {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 10px;
    border-radius: 12px;
    background: var(--d-ink);
    color: #CBD5E1;
    font-size: 12px;
    white-space: nowrap;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .3);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px);
    transition: opacity .3s, transform .35s cubic-bezier(.2, .8, .2, 1);
}

.pdvd-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.pdvd-toast svg {
    width: 26px;
    height: 26px;
    padding: 5px;
    border-radius: 50%;
    background: var(--d-green);
    color: #fff;
    stroke-width: 3;
}

.pdvd-toast strong {
    color: #fff;
    margin-right: 4px;
}

/* Cursor simulado */
.pdvd-cursor {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
    width: 22px;
    height: 22px;
    pointer-events: none;
    transition: transform .65s cubic-bezier(.65, 0, .35, 1);
}

.pdvd-cursor.is-instant {
    transition: none;
}

.pdvd-cursor svg {
    position: relative;
    z-index: 1;
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 2px 3px rgba(15, 23, 42, .3));
}

.pdvd-ripple {
    position: absolute;
    top: -9px;
    left: -11px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(37, 117, 252, .35);
    opacity: 0;
}

.pdvd-cursor.is-clicking .pdvd-ripple {
    animation: pdvd-ripple .45s ease-out;
}

@keyframes pdvd-ripple {
    from {
        opacity: 1;
        transform: scale(.3);
    }
    to {
        opacity: 0;
        transform: scale(1.6);
    }
}

/* Passos abaixo da simulação */
.pdvd-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.pdvd-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    color: #94A3B8;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.25;
    transition: color .3s;
}

.pdvd-steps li span {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid #CBD5E1;
    font-size: 11px;
    font-weight: 700;
    transition: all .3s;
}

.pdvd-steps li.is-active {
    color: var(--d-ink);
}

.pdvd-steps li.is-active span {
    border-color: var(--d-blue);
    background: var(--d-blue);
    color: #fff;
}

.pdvd-steps li.is-done span {
    border-color: var(--d-green);
    background: var(--d-green);
    color: #fff;
}

/* Layout compacto (celular) */
/* Carrinho com altura para título + 2 itens + totais + botão Pagamento (sem cortar) */
.pdvd-window.is-compact .pdvd-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) 296px;
}

.pdvd-window.is-compact .pdvd-cart {
    gap: 8px;
    border-left: 0;
    border-top: 1px solid var(--d-line);
}

.pdvd-window.is-compact .pdvd-lines {
    max-height: 92px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.pdvd-window.is-compact .pdvd-meta small {
    display: none;
}

.pdvd-window.is-compact .pdvd-chips {
    gap: 5px;
}

.pdvd-window.is-compact .pdvd-modal-card {
    width: 380px;
}

@media (max-width: 560px) {
    .pdvd-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 10px;
    }
}

/* ---------------- PDV: ícones reais e modo interativo ---------------- */

.pdvd-method img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.pdvd-modal-label {
    margin: 0 0 8px;
    color: var(--d-ink);
    font-size: 12px;
    font-weight: 700;
}

.pdvd-modal-head {
    position: relative;
    padding: 10px 12px;
    border: 1px solid #D6E4FF;
    border-radius: 10px;
    background: #EFF4FF;
}

.pdvd-close {
    position: absolute;
    top: -6px;
    right: -6px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid var(--d-line);
    border-radius: 50%;
    background: #fff;
    color: var(--d-muted);
    cursor: pointer;
}

.pdvd-close svg {
    width: 14px;
    height: 14px;
}

.pdvd-interactive .pdvd-product {
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.pdvd-interactive .pdvd-product:hover {
    border-color: #93B8FD;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px -10px rgba(37, 117, 252, .45);
}

.pdvd-interactive .pdvd-product:active {
    transform: scale(.97);
}

.pdvd-interactive .pdvd-product:focus-visible,
.pdvd-interactive .pdvd-method:focus-visible,
.pdvd-interactive .pdvd-pay:focus-visible {
    outline: 2px solid var(--d-blue);
    outline-offset: 2px;
}

.pdvd-product.is-hint::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 12px;
    border: 2px solid var(--d-blue);
    animation: pdvd-hint 1.6s ease-out infinite;
    pointer-events: none;
}

@keyframes pdvd-hint {
    from {
        opacity: .9;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(1.08);
    }
}

.pdvd-interactive .pdvd-pay {
    cursor: pointer;
}

.pdvd-interactive .pdvd-pay:disabled {
    cursor: not-allowed;
}

.pdvd-interactive .pdvd-pay.is-ready:hover {
    background: #1A62E0;
}

.pdvd-interactive .pdvd-method {
    cursor: pointer;
}

.pdvd-interactive .pdvd-method:not(:disabled):hover {
    border-color: var(--d-blue);
    background: var(--d-blue-soft);
}

.pdvd-interactive .pdvd-modal.is-open {
    pointer-events: auto;
}

.pdvd-clear {
    border: 0;
    background: none;
    color: var(--d-muted);
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.pdvd-clear:hover {
    color: var(--d-ink);
}

.pdvd-interactive .pdvd-line {
    grid-template-columns: 32px 1fr auto 22px;
}

.pdvd-line-remove {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1px solid var(--d-line);
    border-radius: 6px;
    background: #fff;
    color: var(--d-muted);
    cursor: pointer;
}

.pdvd-line-remove svg {
    width: 12px;
    height: 12px;
}

.pdvd-line-remove:hover {
    border-color: #FCA5A5;
    color: #DC2626;
}

/* ---------------- Maquininha (Cielo LIO) ---------------- */

.posd {
    width: 100%;
}

.posd-stage {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.posd-scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    height: 770px;
    transform-origin: 0 0;
    user-select: none;
}

.posd-device {
    position: absolute;
    top: 80px;
    left: 0;
    z-index: 1;
    width: 300px;
    height: auto;
    filter: drop-shadow(0 28px 36px rgba(15, 23, 42, .28));
}

.posd-screen {
    position: absolute;
    top: 225.93px;
    left: 46.19px;
    z-index: 2;
    width: 208.92px;
    height: 368.27px;
    overflow: hidden;
    border-radius: 3px;
    background: var(--d-bg);
}

.posd-screen-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    height: 494px;
    transform: scale(.74614);
    transform-origin: 0 0;
    color: var(--d-text);
    font-size: 12px;
    line-height: 1.3;
}

/* Cupom */
.posd-paper {
    position: absolute;
    top: 0;
    left: 62px;
    z-index: 3;
    width: 176px;
    height: 152px;
    overflow: hidden;
}

.posd-paper-inner {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 152px;
    padding: 12px 12px 8px;
    background: #FFFEFA;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .06), 0 6px 18px rgba(15, 23, 42, .14);
    color: #1F2937;
    font-family: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 9px;
    line-height: 1.45;
    transform: translateY(100%);
    -webkit-mask: linear-gradient(#000, #000) bottom / 100% calc(100% - 6px) no-repeat, radial-gradient(circle at 5px 0, transparent 4px, #000 4.5px) top / 10px 6px repeat-x;
    mask: linear-gradient(#000, #000) bottom / 100% calc(100% - 6px) no-repeat, radial-gradient(circle at 5px 0, transparent 4px, #000 4.5px) top / 10px 6px repeat-x;
}

.posd-paper.is-printing .posd-paper-inner {
    transform: translateY(0);
    transition: transform 1.6s steps(14);
}

.posd-paper.is-printed .posd-paper-inner {
    transform: translateY(0);
}

.posd-paper.is-torn .posd-paper-inner {
    transform: translateY(-30px) rotate(-4deg);
    opacity: 0;
    transition: transform .4s ease-in, opacity .4s ease-in;
}

.posd-r-store {
    display: block;
    text-align: center;
    font-size: 10px;
    letter-spacing: .04em;
}

.posd-paper hr {
    margin: 4px 0;
    border: 0;
    border-top: 1px dashed #9CA3AF;
}

.posd-r-line {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.posd-r-line span:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.posd-r-total {
    font-weight: 700;
    font-size: 10px;
}

.posd-r-qr {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    color: #4B5563;
}

.posd-r-qr svg {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
}

/* Telas */
.posd-view {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: var(--d-bg);
    opacity: 0;
    transform: translateX(14px);
    transition: opacity .28s ease, transform .28s ease;
    pointer-events: none;
}

.posd-view.is-active {
    opacity: 1;
    transform: none;
}

.posd-appbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    height: 52px;
    padding: 0 14px;
    background: #fff;
    color: var(--d-ink);
}

.posd-appbar svg {
    width: 22px;
    height: 22px;
}

.posd-appbar .posd-search {
    color: var(--d-blue);
}

.posd-appbar img {
    width: auto;
    height: 30px;
}

.posd-chips {
    display: flex;
    gap: 6px;
    padding: 8px 10px 6px;
    overflow: hidden;
}

.posd-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    border: 1px solid var(--d-line);
    border-radius: 10px;
    background: #fff;
    color: var(--d-text);
    font-size: 11.5px;
    white-space: nowrap;
}

.posd-chip svg {
    width: 14px;
    height: 14px;
}

.posd-chip.is-active {
    padding: 6px 8px;
    border: 1.5px solid var(--d-blue);
    background: #EAF2FF;
    color: var(--d-blue);
    font-weight: 600;
}

.posd-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 4px 10px 72px;
    min-height: 0;
}

.posd-product {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 6px 6px 7px;
    border: 1px solid var(--d-line);
    border-radius: 12px;
    background: #fff;
    min-height: 0;
    transition: border-color .2s, transform .15s, box-shadow .2s;
}

.posd-product.is-selected {
    border-color: var(--d-blue);
    box-shadow: 0 0 0 2px rgba(37, 117, 252, .15);
}

.posd-product.is-pressed,
.posd-total-btn.is-pressed,
.posd-method.is-pressed,
.posd-finish.is-pressed,
.posd-new.is-pressed {
    transform: scale(.95);
}

.posd-product em {
    position: absolute;
    top: -6px;
    right: -6px;
    z-index: 1;
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--d-blue);
    color: #fff;
    font-size: 10.5px;
    font-style: normal;
    font-weight: 700;
    transform: scale(0);
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
}

.posd-product.is-selected em {
    transform: scale(1);
}

.posd-art {
    flex: 1;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 0;
}

.posd-art svg {
    width: auto;
    height: 86%;
}

.posd-name {
    max-width: 100%;
    color: var(--d-text);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.posd-product strong {
    color: var(--d-ink);
    font-size: 15px;
    letter-spacing: -.01em;
}

.posd-bottom {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    display: flex;
    gap: 8px;
}

.posd-total-btn {
    flex: 1;
    display: flex;
    align-items: center;
    height: 52px;
    padding: 0 14px;
    border: 0;
    border-radius: 14px;
    background: var(--d-blue);
    color: #fff;
    font: inherit;
    box-shadow: 0 8px 18px -8px rgba(37, 117, 252, .7);
    transition: transform .15s;
}

.posd-total-btn span {
    font-size: 13px;
}

.posd-total-btn strong {
    margin-left: auto;
    font-size: 17px;
    letter-spacing: -.01em;
}

.posd-total-btn svg {
    width: 18px;
    height: 18px;
    margin-left: 6px;
}

.posd-cart-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--d-blue);
    color: #fff;
    box-shadow: 0 8px 18px -8px rgba(37, 117, 252, .7);
}

.posd-cart-btn svg {
    width: 22px;
    height: 22px;
}

.posd-cart-btn em {
    position: absolute;
    top: -6px;
    right: -6px;
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #F43F5E;
    color: #fff;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    transform: scale(0);
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
}

.posd-cart-btn em.is-visible {
    transform: scale(1);
}

/* Faturamento */
.posd-pay-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 8px 10px 70px;
    min-height: 0;
}

.posd-totals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.posd-totals div {
    display: flex;
    flex-direction: column;
    padding: 8px 10px;
    border: 1px solid #D6E4FF;
    border-radius: 10px;
    background: #EFF4FF;
}

.posd-totals small {
    color: var(--d-muted);
    font-size: 10px;
}

.posd-totals strong {
    color: var(--d-ink);
    font-size: 16px;
}

.posd-falta {
    background: #E3EDFF !important;
}

.posd-falta strong {
    color: var(--d-blue);
}

.posd-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0 6px;
    color: var(--d-ink);
    font-size: 12.5px;
    font-weight: 700;
}

.posd-label em {
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #EAF2FF;
    color: var(--d-blue);
    font-size: 10px;
    font-style: normal;
}

.posd-methods {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.posd-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 2px 6px;
    border: 1px solid #D9DEE5;
    border-radius: 10px;
    background: #fff;
    color: var(--d-text);
    font: inherit;
    font-size: 10px;
    transition: border-color .2s, background .2s, transform .15s;
}

.posd-method img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.posd-method.is-pressed {
    border-color: var(--d-blue);
    background: var(--d-blue-soft);
}

.posd-payments {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 12px;
    border: 1px solid var(--d-line);
    border-radius: 10px;
    background: #F1F5F9;
    color: #475569;
    font-size: 11.5px;
    text-align: center;
}

.posd-payments.has-payment {
    place-items: start stretch;
}

.posd-payment-line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--d-line);
    border-radius: 8px;
    background: #fff;
    color: var(--d-ink);
    animation: pdvd-fade .3s ease;
}

.posd-payment-line img {
    width: 26px;
    height: 26px;
}

.posd-payment-line strong {
    margin-left: auto;
}

.posd-payment-line svg {
    width: 16px;
    height: 16px;
    color: var(--d-green);
    stroke-width: 3;
}

.posd-finish {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    height: 50px;
    border: 0;
    border-radius: 12px;
    background: #A9C6FB;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    transition: background .25s, transform .15s;
}

.posd-finish.is-ready {
    background: var(--d-blue);
}

/* Cartão, Pix, processando, aprovado */
.posd-view-card,
.posd-view-pix,
.posd-view-cash,
.posd-view-processing {
    background: #fff;
}

.posd-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px;
    text-align: center;
}

.posd-center small {
    color: var(--d-muted);
    font-size: 12px;
    font-weight: 600;
}

.posd-center > strong {
    color: var(--d-ink);
    font-size: 30px;
    letter-spacing: -.03em;
}

.posd-center p {
    margin: 0;
    color: var(--d-text);
    font-size: 13px;
    font-weight: 500;
}

.posd-nfc {
    position: relative;
    display: grid;
    place-items: center;
    width: 100px;
    height: 100px;
    margin: 20px 0 16px;
    border-radius: 50%;
    background: var(--d-blue-soft);
    color: var(--d-blue);
}

.posd-nfc svg {
    width: 46px;
    height: 46px;
}

.posd-nfc i {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(37, 117, 252, .35);
    border-radius: 50%;
    animation: posd-wave 1.8s ease-out infinite;
}

.posd-nfc i:last-child {
    animation-delay: .9s;
}

@keyframes posd-wave {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(1.7);
        opacity: 0;
    }
}

.posd-qr {
    width: 150px;
    height: 150px;
    margin: 14px 0 10px;
    padding: 8px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 0 0 1px var(--d-line);
}

.posd-qr svg {
    width: 100%;
    height: 100%;
}

.posd-waiting::after {
    content: "";
    animation: pdvd-dots 1.2s steps(4) infinite;
}

.posd-spinner {
    width: 50px;
    height: 50px;
    margin-bottom: 8px;
    border: 4px solid var(--d-blue-soft);
    border-top-color: var(--d-blue);
    border-radius: 50%;
    animation: posd-spin .8s linear infinite;
}

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

.posd-view-approved {
    background: var(--d-green);
}

.posd-view-approved .posd-center > strong,
.posd-view-approved .posd-center small {
    color: #fff;
}

.posd-check {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    margin-bottom: 8px;
    border-radius: 50%;
    background: #fff;
    color: var(--d-green);
}

.posd-view-approved.is-active .posd-check {
    animation: pdvd-pop .45s cubic-bezier(.34, 1.56, .64, 1);
}

.posd-check svg {
    width: 48px;
    height: 48px;
    stroke-width: 3;
}

/* Venda concluída */
.posd-view-done {
    background: #fff;
}

.posd-done {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px 18px;
}

.posd-done-check {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--d-green-soft);
    color: var(--d-green);
}

.posd-done-check svg {
    width: 34px;
    height: 34px;
    stroke-width: 3;
}

.posd-done > strong {
    color: var(--d-ink);
    font-size: 21px;
    letter-spacing: -.02em;
}

.posd-done ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.posd-done li {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--d-text);
    font-size: 13px;
    font-weight: 500;
}

.posd-done li svg {
    width: 20px;
    height: 20px;
    padding: 4px;
    border-radius: 50%;
    background: var(--d-green-soft);
    color: var(--d-green);
    stroke-width: 3;
}

.posd-view-done.is-active li {
    animation: pdvd-fade .4s ease backwards;
}

.posd-view-done.is-active li:nth-child(2) {
    animation-delay: .15s;
}

.posd-view-done.is-active li:nth-child(3) {
    animation-delay: .3s;
}

.posd-new {
    align-self: stretch;
    height: 46px;
    margin-top: 8px;
    border: 0;
    border-radius: 12px;
    background: var(--d-blue);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    transition: transform .15s;
}

/* Dedo */
.posd-finger {
    position: absolute;
    top: -22px;
    left: -22px;
    z-index: 4;
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 50%;
    background: rgba(15, 23, 42, .18);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .25);
    opacity: 0;
    pointer-events: none;
    transition: transform .5s cubic-bezier(.65, 0, .35, 1), opacity .25s;
}

.posd-finger.is-visible {
    opacity: 1;
}

.posd-finger.is-tap {
    animation: posd-tap .35s ease;
}

@keyframes posd-tap {
    50% {
        background: rgba(37, 117, 252, .35);
        box-shadow: 0 0 0 10px rgba(37, 117, 252, .15);
    }
}

/* Cartão por aproximação */
.posd-card {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 4;
    width: 136px;
    height: 86px;
    padding: 12px;
    border-radius: 11px;
    background: linear-gradient(135deg, #1E3A8A 0%, #2575FC 60%, #60A5FA 100%);
    box-shadow: 0 16px 30px -8px rgba(15, 23, 42, .45);
    color: #fff;
    opacity: 0;
    transform: translate(164px, 640px) rotate(12deg);
    transition: transform .9s cubic-bezier(.2, .8, .2, 1), opacity .4s;
}

.posd-card.is-tapping {
    opacity: 1;
    transform: translate(96px, 270px) rotate(-14deg);
}

.posd-card-chip {
    display: block;
    width: 22px;
    height: 16px;
    border-radius: 3px;
    background: linear-gradient(135deg, #FDE68A, #D4A017);
}

.posd-card-nfc {
    position: absolute;
    top: 10px;
    right: 10px;
}

.posd-card-nfc svg {
    width: 18px;
    height: 18px;
}

.posd-card-num {
    position: absolute;
    left: 12px;
    bottom: 10px;
    font-size: 10px;
    letter-spacing: .08em;
    opacity: .9;
}

/* ---------------- Interativo: centralizado, filtro de categoria ---------------- */

.pdvd-interactive {
    margin: 0 auto;
}

.pdvd-interactive .pdvd-chip {
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}

.pdvd-interactive .pdvd-chip:not(.is-active):hover {
    border-color: #93B8FD;
    color: var(--d-blue);
}

.pdvd-interactive .pdvd-chip:focus-visible {
    outline: 2px solid var(--d-blue);
    outline-offset: 2px;
}

.pdvd-product.is-filtered {
    display: none;
}

.pdvd-tab-short,
.pdvd-tab-hint {
    display: none;
}

.pdvd-tab-text {
    display: contents;
}

@media (max-width: 480px) {
    .pdvd-tab-full {
        display: none;
    }

    .pdvd-tab-short {
        display: inline;
    }
}

@media (max-width: 560px) {
    .pdvd-tab {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 420px) {
    .pdvd-tabs {
        display: flex;
        gap: 2px;
        padding: 4px;
    }

    .pdvd-tab {
        flex: 1 1 auto;
        justify-content: center;
        gap: 4px;
        padding: 8px 8px;
        font-size: 12px;
    }

    .pdvd-tab-emoji {
        font-size: 14px;
    }

    .pdvd-tab-full {
        display: none;
    }

    .pdvd-tab-short {
        display: inline;
    }

    .pdvd-steps li {
        font-size: 11.5px;
        gap: 6px;
    }
}

/* ---------------- Maquininha interativa ---------------- */

.posd-interactive {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.posd-tabs {
    display: flex;
    width: max-content;
    max-width: 100%;
    margin: 0 auto 18px;
}

/* Palco recortado (topo do aparelho até logo abaixo da tela); largura e altura vêm do JS */
.posd-interactive .posd-stage {
    max-width: none;
    margin: 0 auto;
}

.posd-interactive .posd-paper {
    display: none;
}

.posd-interactive .posd-product,
.posd-interactive .posd-chip,
.posd-interactive .posd-back {
    font: inherit;
    cursor: pointer;
}

.posd-interactive .posd-product {
    color: inherit;
}

.posd-interactive .posd-product:hover {
    border-color: #93B8FD;
}

.posd-interactive .posd-chips {
    overflow-x: auto;
    scrollbar-width: none;
}

.posd-interactive .posd-chips::-webkit-scrollbar {
    display: none;
}

.posd-chip {
    flex: 0 0 auto;
}

.posd-interactive .posd-chip {
    font-size: 10.5px;
}

.posd-back {
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: none;
    color: var(--d-ink);
}

.posd-interactive .posd-total-btn,
.posd-interactive .posd-method,
.posd-interactive .posd-finish,
.posd-interactive .posd-new {
    cursor: pointer;
}

.posd-interactive .posd-total-btn:disabled {
    background: #A9C6FB;
    box-shadow: none;
    cursor: not-allowed;
}

.posd-interactive .posd-finish:disabled,
.posd-interactive .posd-method:disabled {
    cursor: not-allowed;
}

.posd-interactive .posd-method:not(:disabled):hover {
    border-color: var(--d-blue);
    background: var(--d-blue-soft);
}

.posd-product.is-filtered {
    display: none;
}

/* No modo automático as telas não recebem clique; no interativo, só a tela ativa recebe */
.posd-interactive .posd-view.is-active {
    pointer-events: auto;
}

.posd .is-next {
    animation: pdvd-next 1.4s ease-in-out infinite;
}

.posd-interactive :focus-visible {
    outline: 2px solid var(--d-blue);
    outline-offset: 2px;
}

/* ---------------- Fotos de produto ---------------- */

.demo-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdvd-art {
    overflow: hidden;
    background: #EEF1F5;
}

.pdvd-line-art {
    overflow: hidden;
    background: #EEF1F5;
}

.posd-art {
    overflow: hidden;
    border-radius: 8px;
    background: #EEF1F5;
}

.posd-product {
    padding: 5px 5px 7px;
}

/* ---------------- Interativo: próximo passo e CTA ---------------- */

.pdvd-pay.is-next,
.pdvd-method.is-next {
    animation: pdvd-next 1.4s ease-in-out infinite;
}

@keyframes pdvd-next {
    50% {
        box-shadow: 0 0 0 5px rgba(37, 117, 252, .22);
    }
}

.pdvd-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding: 16px 18px;
    border: 1px solid #BFE9D3;
    border-radius: 14px;
    background: var(--d-green-soft);
    animation: pdvd-fade .35s ease;
}

.pdvd-cta[hidden] {
    display: none;
}

.pdvd-cta p {
    margin: 0;
    color: #065F46;
    font-size: 15px;
}

.pdvd-cta-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 18px;
    border-radius: 10px;
    background: var(--d-blue);
    color: #fff;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
}

.pdvd-cta-btn:hover {
    background: #1A62E0;
}

@media (max-width: 560px) {
    .pdvd-cta {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .pdvd-cta-btn {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pdvd *,
    .posd * {
        animation: none !important;
        transition: none !important;
    }
}

/* ---------- Espaço reservado antes do JS montar o demo (evita a página pular / CLS) ---------- */
/* Maquininha (automática e rolagem): altura = largura x 770/300 */
[data-pos-demo]:not([data-pos-demo="interactive"]):empty {
    aspect-ratio: 300 / 770;
}

/* PDV automático: abas + janela 780x480 (420x700 no compacto) + passos */
[data-pdv-demo]:not([data-pdv-demo="interactive"]):empty {
    display: flex;
    flex-direction: column;
}

[data-pdv-demo]:not([data-pdv-demo="interactive"]):empty::before {
    content: "";
    aspect-ratio: 780 / 480;
}

[data-pdv-demo]:not([data-pdv-demo="interactive"]):empty::after {
    content: "";
    height: 106px;
}

@media (max-width: 560px) {
    [data-pdv-demo]:not([data-pdv-demo="interactive"]):empty::before {
        aspect-ratio: 420 / 700;
    }

    [data-pdv-demo]:not([data-pdv-demo="interactive"]):empty::after {
        height: 131px;
    }
}
