/* QR code generator (/qr-code-generator): what is its own (the code card, the colour pickers, the file input). Panels,
   buttons, fields, messages and colours come from the app kit (css/app-kit, docs/app-kit.md). Loaded only on this app's
   page (StylePaths). */

/* --- The app's own -------------------------------------------------------------------------------------------- */

/* On a phone the site's photo-app rule (seo-pages.css, body.filter-app-mode ... > .filter-landing-stage) sets
   align-items: start on every stage, which beats the kit's stretch: the card would shrink to the code's width. */
.qrc-landing-app > .ak-stage > * {
    align-self: stretch;
}

/* --- The code, centred on its card ------------------------------------------------------------------------------- */

.qrc-landing-app .qrc-card {
    align-items: center;
    justify-content: center;
    margin: 0;
}

.qrc-landing-app .qrc-preview {
    width: min(100%, 22rem);
    aspect-ratio: 1 / 1;
}

.qrc-landing-app .qrc-preview svg {
    display: block;
    width: 100%;
    height: 100%;
}

.qrc-landing-app .qrc-info {
    margin: 0;
    font-weight: 600;
}

.qrc-landing-app .qrc-payload summary {
    cursor: pointer;
}

.qrc-landing-app .qrc-payload .ak-output {
    max-height: 12rem;
    margin-top: 0.4rem;
}

.qrc-landing-app .qrc-status {
    min-height: 1.2em;
}

/* --- Controls: colour pickers side by side, the slider values, the logo file ------------------------------------- */

.qrc-landing-app .qrc-colors {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.5rem;
}

.qrc-landing-app .qrc-color {
    width: 100%;
    height: 2.2rem;
    padding: 0.1rem;
    border: 1px solid var(--ak-border);
    border-radius: var(--ak-radius-sm);
    background: var(--ak-field);
    cursor: pointer;
}

.qrc-landing-app .qrc-value {
    color: var(--ak-text);
    font-weight: 600;
}

.qrc-landing-app .qrc-file {
    color: var(--ak-text);
    font-size: var(--ak-fs-sm);
}

.qrc-landing-app .qrc-color:focus-visible,
.qrc-landing-app .qrc-file:focus-visible {
    outline: 2px solid var(--ak-accent);
    outline-offset: 2px;
}

.qrc-landing-app .qrc-logo-remove {
    align-self: flex-start;
}

@container (max-width: 640px) {
    .qrc-landing-app .ak-stage > .ak-btn-row > .ak-btn {
        flex: 1 1 auto;
    }
}
