/* Gerador de QR Code — só o que é específico; a base vem de /apps/_shared/app.css */

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

/* Tipos */
.types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.type input { position: absolute; opacity: 0; pointer-events: none; }
.type span {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 12px 6px; border: 1px solid var(--line); border-radius: var(--radius);
    font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; text-align: center;
    transition: border-color .15s, background .15s, color .15s;
}
.type svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.type span:hover { border-color: var(--brand); color: var(--ink); }
.type input:checked + span { background: var(--brand-50); border-color: var(--brand-600); color: var(--brand-700); box-shadow: inset 0 0 0 1px var(--brand-600); }
.type input:focus-visible + span { outline: 2px solid var(--brand-600); outline-offset: 2px; }

.color input[type="color"] {
    width: 100%; height: 44px; padding: 4px;
    border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer;
}
.color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 6px; }

.more { margin: 0 0 14px; }
.more summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--brand-700); margin-bottom: 12px; }

.logo-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.logo-name { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }

/* Preview */
.qr-stage {
    position: relative; aspect-ratio: 1;
    border-radius: var(--radius); background: var(--surface);
    display: grid; place-items: center; padding: 18px; margin-bottom: 16px;
}
.qr-stage.is-transparent {
    background-color: #fff;
    background-image: conic-gradient(#e9edf2 25%, transparent 0 50%, #e9edf2 0 75%, transparent 0);
    background-size: 20px 20px;
}
#qr { width: 100%; height: 100%; display: grid; place-items: center; transition: opacity .2s, filter .2s; }
#qr canvas, #qr svg { width: 100% !important; height: auto !important; max-width: 100%; border-radius: 8px; box-shadow: 0 6px 20px -10px rgba(17, 28, 40, .35); }
.qr-stage.is-empty #qr { opacity: .08; filter: blur(2px); }
.empty {
    position: absolute; inset: 0; margin: 0; display: grid; place-items: center;
    padding: 24px; text-align: center; color: var(--muted); font-weight: 500;
}
.preview .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.preview .actions .btn.ghost { grid-column: 1 / -1; }

@media (max-width: 860px) {
    .qr-stage { max-width: 340px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 480px) {
    .types { gap: 6px; }
    .type span { padding: 10px 2px; font-size: 11.5px; }
}
