/* Ask ScalperSense — launcher + modal. See js/ask.js. */

.ask-launch {
    position: fixed;
    right: 18px;
    /* Clear of the Market Pulse bar, which is pinned to the bottom on every
       page and would otherwise sit on top of this. */
    bottom: 74px;
    z-index: 55;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 17px;
    border: 1px solid rgba(139, 92, 246, 0.45);
    border-radius: 999px;
    background: linear-gradient(135deg, #6d28d9, #8b5cf6);
    color: #fff;
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 26px rgba(109, 40, 217, 0.4);
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.ask-launch:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(109, 40, 217, 0.5);
}
@media (max-width: 520px) {
    .ask-launch {
        right: 12px;
        bottom: 66px;
        padding: 10px 13px;
    }
    .ask-launch-t {
        display: none;
    }
}

.ask-modal[hidden] {
    display: none;
}
.ask-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.ask-back {
    position: absolute;
    inset: 0;
    background: rgba(4, 5, 12, 0.72);
    backdrop-filter: blur(3px);
}
body.ask-open {
    overflow: hidden;
}
.ask-panel {
    position: relative;
    width: min(680px, 100%);
    max-height: min(86vh, 780px);
    overflow-y: auto;
    padding: 20px 22px 22px;
    border: 1px solid var(--card-brd);
    border-radius: 18px;
    background: #0d0f1a;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.ask-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.ask-title {
    font-size: 17px;
    font-weight: 800;
}
.ask-x {
    background: none;
    border: 0;
    color: var(--muted);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
}
.ask-x:hover {
    color: inherit;
}
.ask-intro {
    margin: 8px 0 14px;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--muted);
}
.ask-form {
    display: flex;
    gap: 8px;
}
.ask-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--card-brd);
    border-radius: 11px;
    background: rgba(148, 163, 184, 0.07);
    color: inherit;
    font: inherit;
    font-size: 14px;
}
.ask-input:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.6);
}
.ask-go {
    flex: 0 0 auto;
    padding: 12px 20px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #6d28d9, #8b5cf6);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.ask-quota {
    margin-top: 9px;
    font-size: 11.5px;
    color: var(--muted);
}
.ask-q-n {
    font-family: "JetBrains Mono", monospace;
    font-weight: 800;
    color: var(--up);
}
.ask-q-n.low {
    color: #f59e0b;
}
.ask-q-un {
    color: var(--up);
    font-weight: 700;
}
.ask-q-r {
    opacity: 0.7;
}

.ask-sugg {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}
.ask-sugg[hidden] {
    display: none;
}
.ask-chip {
    border: 1px solid var(--card-brd);
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.05);
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    padding: 7px 13px;
    cursor: pointer;
    text-align: left;
}
.ask-chip:hover {
    color: inherit;
    border-color: rgba(139, 92, 246, 0.5);
}

.ask-out:empty {
    display: none;
}
.ask-out {
    margin-top: 16px;
}
.ask-q {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--card-brd);
}
.ask-a {
    font-size: 14px;
    line-height: 1.72;
    margin-top: 12px;
}
.ask-a p {
    margin: 0 0 10px;
}
.ask-a h4 {
    margin: 16px 0 6px;
    font-size: 12.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
}
.ask-a .ask-ul {
    margin: 0 0 10px;
    padding-left: 20px;
}
.ask-a .ask-ul li {
    margin-bottom: 5px;
}
.ask-a code {
    font-family: "JetBrains Mono", monospace;
    font-size: 12.5px;
    background: rgba(148, 163, 184, 0.12);
    padding: 1px 5px;
    border-radius: 4px;
}

.ask-srcs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
}
.ask-srcs-k {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    color: var(--muted);
}
.ask-src {
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none;
    color: inherit;
    padding: 4px 11px;
    border: 1px solid var(--card-brd);
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.1);
}
.ask-src:hover {
    border-color: rgba(139, 92, 246, 0.6);
}

.ask-foot {
    margin-top: 12px;
    font-size: 11px;
    color: var(--muted);
    opacity: 0.85;
}
.ask-err {
    margin-top: 12px;
    font-size: 13px;
    color: #f87171;
}
.ask-again {
    margin-top: 14px;
    border: 1px solid var(--card-brd);
    border-radius: 9px;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 14px;
    cursor: pointer;
}
.ask-again:hover {
    color: inherit;
}

/* The wait state. Three dots rather than a spinner: a question takes a few
   seconds because tools are being read, and a pulse reads as work rather than
   as a hang. */
.ask-wait {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 14px;
    font-size: 13px;
    color: var(--muted);
}
.ask-wait i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8b5cf6;
    animation: askPulse 1.1s infinite ease-in-out;
}
.ask-wait i:nth-child(2) { animation-delay: 0.16s; }
.ask-wait i:nth-child(3) { animation-delay: 0.32s; margin-right: 6px; }
@keyframes askPulse {
    0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .ask-wait i { animation: none; opacity: 0.7; }
    .ask-launch { transition: none; }
}
