/* QR Generator  standalone app styles */

:root {
    --qrg-font: 'Inter', system-ui, -apple-system, sans-serif;
    --qrg-bg: #f4f6fb;
    --qrg-surface: #ffffff;
    --qrg-text: #0f172a;
    --qrg-text-muted: #64748b;
    --qrg-border: #e2e8f0;
    --qrg-primary: #6366f1;
    --qrg-primary-dark: #4f46e5;
    --qrg-primary-soft: rgba(99, 102, 241, 0.12);
    --qrg-violet: #8b5cf6;
    --qrg-radius: 14px;
    --qrg-radius-lg: 20px;
    --qrg-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    --qrg-shadow-lg: 0 12px 40px rgba(99, 102, 241, 0.12);
    --qrg-danger: #dc2626;
    --qrg-warning-bg: #fffbeb;
    --qrg-warning-border: #fcd34d;
    --qrg-warning-text: #92400e;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.qrg-app {
    margin: 0;
    font-family: var(--qrg-font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--qrg-text);
    background: var(--qrg-bg);
    -webkit-font-smoothing: antialiased;
}

.qrg-container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.is-hidden {
    display: none !important;
}

.qrg-muted {
    color: var(--qrg-text-muted);
    font-weight: 400;
}

.qrg-required {
    color: var(--qrg-danger);
}

/* Header */
.qrg-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--qrg-border);
}

.qrg-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.qrg-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--qrg-text);
}

.qrg-brand__icon {
    display: flex;
    flex-shrink: 0;
}

.qrg-brand__copy {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    line-height: 1.2;
}

.qrg-brand__title {
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--qrg-text);
    text-decoration: none;
}

.qrg-brand__title:hover {
    color: var(--qrg-primary);
}

.qrg-brand__byline {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--qrg-text-muted);
}

.qrg-brand__site {
    color: var(--qrg-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.qrg-brand__site:hover {
    color: var(--qrg-primary);
    text-decoration: underline;
}

.qrg-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.qrg-nav__link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--qrg-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.qrg-nav__link:hover {
    color: var(--qrg-primary);
}

.qrg-nav__link.is-active {
    color: var(--qrg-primary-dark);
    font-weight: 600;
}

/* Main */
.qrg-main {
    min-height: calc(100vh - 64px - 80px);
}

/* Hero */
.qrg-hero {
    padding: 3rem 0 2rem;
    background:
        radial-gradient(ellipse 80% 60% at 50% -20%, rgba(99, 102, 241, 0.18), transparent),
        var(--qrg-bg);
}

.qrg-hero__content {
    max-width: 640px;
}

.qrg-hero__badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    margin-bottom: 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--qrg-primary-dark);
    background: var(--qrg-primary-soft);
    border-radius: 999px;
}

.qrg-hero__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.875rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.qrg-hero__lead {
    margin: 0;
    font-size: 1.0625rem;
    color: var(--qrg-text-muted);
    line-height: 1.65;
}

.qrg-hero--compact {
    padding: 2rem 0 1.25rem;
}

/* Tool section */
.qrg-tool {
    padding: 1rem 0 4rem;
}

.qrg-tool__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (min-width: 992px) {
    .qrg-tool__grid {
        grid-template-columns: 1.15fr 0.85fr;
        gap: 2rem;
    }
}

.qrg-panel {
    background: var(--qrg-surface);
    border: 1px solid var(--qrg-border);
    border-radius: var(--qrg-radius-lg);
    padding: 1.75rem;
    box-shadow: var(--qrg-shadow);
}

@media (min-width: 768px) {
    .qrg-panel {
        padding: 2rem;
    }
}

.qrg-panel--preview {
    position: sticky;
    top: 88px;
}

.qrg-panel__head {
    margin-bottom: 1.5rem;
}

.qrg-panel__title {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.qrg-panel__subtitle {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--qrg-text-muted);
}

/* Form */
.qrg-form__section-title {
    margin: 0 0 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--qrg-text-muted);
}

.qrg-divider {
    height: 1px;
    margin: 1.5rem 0;
    background: var(--qrg-border);
}

.qrg-field {
    margin-bottom: 0;
}

.qrg-field--spaced {
    margin-top: 1rem;
}

.qrg-field-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.qrg-field-row--spaced {
    margin-top: 1rem;
}

@media (min-width: 576px) {
    .qrg-field-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .qrg-field-row .qrg-field:last-child:nth-child(odd):only-child,
    .qrg-field-row > .qrg-field:only-child {
        grid-column: 1 / -1;
    }
}

.qrg-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--qrg-text);
}

.qrg-label--spaced {
    margin-top: 1rem;
}

