/* Info tips for the gamma dashboard (assets/js/info-tips.js). Immutable-cached: bump ?v= on dashboard.html on every edit. */

/* the round "i" button: 18 px, with negative block margins so it never makes its title line taller */
.ag-tip-btn {
    -webkit-appearance: none; appearance: none;
    position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
    box-sizing: border-box; width: 18px; height: 18px; margin: -4px 0 -4px 7px; padding: 0;
    vertical-align: middle; border-radius: 50%;
    border: 1px solid rgba(255, 215, 0, 0.55); background: rgba(255, 215, 0, 0.08); color: #ffd700;
    font-size: 0; line-height: 0; letter-spacing: 0; text-transform: none; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ag-tip-btn svg { display: block; fill: currentColor; pointer-events: none; }
/* invisible hit area: 26 px with a mouse, 44 px on phones and touch screens */
.ag-tip-btn::after { content: ''; position: absolute; top: -5px; right: -5px; bottom: -5px; left: -5px; border-radius: 50%; }
@media (max-width: 768px), (pointer: coarse) {
    .ag-tip-btn::after { top: -14px; right: -14px; bottom: -14px; left: -14px; }
}
.ag-tip-btn:hover { background: rgba(255, 215, 0, 0.2); border-color: #ffd700; }
.ag-tip-btn[aria-expanded="true"] { background: #ffd700; border-color: #ffd700; color: #0b0e14; }
.ag-tip-btn:focus { outline: none; }
.ag-tip-btn:focus-visible { outline: 2px solid #ffd700; outline-offset: 2px; }
/* next to another control the touch area leans away from it: left of the profile tabs, above the expiry chips */
@media (max-width: 768px), (pointer: coarse) {
    .agp-title .ag-tip-btn::after { left: -22px; right: -6px; }
    .xs-top .ag-tip-btn::after { top: -18px; bottom: -5px; }
}
/* the title's last word and its icon stay on one line */
.ag-tip-keep { white-space: nowrap; }
/* in a flex row (regime banner) the icon goes to the far end */
#regime-banner > .ag-tip-btn { margin: 0 0 0 auto; }

/* the pop-up: one for the page, attached to <body>, under the nav (9999), the overlays and the sign-in / checkout pop-ups */
.ag-tip-pop {
    position: absolute; z-index: 9000; top: 0; left: 0; box-sizing: border-box; width: 320px; max-width: calc(100vw - 24px);
    padding: 14px 40px 14px 16px; border-radius: 10px;
    background: #11141b; border: 1px solid rgba(255, 215, 0, 0.45); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.6);
    color: #cbd5e1; font: 400 0.86rem/1.5 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
    letter-spacing: 0; text-transform: none; text-align: left; white-space: normal;
}
.ag-tip-pop[hidden] { display: none; }
.ag-tip-pop:focus { outline: none; }
.ag-tip-pop:focus-visible { outline: 2px solid #ffd700; outline-offset: 2px; }
/* arrow towards the icon */
.ag-tip-pop::before {
    content: ''; position: absolute; left: var(--ag-tip-arrow, 24px); top: -6px; width: 10px; height: 10px; margin-left: -5px;
    background: #11141b; border-left: 1px solid rgba(255, 215, 0, 0.45); border-top: 1px solid rgba(255, 215, 0, 0.45); transform: rotate(45deg);
}
.ag-tip-pop.ag-tip-up::before { top: auto; bottom: -6px; transform: rotate(225deg); }
.ag-tip-title { margin: 0 0 6px; color: #ffd700; font-weight: 800; font-size: 0.9rem; line-height: 1.3; }
.ag-tip-text { margin: 0; color: #cbd5e1; }
.ag-tip-more { display: inline-block; margin-top: 9px; padding: 2px 0; color: #00f0ff; font-weight: 700; font-size: 0.8rem; text-decoration: none; }
.ag-tip-more[hidden] { display: none; }
.ag-tip-more:hover { text-decoration: underline; }
.ag-tip-more:focus-visible, .ag-tip-close:focus-visible { outline: 2px solid #ffd700; outline-offset: 2px; border-radius: 4px; }
.ag-tip-close {
    -webkit-appearance: none; appearance: none; position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; padding: 0;
    display: flex; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: transparent;
    color: #94a3b8; font: 400 1.25rem/1 Inter, system-ui, sans-serif; cursor: pointer;
}
.ag-tip-close:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
@media (max-width: 768px), (pointer: coarse) {
    .ag-tip-pop { padding-right: 48px; }
    .ag-tip-close { width: 44px; height: 44px; top: 0; right: 0; }
    .ag-tip-more { padding: 8px 0; margin-top: 3px; }
}
@media print { .ag-tip-btn, .ag-tip-pop { display: none !important; } }
