
/* ==========================================================
   SAGE QR / SHARE WIDGET
   Ecosystem-wide reusable component
   ========================================================== */

.sageqr-root,
.sageqr-root * {
    box-sizing: border-box;
}

.sageqr-root {
    --sageqr-bg: rgba(8, 8, 10, 0.97);
    --sageqr-panel: #111116;
    --sageqr-gold: #d7b65d;
    --sageqr-gold-soft: #927438;
    --sageqr-text: #f4efe3;
    --sageqr-muted: #aaa59a;
    --sageqr-border: rgba(215, 182, 93, 0.38);

    color: var(--sageqr-text);
    font-family: Arial, Helvetica, sans-serif;
}

/* ---------- INLINE CARD ---------- */

.sageqr-inline {
    width: 100%;
    max-width: 360px;
    margin: 18px auto;
    padding: 18px;
    text-align: center;
    background:
        radial-gradient(circle at top, rgba(215,182,93,.09), transparent 46%),
        var(--sageqr-panel);
    border: 1px solid var(--sageqr-border);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(0,0,0,.34);
}

.sageqr-kicker {
    margin: 0 0 5px;
    color: var(--sageqr-gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.3px;
    text-transform: uppercase;
}

.sageqr-title {
    margin: 0 0 7px;
    color: var(--sageqr-text);
    font-size: 20px;
    line-height: 1.2;
}

.sageqr-copy {
    margin: 0 auto 15px;
    max-width: 290px;
    color: var(--sageqr-muted);
    font-size: 13px;
    line-height: 1.45;
}

.sageqr-code-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: #fff;
    border: 2px solid var(--sageqr-gold);
    border-radius: 14px;
}

.sageqr-code {
    display: block;
    width: 190px;
    height: 190px;
    object-fit: contain;
}

.sageqr-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.sageqr-btn {
    appearance: none;
    border: 1px solid var(--sageqr-border);
    border-radius: 999px;
    padding: 9px 14px;
    color: var(--sageqr-text);
    background: rgba(255,255,255,.035);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: .18s ease;
}

.sageqr-btn:hover,
.sageqr-btn:focus-visible {
    color: #090909;
    background: var(--sageqr-gold);
    border-color: var(--sageqr-gold);
    outline: none;
}

.sageqr-status {
    min-height: 18px;
    margin-top: 10px;
    color: var(--sageqr-gold);
    font-size: 11px;
}

/* ---------- FLOATING BUTTON ---------- */

.sageqr-float-button {
    position: fixed;
    z-index: 2147483000;
    right: 20px;
    bottom: 20px;

    width: 54px;
    height: 54px;
    border-radius: 8px;
    border: 1px solid var(--sageqr-border);

    display: flex;
    align-items: center;
    justify-content: center;

    color: #0c0c0c;
    background: var(--sageqr-gold);
    box-shadow: 0 12px 34px rgba(0,0,0,.45);

    font-size: 11px;
    font-weight: 900;
    letter-spacing: .6px;
    cursor: pointer;
}

.sageqr-float-button:hover,
.sageqr-float-button:focus-visible {
    transform: translateY(-2px);
    outline: 2px solid rgba(255,255,255,.45);
    outline-offset: 2px;
}

/* ---------- MODAL ---------- */

.sageqr-overlay {
    position: fixed;
    z-index: 2147483001;
    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 22px;
    background: rgba(0,0,0,.76);
    backdrop-filter: blur(7px);
}

.sageqr-overlay.sageqr-open {
    display: flex;
}

.sageqr-modal {
    position: relative;
    width: min(390px, 100%);
    max-height: 92vh;
    overflow-y: auto;

    padding: 22px;
    text-align: center;

    background:
        radial-gradient(circle at top, rgba(215,182,93,.10), transparent 46%),
        var(--sageqr-bg);

    border: 1px solid var(--sageqr-border);
    border-radius: 20px;
    box-shadow: 0 28px 90px rgba(0,0,0,.68);
}

.sageqr-close {
    position: absolute;
    top: 10px;
    right: 12px;

    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;

    color: var(--sageqr-muted);
    background: rgba(255,255,255,.05);
    font-size: 19px;
    cursor: pointer;
}

.sageqr-close:hover {
    color: var(--sageqr-text);
}

/* ---------- MOBILE ---------- */

@media (max-width: 600px) {
    .sageqr-inline {
        max-width: 100%;
        margin: 14px auto;
    }

    .sageqr-code {
        width: 175px;
        height: 175px;
    }

    .sageqr-float-button {
        right: 14px;
        bottom: 14px;
    }

    .sageqr-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .sageqr-modal {
        width: 100%;
        max-height: 86vh;
        border-radius: 22px 22px 0 0;
        padding: 25px 20px 28px;
    }
}
