/* Toasts and focus rings. Colors: the theme tokens (public/css/layout.css). */

#toast-container {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    max-width: calc(100vw - 32px);
}

/* Sized to its content like Axiom's toasts, not stretched to a fixed width */
.toast-notification {
    pointer-events: auto;
    width: auto;
    max-width: 100%;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 230ms cubic-bezier(0.21, 1.02, 0.73, 1),
                transform 230ms cubic-bezier(0.21, 1.02, 0.73, 1);
    cursor: pointer;
}

.toast-notification.toast-show {
    opacity: 1;
    transform: translateY(64px);
}

.toast-notification.toast-hide {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 200ms ease, transform 200ms ease;
}

.toast-inner {
    display: flex;
    align-items: center;
    height: 56px;
    background: rgb(var(--background));
    border: 1px solid rgb(var(--border-subtle));
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}

.toast-img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    margin-left: 12px;
    flex-shrink: 0;
    background: rgb(var(--primary-stroke));
}

.toast-img-placeholder {
    background: rgb(var(--primary-stroke));
}

.toast-body {
    flex: 1;
    min-width: 0;
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.toast-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.toast-wallet {
    font-size: 12px;
    font-weight: 500;
    color: rgb(var(--text-primary));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toast-trade {
    font-size: 12px;
    font-weight: 500;
    color: rgb(var(--text-secondary));
    white-space: nowrap;
    flex-shrink: 0;
}

.toast-row-bottom {
    font-size: 12px;
    color: rgb(var(--text-tertiary));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.toast-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 100%;
    flex-shrink: 0;
    color: rgb(var(--text-tertiary));
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s;
}

.toast-close:hover {
    color: rgb(var(--text-secondary));
}

/* ── Hide scrollbar but keep scrolling ──────────────── */

/* ── Blurred notifications (tier gating) ──────────────── */

.notif-blur {
    filter: blur(4px);
    user-select: none;
    pointer-events: none;
}

.notif-upgrade-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: rgb(var(--primary));
    letter-spacing: 0.05em;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 1;
}

.toast-blur .toast-body {
    filter: blur(4px);
    user-select: none;
}

.toast-blur .toast-img {
    filter: blur(4px);
}

.toast-blur .toast-inner {
    position: relative;
}

.toast-blur .toast-inner::after {
    content: none;
}

.toast-blur-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    pointer-events: none;
    z-index: 1;
}

.toast-blur-title {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: rgb(var(--background-tertiary) / 0.9);
    padding: 2px 8px;
    border-radius: 4px;
}

.toast-blur-cta {
    font-size: 8px;
    font-weight: 700;
    color: rgb(var(--primary));
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgb(var(--background-tertiary) / 0.9);
    padding: 1px 6px;
    border-radius: 4px;
}

/* ── Hide scrollbar but keep scrolling: everywhere in the app ──────────────── */

*,
.no-scrollbar {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

*::-webkit-scrollbar,
.no-scrollbar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Hover definitions (data-tip) are rendered by /public/js/tooltip.js. */

/* No focus ring on mouse clicks; keep a subtle one for keyboard navigation. */
button:focus:not(:focus-visible), a:focus:not(:focus-visible), [role="link"]:focus:not(:focus-visible) { outline: none; }
button:focus-visible, a:focus-visible, [role="link"]:focus-visible { outline: 1px solid rgb(var(--primary) / 0.6); outline-offset: 1px; }
