/**
 * QR WebView Handoff — banner styles.
 * Sticky top, low intrusion, professional look.
 */

.qr-handoff {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #1a1a2e;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.qr-handoff.is-dismissed {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

.qr-handoff__inner {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    max-width: 720px;
    margin: 0 auto;
}

.qr-handoff__icon {
    color: #fbbf24;
    display: flex;
    align-items: center;
}
.qr-handoff__icon svg { display: block; }

.qr-handoff__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.qr-handoff__title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}
.qr-handoff__body {
    font-size: 12px;
    line-height: 1.3;
    color: #cbd5e1;
}

.qr-handoff__copy {
    -webkit-appearance: none; appearance: none;
    background: #fbbf24;
    color: #1a1a2e;
    border: 0;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s ease, transform 0.1s ease;
    white-space: nowrap;
    touch-action: manipulation;
}
.qr-handoff__copy:hover { background: #f59e0b; }
.qr-handoff__copy:active { transform: scale(0.96); }
.qr-handoff__copy[data-state="ok"] {
    background: #10b981;
    color: #fff;
}
.qr-handoff__copy-icon-idle,
.qr-handoff__copy-icon-ok { display: block; }
.qr-handoff__copy[data-state="idle"] .qr-handoff__copy-icon-ok { display: none; }
.qr-handoff__copy[data-state="ok"]   .qr-handoff__copy-icon-idle { display: none; }

.qr-handoff__dismiss {
    -webkit-appearance: none; appearance: none;
    background: transparent;
    color: #94a3b8;
    border: 0;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    touch-action: manipulation;
}
.qr-handoff__dismiss:hover { color: #fff; }

.qr-handoff__hint {
    background: #10b981;
    color: #fff;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 480px) {
    .qr-handoff__inner {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        row-gap: 8px;
    }
    .qr-handoff__copy {
        grid-column: 1 / 3;
        justify-content: center;
        padding: 10px;
        font-size: 13px;
    }
    .qr-handoff__dismiss {
        grid-column: 1 / 3;
        text-align: center;
        padding: 4px;
    }
}
