/*
 * Temas sazonais — visual. Motor em tema.js, configuração em assets/functions/temas.php.
 * Carregado só quando existe campanha valendo para a página.
 *
 * Camadas (z-index): luzinhas 1020 < partículas 1030 < menu lateral 1040 < modais 1050+
 * < aviso 1070 < faixa de pré-visualização 1080. Nada aqui recebe clique, exceto o aviso
 * (com botão de fechar) e a faixa de pré-visualização.
 */


/* ---------- partículas (neve, confete) ---------- */
.tema-canvas {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1030;
}

/* Painel: a neve passa por trás de cards, tabelas e textos e só aparece no fundo e nos vãos.
   Para isso o fundo da página sai do wrapper e vai para o body (mesma cor de antes). */
.tema-canvas.tema-canvas-fundo { z-index: -1; }
html.tema-com-menu body { background-color: #f8f9fc; }
html.tema-com-menu #wrapper #content-wrapper { background-color: transparent; }

/* ---------- fio de luzinhas: rola junto com a página, não fica preso na tela ---------- */
.tema-luzes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 18px;
    pointer-events: none;
    z-index: 1020;
    overflow: hidden;
}
html.tema-com-menu .tema-luzes { left: 64px; }
.tema-luzes svg { display: block; }
.tema-bulbo { animation: tema-pisca 2.4s ease-in-out infinite; }
@keyframes tema-pisca {
    0%, 100% { opacity: 1; }
    50%      { opacity: .35; }
}

