/*
 * Floating widgets for the Tabler layout: accessibility panel + "found a mistake".
 * Class names match the legacy markup so js/accessibility.js and js/found_mistake.js
 * work unchanged. Colors use the DrugQuest brand (purple #9c5984, pink #ee645b).
 */

/* ---- Accessibility widget ---- */
.accessibility_btn {
    height: 44px; width: 44px;
    border-radius: 25px;
    position: fixed;
    background-color: #9c5984;
    /* bottom 68px, not 60 — owner review 2026-08: a small gap between this and
       the "found a mistake" pill below it (pill top sits at ~60px). */
    left: 10px; bottom: 68px;
    box-shadow: 0 2px 8px rgba(99, 133, 194, .35);
    cursor: pointer; z-index: 50;
    fill: #fff; padding: 10px;
    display: flex; justify-content: center; align-items: center;
    border: 0;
}
.accessibility_btn:hover { background-color: #ee645b; transition: .2s; }
.accessibility_btn svg, .accessibility_open button svg { width: 24px; height: 24px; fill: #fff; }

.accessibility_open {
    width: 44px;
    position: fixed;
    left: 10px; bottom: 118px;
    background-color: #9c5984;
    z-index: 500;
    display: none;
    border-radius: 22px;
}
.accessibility_open button {
    height: 44px; width: 44px; padding: 10px;
    fill: #fff; cursor: pointer;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: 0;
}
.accessibility_open button.active { background-color: #824873; box-shadow: inset 0 0 0 2px #9c5984; }
.accessibility_open button:hover { background-color: #ee645b; transition: .2s; }
.show_accessibility { display: block; text-transform: none; transition: .4s ease-in-out; }

/* ---- Scroll up/down navigator ---- */
/* Above the accessibility button (68 + 44 + 8px gap). z 49 keeps it under the
   open accessibility panel (500), the mistake modal (1001) and the offcanvas. */
.dq-scroll-nav {
    position: fixed;
    left: 10px; bottom: 120px;
    width: 44px;
    background-color: #9c5984;
    border-radius: 22px;
    box-shadow: 0 2px 8px rgba(99, 133, 194, .35);
    z-index: 49;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.dq-scroll-nav[hidden] { display: none; }
.dq-scroll-nav button {
    height: 40px; width: 44px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: 0; padding: 0;
    color: #fff; cursor: pointer;
}
.dq-scroll-nav button:hover { background-color: #ee645b; transition: .2s; }
.dq-scroll-nav.at-top .dq-scroll-nav__up { display: none; }
.dq-scroll-nav.at-bottom .dq-scroll-nav__down { display: none; }

/* ---- "Found a mistake" report ---- */
.found_mistake_btn {
    position: fixed; bottom: 10px; left: 10px; right: auto;
    background-color: #9c5984; color: #fff;
    font-size: .8em; padding: 8px 12px;
    border-radius: 23px; text-align: center;
    cursor: pointer; transition: .3s; z-index: 1000;
    box-shadow: 0 2px 8px rgba(99, 133, 194, .35);
}
.found_mistake_btn:hover { background-color: #ee645b; }

/* Mobile (designer request, PPT 2026-07-30, A2): the two-line pill becomes a
   44px circle — the same size as the accessibility button above it — holding
   only the short label, at the pill's original font size. */
.found_mistake_btn_short { display: none; }
@media (max-width: 767.98px) {
    .found_mistake_btn {
        width: 44px; height: 44px;
        padding: 0;
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
    }
    .found_mistake_btn_full { display: none; }
    .found_mistake_btn_short { display: block; }
}

.found_mistake_bg {
    display: none; position: fixed; inset: 0;
    width: 100%; height: 100vh;
    background-color: rgba(0, 0, 0, .6);
    z-index: 1001; justify-content: center; align-items: center;
}
.found_mistake_bg.active { display: flex; }

.found_mistake_form {
    background-color: #fff; padding: 24px 48px;
    position: relative; margin: 24px;
    min-width: min(560px, 92vw);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(99, 133, 194, .3);
}
.found_mistake_form .title { color: #9c5984; font-size: 1.2em; font-weight: 700; text-align: center; margin-bottom: 16px; }
.found_mistake_form > p { color: #9c5984; font-size: 1.2em; font-weight: 700; text-align: center; }
.found_mistake_form input[type="text"],
.found_mistake_form textarea {
    width: 100%; display: block; margin-bottom: 14px;
    padding: 10px 12px; border: 1px solid #d7dae0; border-radius: 6px;
    font: inherit;
}
.found_mistake_form textarea { height: 150px; resize: vertical; }
.found_mistake_form > div { display: flex; justify-content: space-between; align-items: center; }
/* The bottom close is an <a> and must stay in the row (only the X span floats). */
.found_mistake_form a { cursor: pointer; color: #9c5984; position: static; }
.found_mistake_close {
    position: absolute; inset-inline-start: 12px; top: 10px;
    cursor: pointer; color: #ee645b; font-weight: 700;
}
.found_mistake_close svg { width: 18px; height: 18px; fill: #ee645b; }
