/* Tamagn Bet — branded QR widgets */
.tb-qr-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: #fff;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 8px 24px rgba(0, 106, 255, 0.06);
}

.dark .tb-qr-card {
    border-color: rgba(51, 65, 85, 0.85);
    background: rgba(15, 23, 42, 0.65);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.tb-qr-card__title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.dark .tb-qr-card__title {
    color: #f8fafc;
}

.tb-qr-card__desc {
    margin: 0.35rem 0 0;
    max-width: 22rem;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #64748b;
}

.dark .tb-qr-card__desc {
    color: #94a3b8;
}

.tb-qr-frame {
    position: relative;
    display: inline-flex;
    padding: 0.65rem;
    border-radius: 0.875rem;
    background: #fff;
    box-shadow:
        inset 0 0 0 1px rgba(0, 106, 255, 0.08),
        0 4px 14px rgba(15, 23, 42, 0.08);
}

.tb-qr-frame img,
.tb-qr-frame canvas {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 0.35rem;
}

.tb-qr-img--loading {
    opacity: 0.35;
    background: linear-gradient(135deg, #f1f5f9 0%, #e8f2ff 100%);
    min-height: 4rem;
    min-width: 4rem;
}

.tb-qr-frame--sm {
    max-width: 7.5rem;
}

.tb-qr-frame--md {
    max-width: 11.5rem;
}

.tb-qr-frame--lg {
    max-width: 14rem;
}

.tb-qr-card__url {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #006aff;
    word-break: break-all;
}

.tb-qr-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #006aff 0%, #0053b3 100%);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 106, 255, 0.28);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}

.tb-qr-download-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 106, 255, 0.35);
}

.tb-qr-download-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.tb-qr-download-btn:focus-visible {
    outline: 2px solid #006aff;
    outline-offset: 2px;
}

.tb-qr-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

.tb-qr-inline .tb-qr-download-btn {
    min-height: 2.25rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.75rem;
    width: 100%;
}

.tb-qr-status {
    min-height: 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.tb-qr-status--error {
    color: #dc2626;
}

@media (min-width: 640px) {
    .tb-qr-layout-split {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 1.5rem 2rem;
        align-items: center;
        text-align: left;
    }

    .tb-qr-layout-split .tb-qr-card__copy {
        align-self: center;
    }
}