.qrg-type-picker {
    margin-bottom: 1.25rem;
}

.qrg-type-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

@media (min-width: 640px) {
    .qrg-type-tabs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.qrg-type-tab {
    padding: 0.6rem 0.75rem;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    color: var(--qrg-text-muted);
    background: var(--qrg-bg);
    border: 1px solid var(--qrg-border);
    border-radius: 10px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.qrg-type-tab:hover {
    color: var(--qrg-text);
    border-color: #cbd5e1;
}

.qrg-type-tab:focus {
    outline: none;
}

.qrg-type-tab:focus-visible {
    border-color: var(--qrg-primary);
    box-shadow: 0 0 0 3px var(--qrg-primary-soft);
}

.qrg-type-tab.is-active {
    color: var(--qrg-primary);
    background: var(--qrg-primary-soft);
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.12);
}

.qrg-field-group[role="tabpanel"] {
    margin-top: 0.25rem;
}

.qrg-input {
    display: block;
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--qrg-text);
    background: var(--qrg-surface);
    border: 1px solid var(--qrg-border);
    border-radius: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.qrg-input:focus {
    outline: none;
    border-color: var(--qrg-primary);
    box-shadow: 0 0 0 3px var(--qrg-primary-soft);
}

.qrg-textarea {
    resize: vertical;
    min-height: 88px;
}

.qrg-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.25rem;
}

.qrg-input--color {
    height: 44px;
    padding: 0.25rem;
    cursor: pointer;
}

.qrg-input--file {
    padding: 0.5rem;
    font-size: 0.875rem;
}

.qrg-range {
    width: 100%;
    margin-top: 0.5rem;
    accent-color: var(--qrg-primary);
}

.qrg-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9375rem;
}

.qrg-check__input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--qrg-primary);
}

.qrg-check--spaced {
    margin-top: 0.65rem;
}

.qrg-hint {
    margin: 0.4rem 0 0;
    font-size: 0.8125rem;
    color: var(--qrg-text-muted);
}

/* Preview */
.qrg-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    padding: 1.5rem;
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px dashed var(--qrg-border);
    border-radius: var(--qrg-radius);
}

.qrg-preview.is-transparent {
    background-color: #fff;
    background-image:
        linear-gradient(45deg, #cbd5e1 25%, transparent 25%),
        linear-gradient(-45deg, #cbd5e1 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #cbd5e1 75%),
        linear-gradient(-45deg, transparent 75%, #cbd5e1 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}

.qrg-input--color:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.qrg-preview canvas {
    max-width: 100%;
    height: auto !important;
    border-radius: 8px;
}

.qrg-preview-placeholder {
    opacity: 0.2;
}

.qrg-preview__hint {
    margin: 1rem 0 0;
    font-size: 0.8125rem;
    text-align: center;
    color: var(--qrg-text-muted);
}

.qrg-alert {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--qrg-warning-text);
    background: var(--qrg-warning-bg);
    border: 1px solid var(--qrg-warning-border);
    border-radius: 10px;
}

.qrg-preview__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.qrg-download__label {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--qrg-text-muted);
    text-align: center;
}

.qrg-download__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.qrg-btn--download {
    padding: 0.7rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--qrg-primary-dark);
    background: var(--qrg-primary-soft);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.qrg-btn--download:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.qrg-btn--download:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

/* Buttons */
.qrg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.8rem 1.25rem;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.qrg-btn--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--qrg-primary) 0%, var(--qrg-violet) 100%);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.qrg-btn--primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--qrg-shadow-lg);
}

.qrg-btn--primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.qrg-btn--ghost {
    color: var(--qrg-text-muted);
    background: transparent;
    border: 1px solid var(--qrg-border);
}

.qrg-btn--ghost:hover {
    color: var(--qrg-text);
    border-color: #cbd5e1;
    background: #f8fafc;
}

/* Features */
.qrg-features {
    padding: 3rem 0 4rem;
    background: var(--qrg-surface);
    border-top: 1px solid var(--qrg-border);
}

.qrg-features__header {
    text-align: center;
    max-width: 520px;
    margin: 0 auto 2.5rem;
}

.qrg-features__title {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.qrg-features__lead {
    margin: 0;
    color: var(--qrg-text-muted);
}

.qrg-features__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 576px) {
    .qrg-features__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .qrg-features__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.qrg-feature-card {
    padding: 1.5rem;
    background: var(--qrg-bg);
    border: 1px solid var(--qrg-border);
    border-radius: var(--qrg-radius);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.qrg-feature-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--qrg-shadow);
}