/* ---------- enfeite na logo do menu ---------- */
html[data-tema-enfeite] .nl-marca::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 1px;
    width: 34px;
    height: 31px;
    pointer-events: none;
    z-index: 2;
    background: center / contain no-repeat;
}
html[data-tema-enfeite="gorro_natal"] .nl-marca::before {
    transform: rotate(-12deg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 56'%3E%3Cpath d='M6 42Q8 14 34 6Q38 24 54 42Z' fill='%23d32f2f'/%3E%3Cpath d='M34 6Q38 24 54 42L40 42Q36 24 34 6Z' fill='%23b71c1c' opacity='.55'/%3E%3Crect x='2' y='38' width='56' height='13' rx='6.5' fill='%23fff'/%3E%3Ccircle cx='36' cy='7' r='6.5' fill='%23fff'/%3E%3C/svg%3E");
}
html[data-tema-enfeite="chapeu_festa"] .nl-marca::before {
    transform: rotate(-10deg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 56'%3E%3Cpath d='M30 4L8 48H52Z' fill='%23ffc107'/%3E%3Cpath d='M23 20L37 20L41 28L19 28Z M15 36L45 36L48 44L12 44Z' fill='%2300923f'/%3E%3Ccircle cx='30' cy='5' r='5' fill='%23e53935'/%3E%3C/svg%3E");
}

html[data-tema-enfeite="orelhas_coelho"] .nl-marca::before { top: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 56'%3E%3Cg transform='rotate(-14 20 44)'%3E%3Cellipse cx='20' cy='24' rx='8' ry='21' fill='%23fff' stroke='%23d7d7d7'/%3E%3Cellipse cx='20' cy='26' rx='4' ry='15' fill='%23f8bbd0'/%3E%3C/g%3E%3Cg transform='rotate(14 42 44)'%3E%3Cellipse cx='42' cy='24' rx='8' ry='21' fill='%23fff' stroke='%23d7d7d7'/%3E%3Cellipse cx='42' cy='26' rx='4' ry='15' fill='%23f8bbd0'/%3E%3C/g%3E%3C/svg%3E"); }
html[data-tema-enfeite="chapeu_bruxa"] .nl-marca::before { transform: rotate(-10deg); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 56'%3E%3Cpath d='M16 42Q24 18 38 3Q40 24 46 42Z' fill='%237b1fa2' stroke='%23ba68c8'/%3E%3Crect x='17' y='33' width='28' height='6' fill='%23ff9800'/%3E%3Cellipse cx='30' cy='44' rx='28' ry='7' fill='%236a1b9a' stroke='%23ba68c8'/%3E%3C/svg%3E"); }
html[data-tema-enfeite="chapeu_palha"] .nl-marca::before { transform: rotate(-8deg); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 56'%3E%3Cellipse cx='30' cy='42' rx='29' ry='8' fill='%23e0b25b' stroke='%23b8863b'/%3E%3Cpath d='M14 40Q14 14 30 14Q46 14 46 40Z' fill='%23ebc16e' stroke='%23b8863b'/%3E%3Crect x='14' y='32' width='32' height='6' fill='%23e53935'/%3E%3C/svg%3E"); }
html[data-tema-enfeite="coracao"] .nl-marca::before { transform: rotate(-12deg); width: 28px; height: 26px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 56'%3E%3Cpath d='M30 50C8 34 6 14 20 10C26 9 30 14 30 18C30 14 34 9 40 10C54 14 52 34 30 50Z' fill='%23e53935'/%3E%3Cpath d='M18 16Q22 13 25 17' fill='none' stroke='%23ff8a80' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E"); }
html[data-tema-enfeite="flor"] .nl-marca::before { transform: rotate(-10deg); width: 30px; height: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 56'%3E%3Cg fill='%23f48fb1' stroke='%23ec407a' stroke-width='1'%3E%3Ccircle cx='40' cy='28' r='9'/%3E%3Ccircle cx='33' cy='37.5' r='9'/%3E%3Ccircle cx='22' cy='34' r='9'/%3E%3Ccircle cx='22' cy='22' r='9'/%3E%3Ccircle cx='33' cy='18.5' r='9'/%3E%3C/g%3E%3Ccircle cx='30' cy='28' r='6' fill='%23ffca28'/%3E%3C/svg%3E"); }

/* enfeites de outros temas: bola (copa), gravata borboleta (pais), etiqueta (black friday), máscara (carnaval) */
html[data-tema-enfeite="bola_copa"] .nl-marca::before { transform: rotate(-8deg); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 56'%3E%3Ccircle cx='30' cy='30' r='22' fill='%23fff' stroke='%23333' stroke-width='2'/%3E%3Cpath d='M30 19L40 26.5L36 38.5H24L20 26.5Z' fill='%23333'/%3E%3Cpath d='M30 19V9M40 26.5L50 22.5M36 38.5L43 47M24 38.5L17 47M20 26.5L10 22.5' stroke='%23333' stroke-width='2' fill='none'/%3E%3C/svg%3E"); }
html[data-tema-enfeite="gravata_borboleta"] .nl-marca::before { transform: rotate(-8deg); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 56'%3E%3Cpath d='M30 28L6 13V43Z' fill='%231976d2' stroke='%230d47a1' stroke-width='1.5'/%3E%3Cpath d='M30 28L54 13V43Z' fill='%231976d2' stroke='%230d47a1' stroke-width='1.5'/%3E%3Crect x='24' y='20' width='12' height='16' rx='3.5' fill='%230d47a1'/%3E%3C/svg%3E"); }
html[data-tema-enfeite="etiqueta_preco"] .nl-marca::before { transform: rotate(-10deg); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 56'%3E%3Cpath d='M5 10H38L55 28L38 46H5Z' fill='%23212121' stroke='%23ffc107' stroke-width='2.5' stroke-linejoin='round'/%3E%3Ccircle cx='14' cy='28' r='3.2' fill='%23ffc107'/%3E%3Ctext x='33' y='35' font-size='19' font-weight='700' text-anchor='middle' fill='%23ffc107' font-family='Arial,sans-serif'%3E%25%3C/text%3E%3C/svg%3E"); }
html[data-tema-enfeite="mascara_carnaval"] .nl-marca::before { transform: rotate(-6deg); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 56'%3E%3Cpath d='M4 22Q30 5 56 22Q55 42 44 42Q36 42 30 33Q24 42 16 42Q5 42 4 22Z' fill='%239c27b0' stroke='%236a1b9a' stroke-width='1.6'/%3E%3Cellipse cx='17' cy='27' rx='7.5' ry='5' fill='%23fff' stroke='%236a1b9a'/%3E%3Cellipse cx='43' cy='27' rx='7.5' ry='5' fill='%23fff' stroke='%236a1b9a'/%3E%3Cpath d='M30 12L33 18H27Z M12 20L9 15M48 20L51 15' fill='%23ffc107' stroke='%23ffc107' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M50 16L58 3M54 21L60 12' stroke='%23ffc107' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* ---------- cantos de cima (teia, serpentinas): ficam no canto e não atrapalham o conteúdo ---------- */
.tema-cantos {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    pointer-events: none;
    z-index: 1020;
}
html.tema-com-menu .tema-cantos { left: 64px; }
html.tema-com-menu .tema-teia { width: 70px; height: 70px; }          /* painel: canto menor, cobre menos o trabalho */
html.tema-com-menu .tema-balanco { width: 42px; height: 105px; }
.tema-canto { position: absolute; top: 0; line-height: 0; }
.tema-canto-e { left: 0; }
.tema-canto-d { right: 0; transform: scaleX(-1); }
.tema-aranha { transform-origin: 35px 35px; animation: tema-balanca 3.6s ease-in-out infinite; }
.tema-balanco { transform-origin: 50% 0; animation: tema-balanca 4.2s ease-in-out infinite; }
@keyframes tema-balanca {
    0%, 100% { transform: rotate(-4deg); }
    50%      { transform: rotate(4deg); }
}

/* ---------- promoção do cardápio: as partículas passam por trás (o texto e o preço ficam legíveis) ----------
   Só nas páginas do cliente: no painel o canvas já fica atrás de tudo. Abaixo de modais e do cabeçalho (1050). */
html.tema-ativo:not(.tema-com-menu) .tema-acima { position: relative; z-index: 1031; }

/* ---------- moldura do banner da promoção (só quando há tema valendo) ---------- */
.tema-moldura { position: relative; overflow: hidden; isolation: isolate; }
.tema-moldura::before { content: ''; position: absolute; z-index: -1; pointer-events: none; background: no-repeat; }
html[data-tema="halloween"] .tema-moldura::before { top: 0; right: 0; width: 92px; height: 56px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 70'%3E%3Cpath d='M100,0L34,0M100,0L39,25.3M100,0L53.3,46.7M100,0L74.7,61M100,0L100,66M82,0Q85.9,2.8 83.4,6.9M83.4,6.9Q88,8 87.3,12.7M87.3,12.7Q92,12 93.1,16.6M93.1,16.6Q97.2,14.1 100,18M66,0Q73.3,5.3 68.6,13M68.6,13Q77.4,15.1 76,24M76,24Q84.9,22.6 87,31.4M87,31.4Q94.7,26.7 100,34M50,0Q60.8,7.8 53.8,19.1M53.8,19.1Q66.7,22.2 64.6,35.4M64.6,35.4Q77.8,33.3 80.9,46.2M80.9,46.2Q92.2,39.2 100,50M34,0Q48.2,10.3 39,25.3M39,25.3Q56.1,29.3 53.3,46.7M53.3,46.7Q70.7,43.9 74.7,61M74.7,61Q89.7,51.8 100,66' fill='none' stroke='%23fff' stroke-opacity='.75' stroke-width='.9' stroke-linecap='round'/%3E%3Cpath d='M76,24V46' stroke='%23fff' stroke-opacity='.7' stroke-width='.8'/%3E%3Cg transform='translate(76,50)'%3E%3Cpath d='M-3,-1l-5,-3M-3,1l-6,1M-3,3l-5,5M3,-1l5,-3M3,1l6,1M3,3l5,5' stroke='%23212121' stroke-width='1' fill='none' stroke-linecap='round'/%3E%3Cellipse rx='3.3' ry='4' fill='%23212121'/%3E%3Ccircle cy='-4.2' r='2.2' fill='%23212121'/%3E%3C/g%3E%3C/svg%3E") top right / contain no-repeat; }
html[data-tema="natal"] .tema-moldura::before { top: 0; left: 0; right: 0; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 14'%3E%3Cpath d='M0,0H60V5Q52,14 45,6Q40,12 33,5Q25,14 18,6Q10,13 0,5Z' fill='%23fff' fill-opacity='.92'/%3E%3C/svg%3E") repeat-x top left / 60px 14px; }
html[data-tema="junina"] .tema-moldura::before { top: 0; left: 0; right: 0; height: 9px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 16'%3E%3Cpath d='M0,1H120' stroke='%23fff' stroke-opacity='.7'/%3E%3Cpolygon points='1,2 19,2 10,15' fill='%23ffc107'/%3E%3Cpolygon points='21,2 39,2 30,15' fill='%23e53935'/%3E%3Cpolygon points='41,2 59,2 50,15' fill='%2343a047'/%3E%3Cpolygon points='61,2 79,2 70,15' fill='%23fff'/%3E%3Cpolygon points='81,2 99,2 90,15' fill='%23ff9800'/%3E%3Cpolygon points='101,2 119,2 110,15' fill='%231e88e5'/%3E%3C/svg%3E") repeat-x top left / 68px 9px; }
html[data-tema="namorados"] .tema-moldura::before { top: 0; right: 0; width: 92px; height: 56px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Cpath d='M0,8C-12,-2 -6,-12 0,-5C6,-12 12,-2 0,8Z' fill='%23fff' fill-opacity='.8' transform='translate(78,22) scale(1.8)'/%3E%3Cpath d='M0,8C-12,-2 -6,-12 0,-5C6,-12 12,-2 0,8Z' fill='%23fff' fill-opacity='.8' transform='translate(52,38) scale(1.1)'/%3E%3Cpath d='M0,8C-12,-2 -6,-12 0,-5C6,-12 12,-2 0,8Z' fill='%23fff' fill-opacity='.8' transform='translate(90,50) scale(1.1)'/%3E%3C/svg%3E") top right / contain no-repeat; }
html[data-tema="maes"] .tema-moldura::before { top: 0; right: 0; width: 92px; height: 56px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Ccircle cx='76' cy='13.7' r='9' fill='%23fff' fill-opacity='.85'/%3E%3Ccircle cx='85.8' cy='20.8' r='9' fill='%23fff' fill-opacity='.85'/%3E%3Ccircle cx='82.1' cy='32.4' r='9' fill='%23fff' fill-opacity='.85'/%3E%3Ccircle cx='69.9' cy='32.4' r='9' fill='%23fff' fill-opacity='.85'/%3E%3Ccircle cx='66.2' cy='20.8' r='9' fill='%23fff' fill-opacity='.85'/%3E%3Ccircle cx='76' cy='24' r='6.8' fill='%23ffca28'/%3E%3Ccircle cx='50' cy='33.1' r='6' fill='%23fff' fill-opacity='.85'/%3E%3Ccircle cx='56.6' cy='37.9' r='6' fill='%23fff' fill-opacity='.85'/%3E%3Ccircle cx='54.1' cy='45.6' r='6' fill='%23fff' fill-opacity='.85'/%3E%3Ccircle cx='45.9' cy='45.6' r='6' fill='%23fff' fill-opacity='.85'/%3E%3Ccircle cx='43.4' cy='37.9' r='6' fill='%23fff' fill-opacity='.85'/%3E%3Ccircle cx='50' cy='40' r='4.5' fill='%23ffca28'/%3E%3Ccircle cx='92' cy='44.2' r='5' fill='%23fff' fill-opacity='.85'/%3E%3Ccircle cx='97.5' cy='48.2' r='5' fill='%23fff' fill-opacity='.85'/%3E%3Ccircle cx='95.4' cy='54.7' r='5' fill='%23fff' fill-opacity='.85'/%3E%3Ccircle cx='88.6' cy='54.7' r='5' fill='%23fff' fill-opacity='.85'/%3E%3Ccircle cx='86.5' cy='48.2' r='5' fill='%23fff' fill-opacity='.85'/%3E%3Ccircle cx='92' cy='50' r='3.8' fill='%23ffca28'/%3E%3C/svg%3E") top right / contain no-repeat; }
html[data-tema="blackfriday"] .tema-moldura::before { top: 0; right: 0; width: 92px; height: 56px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Cg transform='rotate(-12 78 30)'%3E%3Ccircle cx='78' cy='30' r='24' fill='%23ffc107' stroke='%23212121' stroke-width='2.5'/%3E%3Ctext x='78' y='41' font-size='30' font-weight='700' text-anchor='middle' fill='%23212121' font-family='Arial,sans-serif'%3E%25%3C/text%3E%3C/g%3E%3C/svg%3E") top right / contain no-repeat; }
html[data-tema="aniversario"] .tema-moldura::before { top: 0; right: 0; width: 92px; height: 56px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Cpath d='M70,0c8,10 -8,20 0,30s8,18 0,26' fill='none' stroke='%23e91e63' stroke-width='3' stroke-linecap='round' stroke-opacity='.9'/%3E%3Cpath d='M86,0c8,10 -8,18 0,28' fill='none' stroke='%2300bcd4' stroke-width='3' stroke-linecap='round' stroke-opacity='.9'/%3E%3Crect x='56' y='8' width='9' height='4.5' rx='1' fill='%23ffc107' transform='rotate(20 60 10)'/%3E%3Crect x='68' y='28' width='9' height='4.5' rx='1' fill='%23e53935' transform='rotate(-30 72 30)'/%3E%3Ccircle cx='84' cy='8' r='3' fill='%231e88e5'/%3E%3Crect x='88' y='24' width='9' height='4.5' rx='1' fill='%23fff' transform='rotate(10 92 26)'/%3E%3Crect x='62' y='44' width='9' height='4.5' rx='1' fill='%238bc34a' transform='rotate(70 66 46)'/%3E%3Ccircle cx='80' cy='48' r='3' fill='%23e91e63'/%3E%3Crect x='92' y='42' width='9' height='4.5' rx='1' fill='%23ffc107' transform='rotate(35 96 44)'/%3E%3Crect x='48' y='26' width='9' height='4.5' rx='1' fill='%23e53935' transform='rotate(-60 52 28)'/%3E%3Ccircle cx='88' cy='14' r='3' fill='%231e88e5'/%3E%3C/svg%3E") top right / contain no-repeat; }
html[data-tema="carnaval"] .tema-moldura::before { top: 0; right: 0; width: 92px; height: 56px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Cpath d='M70,0c8,10 -8,20 0,30s8,18 0,26' fill='none' stroke='%23e91e63' stroke-width='3' stroke-linecap='round' stroke-opacity='.9'/%3E%3Cpath d='M86,0c8,10 -8,18 0,28' fill='none' stroke='%2300bcd4' stroke-width='3' stroke-linecap='round' stroke-opacity='.9'/%3E%3Crect x='56' y='8' width='9' height='4.5' rx='1' fill='%23ffc107' transform='rotate(20 60 10)'/%3E%3Crect x='68' y='28' width='9' height='4.5' rx='1' fill='%23e53935' transform='rotate(-30 72 30)'/%3E%3Ccircle cx='84' cy='8' r='3' fill='%231e88e5'/%3E%3Crect x='88' y='24' width='9' height='4.5' rx='1' fill='%23fff' transform='rotate(10 92 26)'/%3E%3Crect x='62' y='44' width='9' height='4.5' rx='1' fill='%238bc34a' transform='rotate(70 66 46)'/%3E%3Ccircle cx='80' cy='48' r='3' fill='%23e91e63'/%3E%3Crect x='92' y='42' width='9' height='4.5' rx='1' fill='%23ffc107' transform='rotate(35 96 44)'/%3E%3Crect x='48' y='26' width='9' height='4.5' rx='1' fill='%23e53935' transform='rotate(-60 52 28)'/%3E%3Ccircle cx='88' cy='14' r='3' fill='%231e88e5'/%3E%3C/svg%3E") top right / contain no-repeat; }
html[data-tema="pascoa"] .tema-moldura::before { top: 0; right: 0; width: 92px; height: 56px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Cellipse cx='80' cy='28' rx='14' ry='18' fill='%23fff' fill-opacity='.88'/%3E%3Cpath d='M66,28l3.5,-3 l3.5,3 l3.5,-3 l3.5,3 l3.5,-3' fill='none' stroke='%23f48fb1' stroke-width='2'/%3E%3Cellipse cx='52' cy='40' rx='9' ry='12' fill='%23fff' fill-opacity='.88'/%3E%3Cpath d='M43,40l2.2,-3 l2.2,3 l2.2,-3 l2.2,3 l2.2,-3' fill='none' stroke='%23f48fb1' stroke-width='2'/%3E%3C/svg%3E") top right / contain no-repeat; }
html[data-tema="copa"] .tema-moldura::before { top: 0; right: 0; width: 92px; height: 56px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Ccircle cx='78' cy='30' r='24' fill='%23fff' fill-opacity='.9' stroke='%23333' stroke-width='2'/%3E%3Cpath d='M78,19L88,26.5L84,38.5H72L68,26.5Z' fill='%23333'/%3E%3Cpath d='M78,19V8M88,26.5L98,22.5M84,38.5L91,47M72,38.5L65,47M68,26.5L58,22.5' stroke='%23333' stroke-width='2' fill='none'/%3E%3C/svg%3E") top right / contain no-repeat; }
html[data-tema="pais"] .tema-moldura::before { top: 0; right: 0; width: 92px; height: 56px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Cpath d='M72,30L46,14V46Z' fill='%23fff' fill-opacity='.85'/%3E%3Cpath d='M72,30L98,14V46Z' fill='%23fff' fill-opacity='.85'/%3E%3Crect x='66' y='21' width='12' height='18' rx='4' fill='%23fff'/%3E%3C/svg%3E") top right / contain no-repeat; }
@media (max-width: 575.98px) { .tema-moldura::before { opacity: .85; } }

/* Dia da Pizza e Dia do Cliente: enfeite da logo e moldura do banner */
html[data-tema-enfeite="fatia_pizza"] .nl-marca::before { transform: rotate(-10deg); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 56'%3E%3Cpath d='M8 12H52L30 52Z' fill='%23ffca28' stroke='%23d98f3a' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M5 10Q30 -3 55 10V17H5Z' fill='%23d98f3a' stroke='%23b9712a' stroke-width='1.5'/%3E%3Ccircle cx='22' cy='25' r='5' fill='%23d32f2f'/%3E%3Ccircle cx='37' cy='27' r='4.6' fill='%23d32f2f'/%3E%3Ccircle cx='29' cy='39' r='4' fill='%23d32f2f'/%3E%3C/svg%3E"); }
html[data-tema-enfeite="estrelas_cliente"] .nl-marca::before { transform: rotate(-6deg); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 56'%3E%3Cpolygon points='13,19 15.7,26.3 23.5,26.6 17.4,31.4 19.5,38.9 13,34.6 6.5,38.9 8.6,31.4 2.5,26.6 10.3,26.3' fill='%23ffc107' stroke='%23f9a825' stroke-width='1.2' stroke-linejoin='round'/%3E%3Cpolygon points='30,3 33.5,12.2 43.3,12.7 35.6,18.8 38.2,28.3 30,22.9 21.8,28.3 24.4,18.8 16.7,12.7 26.5,12.2' fill='%23ffc107' stroke='%23f9a825' stroke-width='1.2' stroke-linejoin='round'/%3E%3Cpolygon points='47,19 49.7,26.3 57.5,26.6 51.4,31.4 53.5,38.9 47,34.6 40.5,38.9 42.6,31.4 36.5,26.6 44.3,26.3' fill='%23ffc107' stroke='%23f9a825' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E"); }
html[data-tema="diapizza"] .tema-moldura::before { top: 0; right: 0; width: 92px; height: 56px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Cpath d='M62,8H98L80,50Z' fill='%23fff3c4' fill-opacity='.92' stroke='%23d98f3a' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M60,6Q80,-2 100,6V12H60Z' fill='%23d98f3a'/%3E%3Ccircle cx='74' cy='20' r='4.2' fill='%23d32f2f'/%3E%3Ccircle cx='88' cy='22' r='3.8' fill='%23d32f2f'/%3E%3Ccircle cx='80' cy='34' r='3.4' fill='%23d32f2f'/%3E%3C/svg%3E") top right / contain no-repeat; }
html[data-tema="diacliente"] .tema-moldura::before { top: 0; right: 0; width: 92px; height: 56px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Cpolygon points='80,7 84.2,18.2 96.2,18.7 86.8,26.2 90,37.8 80,31.1 70,37.8 73.2,26.2 63.8,18.7 75.8,18.2' fill='%23ffc107' stroke='%23fff' stroke-width='1.2' stroke-linejoin='round'/%3E%3Cpolygon points='56,31 58.2,36.9 64.6,37.2 59.6,41.2 61.3,47.3 56,43.8 50.7,47.3 52.4,41.2 47.4,37.2 53.8,36.9' fill='%23ffc107' stroke='%23fff' stroke-width='1.2' stroke-linejoin='round'/%3E%3Cpolygon points='94,43 95.7,47.6 100.7,47.8 96.8,50.9 98.1,55.7 94,52.9 89.9,55.7 91.2,50.9 87.3,47.8 92.3,47.6' fill='%23ffc107' stroke='%23fff' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E") top right / contain no-repeat; }

/* ---------- botão de ligar/desligar no menu ---------- */
.nl-menu .nl-item#nlTemaToggle.tema-desligado { opacity: .6; }

/* ---------- aviso de boas-vindas (some sozinho; tem botão fechar) ---------- */
.tema-toast {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 1070;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(360px, calc(100vw - 32px));
    padding: 10px 12px 10px 14px;
    background: #fff;
    color: #212529;
    border-left: 4px solid var(--tema-cor, #00923f);
    border-radius: 10px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .18);
    font: 700 14px/1.3 'Nunito', 'Roboto', sans-serif;
    animation: tema-entra .35s ease both;
    transition: opacity .3s ease, transform .3s ease;
}
.tema-toast-painel { left: 80px; }
.tema-toast.saindo { opacity: 0; transform: translateY(8px); }
.tema-toast button {
    flex: none;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: #f1f3f5;
    color: #495057;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.tema-toast button:hover { background: #e9ecef; }
@keyframes tema-entra {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- faixa da pré-visualização (admin) ---------- */
.tema-previa {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 1080;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px 8px 16px;
    background: #212529;
    color: #fff;
    border-radius: 24px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .3);
    font: 700 13px/1 'Nunito', 'Roboto', sans-serif;
}
.tema-previa button {
    border: 0;
    border-radius: 16px;
    padding: 6px 14px;
    background: #fff;
    color: #212529;
    font: inherit;
    cursor: pointer;
}

/* ---------- acessibilidade e impressão ---------- */
@media (prefers-reduced-motion: reduce) {
    .tema-bulbo, .tema-aranha, .tema-balanco { animation: none; }
    .tema-toast { animation: none; transition: none; }
}
@media (max-width: 575.98px) {
    html.tema-com-menu .tema-luzes, html.tema-com-menu .tema-cantos { left: 52px; }
    .tema-teia { width: 76px; height: 76px; }
    .tema-balanco { width: 42px; height: 105px; }
    .tema-toast-painel { left: 68px; }
}
@media print {
    .tema-canvas, .tema-luzes, .tema-cantos, .tema-toast, .tema-previa { display: none !important; }
}
