/**
 * Ask OTT — floating widget styles.
 * @copyright (c) 2026 Off The Traxx
 * @license GPL v2 or later
 */

.askott-widget {
    position: fixed;
    right: 1rem;
    bottom: 5rem; /* sit above the template's bottom-right Theme toggle */
    z-index: 1050;
}

.askott-widget__launch {
    display: inline-flex;
    align-items: center;
    gap: .4em;
    border: 0;
    border-radius: 2rem;
    padding: .7rem 1.15rem;
    background: #6d28d9;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.askott-widget__launch:hover { background: #5b21b6; }

.askott-widget__panel {
    position: fixed;
    right: 1rem;
    bottom: 8.5rem; /* clear the raised launcher below it */
    width: min(384px, calc(100vw - 2rem));
    max-height: 72vh;
    overflow: auto;
    padding: 1.5rem 1rem 1rem;
    background: #fff;
    color: #1f2937;
    border: 1px solid rgba(127, 127, 127, .3);
    border-radius: .85rem;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .32);
}

.askott-widget__panel .askott { max-width: none; }
.askott-widget__panel .askott__log { max-height: 40vh; }
.askott-widget__panel .askott__title { font-size: 1.05rem; }

.askott-widget__close {
    position: absolute;
    top: .35rem;
    right: .55rem;
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: .55;
}
.askott-widget__close:hover { opacity: 1; }

/* Mobile: drop the launcher to the BOTTOM-CENTRE so the three floating
 * controls sit in a row — Quick Exit (bottom-left), Ask OTT (centre),
 * Theme picker (bottom-right). Slim the pill a little so it clears the two
 * side buttons on narrow phones. Desktop keeps it stacked above the Theme
 * toggle on the right. */
@media (max-width: 600px) {
    .askott-widget {
        left: 50%;
        right: auto;
        bottom: 1.25rem; /* line up with the Quick Exit + Theme buttons */
        transform: translateX(-50%);
    }
    .askott-widget__launch {
        min-height: 1.85rem; /* match the ~29px Quick Exit pill height */
        padding: 0 .7rem;
        font-size: 1.05rem;  /* keep the 💬 legible at icon-only size */
        line-height: 1;
    }
    .askott-widget__label { display: none; } /* icon-only on mobile */
}

@media (max-width: 480px) {
    .askott-widget__panel {
        right: .5rem;
        left: .5rem;
        width: auto;
        max-height: 78vh;
    }
}

@media (prefers-color-scheme: dark) {
    .askott-widget__panel {
        background: #161a22;
        color: #e5e7eb;
        border-color: rgba(255, 255, 255, .14);
    }
}