.qrg-feature-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 1rem;
    color: var(--qrg-primary);
    background: var(--qrg-primary-soft);
    border-radius: 10px;
}

.qrg-feature-card__title {
    margin: 0 0 0.4rem;
    font-size: 1rem;
    font-weight: 600;
}

.qrg-feature-card__text {
    margin: 0;
    font-size: 0.875rem;
    color: var(--qrg-text-muted);
    line-height: 1.55;
}

/* Footer */
.qrg-footer {
    padding: 1.5rem 0;
    border-top: 1px solid var(--qrg-border);
    background: var(--qrg-surface);
}

.qrg-footer__inner {
    text-align: center;
}

.qrg-footer__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.5rem;
    margin-bottom: 0.75rem;
}

.qrg-footer__nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--qrg-text-muted);
    text-decoration: none;
}

.qrg-footer__nav a:hover {
    color: var(--qrg-primary);
}

.qrg-footer__text {
    margin: 0 0 0.25rem;
    font-size: 0.875rem;
    color: var(--qrg-text-muted);
}

.qrg-footer__meta {
    margin: 0;
    font-size: 0.8125rem;
    color: #94a3b8;
}

/* Screen reader only */
.qrg-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Breadcrumb */
.qrg-breadcrumb {
    padding: 0.75rem 0 0;
    background: var(--qrg-bg);
}

.qrg-breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.8125rem;
}

.qrg-breadcrumb__item {
    display: inline-flex;
    align-items: center;
    color: var(--qrg-text-muted);
}

.qrg-breadcrumb__item:not(:last-child)::after {
    content: '/';
    margin-left: 0.35rem;
    color: #cbd5e1;
}

.qrg-breadcrumb__item a {
    color: var(--qrg-text-muted);
    text-decoration: none;
}

.qrg-breadcrumb__item a:hover {
    color: var(--qrg-primary);
    text-decoration: underline;
}

.qrg-breadcrumb__item--current {
    color: var(--qrg-text);
    font-weight: 500;
}

/* SEO content block */
.qrg-seo-content {
    padding: 3rem 0;
    background: var(--qrg-surface);
    border-top: 1px solid var(--qrg-border);
}

.qrg-seo-content__inner {
    max-width: 760px;
}

.qrg-seo-content__title {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.qrg-seo-content__inner p {
    margin: 0 0 1rem;
    font-size: 0.9375rem;
    color: var(--qrg-text-muted);
    line-height: 1.7;
}

.qrg-seo-content__inner p:last-child {
    margin-bottom: 0;
}

.qrg-seo-content__inner a {
    color: var(--qrg-primary-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.qrg-seo-content__inner strong {
    color: var(--qrg-text);
    font-weight: 600;
}

/* FAQ */
.qrg-faq {
    padding: 3rem 0 4rem;
    background: var(--qrg-bg);
    border-top: 1px solid var(--qrg-border);
}

.qrg-faq__header {
    max-width: 640px;
    margin-bottom: 2rem;
}

.qrg-faq__title {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.qrg-faq__lead {
    margin: 0;
    color: var(--qrg-text-muted);
    line-height: 1.6;
}

.qrg-faq__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 800px;
}

.qrg-faq__item {
    background: var(--qrg-surface);
    border: 1px solid var(--qrg-border);
    border-radius: var(--qrg-radius);
    overflow: hidden;
}

.qrg-faq__question {
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--qrg-text);
    cursor: pointer;
    list-style: none;
}

.qrg-faq__question::-webkit-details-marker {
    display: none;
}

.qrg-faq__question::after {
    content: '+';
    float: right;
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--qrg-text-muted);
}

.qrg-faq__item[open] .qrg-faq__question::after {
    content: '?';
}

.qrg-faq__answer {
    padding: 0 1.25rem 1rem;
}

.qrg-faq__answer p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--qrg-text-muted);
    line-height: 1.65;
}

/* Page CTA */
.qrg-page-cta {
    padding: 3rem 0 4rem;
    background: var(--qrg-bg);
}

.qrg-page-cta__inner {
    text-align: center;
    max-width: 520px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--qrg-surface);
    border: 1px solid var(--qrg-border);
    border-radius: var(--qrg-radius-lg);
    box-shadow: var(--qrg-shadow);
}

.qrg-page-cta__title {
    margin: 0 0 0.5rem;
    font-size: 1.375rem;
    font-weight: 700;
}

.qrg-page-cta__text {
    margin: 0 0 1.25rem;
    color: var(--qrg-text-muted);
    line-height: 1.6;
}

.qrg-page-cta__btn {
    display: inline-flex;
    width: auto;
    min-width: 200px;
}
