/*
 * O gerador usa estes elementos como fonte do html2canvas. Eles precisam
 * continuar renderizados para a captura, mas nunca podem participar do
 * layout da página nem empurrar o modal para baixo. Esta regra pertence ao
 * módulo para que o gerador seja independente do tema ativo.
 */
#lel-yazo-card-source {
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
    z-index: -1 !important;
    width: 2000px !important;
}

/* O tema anima elementos ao entrarem na tela. As fontes dos cards ficam fora
 * da tela para o html2canvas e, sem este ajuste, foto e textos saem invisíveis. */
#lel-yazo-card-source .reveal-scroll {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

/* Preserva as dimensões dos textos da arte, usando a fonte definida pelo tema. */
#lel-yazo-card-source h2,
#lel-yazo-card-source h3 {
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-transform: none !important;
    position: absolute !important;
    z-index: 3 !important;
}

/* O tema posiciona o texto capturado alguns pixels abaixo da prévia do painel. */
#lel-yazo-card-source h3 {
    transform: translateY(-0.25em) !important;
}

/* Camada visual aplicada sobre a foto, sem alterar ou desfocar a imagem. */
#lel-yazo-card-source .lel-yazo-card-photo-overlay {
    position: absolute;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}
#lel-yazo-card-source .lel-yazo-card-photo-overlay > span {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.lel-yazo-card-action { margin: 1rem 0; }
.lel-yazo-card-open { background: var(--lel-yazo-accent, #ffb72a); color: var(--lel-yazo-accent-contrast, #111); border: 0; border-radius: 6px; padding: .5rem .85rem; font-size: .85rem; line-height: 1.4; font-weight: 600; cursor: pointer; }
@media (max-width: 768px) { .lel-yazo-card-action { order: 6; width: 100%; margin: .75rem 0; text-align: center; } }
.lel-yazo-card-dialog[hidden], .lel-yazo-card-dialog [hidden] { display: none !important; }
html.lel-yazo-card-modal-open { overflow-y: auto !important; scroll-behavior: auto !important; margin-top: 0 !important; }
.lel-yazo-card-dialog { position: relative; z-index: 100000; display: flex; box-sizing: border-box; min-height: 100dvh; padding: 1rem; }
.lel-yazo-card-dialog::before { content: ''; position: fixed; inset: 0; z-index: -1; background: rgba(0,0,0,.78); }
.lel-yazo-card-dialog-panel { box-sizing: border-box; display: flex; flex-direction: column; width: min(100%, 1140px); margin: auto; border: 1px solid #494949; border-radius: 6px; background: #212121; color: #eef0f4; box-shadow: 0 18px 60px rgba(0,0,0,.4); }
.lel-yazo-card-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-shrink: 0; padding: 1rem; background: #151515; border-bottom: 1px solid #3e3e3e; }
.lel-yazo-card-dialog-head h2 { color: #eef0f4; margin: 0; font-size: 1.2rem; line-height: 1.3; }
.lel-yazo-card-close { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #494949; border-radius: 5px; background: transparent; color: #ffb72a; cursor: pointer; font-size: 1.35rem; line-height: 1; padding: 0; }
.lel-yazo-card-dialog-body { padding: 1.1rem 1rem 1rem; text-align: center; }
.lel-yazo-card-dialog-body h3 { color: #eef0f4; margin: 0 0 1rem; font-size: 1rem; line-height: 1.4; }
.lel-yazo-card-status { color: #e5e5e5; margin: 0 auto 1rem; max-width: 540px; font-size: .9rem; }
.lel-yazo-card-status.is-ready { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lel-yazo-card-dialog-content { width: min(100%, 540px); margin: 0 auto; }
.lel-yazo-card-preview-frame { padding: 8px; border: 1px solid #494949; border-radius: 8px; background: #191919; }
.lel-yazo-card-preview { display: block; box-sizing: border-box; width: auto; max-width: 100%; max-height: min(60vh, 655px); margin: 0 auto; border: 1px solid #494949; border-radius: 6px; }
.lel-yazo-card-dialog-actions { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; }
.lel-yazo-card-dialog-actions a, .lel-yazo-card-dialog-actions button { display: flex; justify-content: center; align-items: center; gap: .45rem; box-sizing: border-box; width: 100%; min-height: 38px; border: 1px solid #505050; border-radius: 6px; background: transparent; color: #ffb72a; padding: .55rem 1rem; text-align: center; text-decoration: none; font: inherit; cursor: pointer; }
.lel-yazo-card-dialog-actions .lel-yazo-card-share { background: #ffb72a; border-color: #ffb72a; color: #181818; }
.lel-yazo-card-dialog-actions svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.lel-yazo-card-dialog-footer { flex-shrink: 0; padding: 1rem; border-top: 1px solid #424242; background: #151515; color: #bcbec3; font-size: .85rem; line-height: 1.45; text-align: center; }
.lel-yazo-card-dialog button:focus-visible, .lel-yazo-card-dialog a:focus-visible { outline: 3px solid #ffb72a; outline-offset: 2px; }
.lel-yazo-card-dialog .lel-yazo-card-close:hover, .lel-yazo-card-dialog .lel-yazo-card-close:focus { background: #242424; color: #ffb72a; box-shadow: none; }
@media (max-width: 560px) { .lel-yazo-card-dialog { padding: .6rem; } .lel-yazo-card-dialog-head, .lel-yazo-card-dialog-footer { padding: .75rem; } .lel-yazo-card-dialog-body { padding: .8rem .75rem; } .lel-yazo-card-preview { max-height: 48vh; } }
