/* QR code component (components/qr_code/qr_code.php) */

.tv-qr-code {
    --qr-primary: var(--color-primary, #936179);
    --qr-primary-soft: #fdf2f8;
    --qr-text-muted: var(--color-text-muted, #64748b);
    display: inline-block;
    text-align: center;
}

.tv-qr-code-image {
    display: block;
    margin: 0 auto;
    line-height: 0;
}

.tv-qr-code-image img,
.tv-qr-code-image canvas {
    max-width: 100%;
    height: auto;
}

.tv-qr-code-label {
    margin-top: 10px;
    font-family: var(--font-family, inherit);
    font-size: 12px;
    font-weight: 600;
    color: var(--qr-text-muted);
}

.tv-qr-code--clickable {
    cursor: pointer;
}

.tv-qr-code--clickable:focus-visible {
    outline: 2px solid var(--qr-primary);
    outline-offset: 4px;
}

/* Reset the parent theme's global button styles (uppercase, filled background, hover lift). */
.tv-qr-code button.tv-qr-code-download,
.tv-qr-code button.tv-qr-code-download:hover,
.tv-qr-code button.tv-qr-code-download:focus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    padding: 6px 12px;
    border: 1px solid var(--qr-primary);
    border-radius: var(--border-radius-md, 8px);
    background: transparent;
    background-color: transparent;
    color: var(--qr-primary);
    font-family: var(--font-family, inherit);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: normal;
    text-transform: none;
    box-shadow: none;
    transform: none;
    cursor: pointer;
}

.tv-qr-code button.tv-qr-code-download:hover,
.tv-qr-code button.tv-qr-code-download:focus-visible {
    background: var(--qr-primary-soft);
    background-color: var(--qr-primary-soft);
}

.tv-qr-code button.tv-qr-code-download:focus-visible {
    outline: 2px solid var(--qr-primary);
    outline-offset: 2px;
}
