/* Medalha de identificação (pet shops; pet premium).
 *
 * Cores de MARCA como var(--jg-<hex>, #<hex>): a camisa, rótulo e botões; selo
 * holográfico prateado (sem azul), gravação e ouro em hex direto.
 *
 * Contrato: igual ao do Lacre de autenticidade (css/tenis.css): câmera (scale) e
 * giro do selo (scaleX) são JS, pelo relógio; aqui o selo, a gravação do verso e
 * o cartão. O selo fica preso na barra em (104,66) do viewBox → 65% / 60%.
 */

.md__palco {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    aspect-ratio: 16 / 11;
    border-radius: 14px;
    overflow: hidden;
    background: #E3E0DA;
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .45);
    user-select: none;
    font-family: Arial, sans-serif;
}
.md__camera { position: absolute; inset: 0; transform-origin: 65% 74%; }
.md__cena { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.md__rotulo {
    position: absolute;
    left: 2%; bottom: 2%;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--jg-14532d, #14532d);
    border: 1px solid #C9A227;
    font: 700 10px/1 Arial, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #FFF3C4;
    white-space: nowrap;
    z-index: 8;
}
.md__rotulo img { width: 12px; height: 12px; }

/* ---------------- o lacre ---------------- */

.md__lacre {
    position: absolute;
    left: 65%; top: 56%;
    width: 17%;
    margin-left: -8.5%;
    transform-origin: 50% 0;
    z-index: 3;
}
.md__cordao { display: block; width: 2px; height: 6px; margin: 0 auto; border-radius: 2px; background: linear-gradient(180deg, #2F3834, #56615C); }
.md__placa { position: relative; width: 100%; aspect-ratio: 5 / 7; }
.md__frente, .md__verso {
    position: absolute; inset: 0;
    box-sizing: border-box;
    border-radius: 16% 16% 22% 22%;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5%;
    padding: 20% 8% 10%;
    text-align: center;
    box-shadow: 0 6px 12px -6px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.md__furo { position: absolute; left: 50%; top: 5%; width: 14%; aspect-ratio: 1; margin-left: -7%; border-radius: 50%; background: #E3E0DA; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5); }
.md__frente {
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0) 25%, rgba(255, 255, 255, .8) 40%, rgba(255, 255, 255, 0) 55%),
        linear-gradient(135deg, #E9ECEB, #F9D9E8 25%, #E6DCF7 45%, var(--jg-d8f1e4, #D8F1E4) 65%, #FFF1C4 85%, #D9DEDB);
    background-size: 250% 100%, 100% 100%;
    color: var(--jg-14532d, #14532d);
    animation: md-reflexo 1.4s linear infinite;
}
@keyframes md-reflexo { from { background-position: 120% 0, 0 0; } to { background-position: -120% 0, 0 0; } }
.md__frente img { width: 42%; aspect-ratio: 1; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }
.md__frente b { font: 700 clamp(8px, 2.2vw, 11px)/1 Arial, sans-serif; letter-spacing: .3em; }
.md__frente em { display: block; width: 60%; height: 2px; border-radius: 1px; background: #C9A227; }
.md__verso { visibility: hidden; transform: scaleX(-1); background: linear-gradient(160deg, #F3F4F4, #C9CECC); color: #1E2321; }
.md__gravacao {
    width: 100%; min-height: 56%;
    box-sizing: border-box;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    padding: 8% 4%;
    border-radius: 8px;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .06) 0 2px, rgba(0, 0, 0, 0) 2px 6px), #E8E4DD;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .3);
}
.md__gravacao small { font: 700 clamp(6px, 1.6vw, 8px)/1 Arial, sans-serif; letter-spacing: .12em; color: #5C6B60; }
.md__gravacao code { white-space: nowrap; font: 700 clamp(6px, 1.6vw, 8.5px)/1 Consolas, 'Courier New', monospace; color: #111; letter-spacing: .04em; }
.md__barras { display: block; width: 80%; height: 10px; background: repeating-linear-gradient(90deg, #111 0 1px, transparent 1px 3px, #111 3px 5px, transparent 5px 6px); }

/* no prêmio a gravação brilha e vira "Lacre premiado" */
.md--premiou .md__gravacao {
    background: radial-gradient(circle at 50% 40%, #FFF6D0, #F4C430 55%, #C98E0E);
    animation: md-brilho .8s ease-out forwards;
}
@keyframes md-brilho { from { box-shadow: inset 0 1px 3px rgba(0, 0, 0, .3), 0 0 0 0 rgba(255, 214, 90, 0); } to { box-shadow: inset 0 1px 2px rgba(0, 0, 0, .2), 0 0 18px 6px rgba(255, 214, 90, .8); } }
.md--premiou .md__gravacao b { font: 700 clamp(7px, 1.9vw, 9.5px)/1.05 Georgia, 'Times New Roman', serif; color: var(--jg-14532d, #14532d); text-transform: uppercase; }
.md--premiou .md__gravacao small { color: #6B4E0E; }
.md--premiou .md__gravacao span { font: 700 clamp(7px, 1.9vw, 10px)/1.1 Georgia, serif; color: #3A2A06; overflow-wrap: anywhere; }

.md__faiscas { position: absolute; left: 65%; top: 74%; width: 0; height: 0; z-index: 5; pointer-events: none; }
.md__faiscas i {
    position: absolute; left: 0; top: 0;
    width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px;
    background: #FFF6C9;
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
    filter: drop-shadow(0 0 3px rgba(255, 214, 90, .95));
    opacity: 0;
}
.md__faiscas i:nth-child(1) { --dx: -80px; --dy: -50px; }
.md__faiscas i:nth-child(2) { --dx: 80px;  --dy: -56px; animation-delay: .05s; }
.md__faiscas i:nth-child(3) { --dx: -96px; --dy: 20px;  animation-delay: .1s; }
.md__faiscas i:nth-child(4) { --dx: 94px;  --dy: 30px;  animation-delay: .07s; }
.md__faiscas i:nth-child(5) { --dx: -30px; --dy: -86px; animation-delay: .12s; }
.md__faiscas i:nth-child(6) { --dx: 36px;  --dy: 80px;  animation-delay: .03s; }
.md--premiou .md__faiscas i { animation: md-faisca .9s .2s ease-out forwards; }
@keyframes md-faisca {
    0%   { transform: translate(0, 0) scale(.3) rotate(0deg); opacity: 0; }
    20%  { opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(1) rotate(60deg); opacity: .9; }
}

.md__cartao {
    position: absolute;
    left: 20%; top: 40%;
    width: 30%;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 3% 2%;
    box-sizing: border-box;
    text-align: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #FFF3B0, #F4C430 50%, #D49A12);
    border: 2px solid #FFF6D8;
    box-shadow: 0 0 0 1.5px #9A7414, 0 12px 20px -8px rgba(0, 0, 0, .5);
    transform: translate(-50%, -50%) scale(.1);
    opacity: 0;
    z-index: 6;
}
.md__cartao img { width: 58%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 2px solid #FFFFFF; background: #fff; flex: none; }
.md__cartao div { min-width: 0; font: 700 clamp(11px, 3vw, 15px)/1.2 Georgia, 'Times New Roman', serif; color: var(--jg-14532d, #14532d); }
.md__cartao small { display: block; font: 700 clamp(8px, 2vw, 10px)/1.2 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #6B4E0E; margin-bottom: 2px; }
.md__cartao span { display: block; overflow-wrap: anywhere; }
.md--premiou .md__cartao { animation: md-cartao .6s .7s cubic-bezier(.3, 1.3, .5, 1) forwards; }
@keyframes md-cartao { to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

/* ---------------- botão e mensagem ---------------- */

.md__botao {
    display: block;
    width: 100%;
    max-width: 480px;
    margin: 10px auto 0;
    padding: 12px 10px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, var(--jg-2aa152, #2AA152), var(--jg-0a7a00, #0A7A00));
    color: #fff;
    font: 700 15px/1.2 Arial, sans-serif;
    letter-spacing: .02em;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: 0 6px 14px -6px rgba(var(--jg-rgb-0a7a00, 10,122,0), .8), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.md__botao:hover:not(:disabled) { filter: brightness(1.06); }
.md__botao:disabled { opacity: .55; cursor: default; }

.md__msg {
    max-width: 480px;
    min-height: 56px;
    margin: 10px auto 0;
    padding: 8px 12px;
    box-sizing: border-box;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9px;
    text-align: center;
    font: 700 clamp(11px, 3vw, 14px)/1.35 Arial, sans-serif;
    color: #46564c;
    background: var(--jg-eef4ef, #EEF4EF);
    border: 1px solid var(--jg-dce6de, #DCE6DE);
}
.md__msg--premiado { background: var(--jg-e3f5e6, #E3F5E6); border-color: var(--jg-9fd8ab, #9FD8AB); color: var(--jg-14532d, #14532d); }
.md__msg--consolo  { background: #F1F3F1; border-color: #CDD5CE; color: #4F5A52; }
.md__msg b { color: var(--jg-0a7a00, #0A7A00); }
.md__msg--consolo b { color: #5C6B60; }

/* ---------------- vitrine ---------------- */

.md__premios {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
    margin: 14px auto 0; max-width: 640px;
}
.md__titulo {
    width: 100%; text-align: center;
    font: 700 13px/1.3 Arial, sans-serif; color: var(--jg-14532d, #14532d); margin-bottom: 2px;
}
.md__premio { width: 74px; text-align: center; font: 600 10px/1.2 Arial, sans-serif; color: #46564c; }
.md__premio img { width: 100%; border-radius: 6px; display: block; margin-bottom: 3px; }

/* ---------------- movimento reduzido ---------------- */
@media (prefers-reduced-motion: reduce) {
    .md--premiou .md__gravacao { animation: none; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .2), 0 0 18px 6px rgba(255, 214, 90, .8); }
    .md--premiou .md__faiscas i { animation: none; opacity: .9; transform: translate(var(--dx), var(--dy)) scale(1) rotate(60deg); }
    .md__frente { animation: none; }
    .md--premiou .md__cartao { animation: none; transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* ================= medalha de identificação (sobre a base do selo) =================
 * A medalha fica presa na argola em (80,58) do viewBox → 50% / 53%; o centro dela
 * fica perto de 50% / 71%, onde a câmera se aproxima.
 */
.md__palco { background: #E9E2D8; }
.md__camera { transform-origin: 50% 71%; }
.md__lacre { left: 50%; top: 51%; width: 22%; margin-left: -11%; }
.md__cordao { width: 12%; height: auto; aspect-ratio: 1; margin: 0 auto -5%; border-radius: 50%; background: none; border: 2px solid #C9CFCC; box-sizing: border-box; position: relative; z-index: 2; }
.md__placa { aspect-ratio: 1; }
.md__frente, .md__verso {
    border-radius: 50%;
    padding: 16% 10% 10%;
    gap: 4%;
    box-shadow: 0 8px 14px -6px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(255, 255, 255, .5), inset 0 -3px 6px rgba(0, 0, 0, .2);
}
.md__frente {
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0) 25%, rgba(255, 255, 255, .75) 40%, rgba(255, 255, 255, 0) 55%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .1) 0 1px, rgba(0, 0, 0, .04) 1px 2px),
        radial-gradient(circle at 35% 30%, #F7F8F7, #C3C9C6 65%, #939C98);
    background-size: 250% 100%, auto, auto;
    color: #3A4541;
}
.md__frente b { font: 700 clamp(11px, 3vw, 15px)/1 Georgia, 'Times New Roman', serif; letter-spacing: .18em; text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
.md__frente em { width: 44%; height: 1px; background: #6E7874; }
.md__furo { top: 6%; width: 11%; margin-left: -5.5%; background: #E9E2D8; }
.md__verso { background: radial-gradient(circle at 60% 30%, #F2F4F3, #BFC6C2 65%, #8E9894); color: #4A5550; padding: 14%; }

/* a patinha gravada (quatro dedos e a almofada) */
.md__pata {
    display: block;
    width: 30%; aspect-ratio: 1;
    background:
        radial-gradient(ellipse 30% 25% at 50% 70%, currentColor 97%, transparent 100%),
        radial-gradient(ellipse 11% 13% at 20% 42%, currentColor 97%, transparent 100%),
        radial-gradient(ellipse 11% 13% at 38% 22%, currentColor 97%, transparent 100%),
        radial-gradient(ellipse 11% 13% at 62% 22%, currentColor 97%, transparent 100%),
        radial-gradient(ellipse 11% 13% at 80% 42%, currentColor 97%, transparent 100%);
    opacity: .75;
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .6));
}
.md__gravacao {
    width: 100%; min-height: 0; aspect-ratio: 1;
    border-radius: 50%;
    padding: 12%;
    gap: 6%;
    background: none;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}
.md__gravacao .md__pata { width: 42%; }
.md__gravacao img { width: 22%; opacity: .55; filter: grayscale(1); }

/* no prêmio: relevo dourado brilhante */
.md--premiou .md__gravacao b { font-size: clamp(9px, 2.5vw, 13px); text-shadow: 0 1px 0 rgba(255, 255, 255, .8), 0 -1px 0 rgba(90, 60, 0, .4); letter-spacing: .04em; }
.md--premiou .md__gravacao span { text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }

.md__faiscas { left: 50%; top: 71%; }
.md__cartao { left: 16%; top: 70%; width: 25%; }
