/* Site-wide visual polish. Purely cosmetic: no ids/classes here are read by
   any callback, so nothing here can change app behavior.

   Palette: Calico's brand green (calicolabs.com) as the single accent, a
   warm-neutral ink/gray scale for everything else -- mirrors the tokens in
   components.py (ACCENT/ACCENT_STRONG/ACCENT_TINT/INK/INK_MUTED/LINE). */

/* Dash 4's built-in components (Dropdown, DatePicker, Tabs, ...) already read
   these design tokens internally (see dash/dcc/async-dropdown.js) -- override
   them once so every dropdown's border/focus/selection color matches the
   app's own green accent instead of Dash's default purple, and its spacing
   rhythm matches components.py's CARD/BUTTON radii. */
:root {
    --Dash-Fill-Interactive-Strong: #25BD56;
    --Dash-Fill-Interactive-Weak: rgba(37, 189, 86, 0.07);
    --Dash-Spacing: 8px;
    --Dash-Stroke-Strong: rgba(15, 35, 25, 0.22);
    --Dash-Stroke-Weak: rgba(15, 35, 25, 0.10);
    --Dash-Text-Primary: rgba(15, 35, 25, 0.87);
    --Dash-Text-Strong: #14181a;
    --Dash-Text-Weak: #5c6b64;
    --Dash-Text-Disabled: rgba(15, 35, 25, 0.4);
    --Dash-Fill-Primary-Hover: rgba(15, 35, 25, 0.035);
    --Dash-Fill-Primary-Active: rgba(15, 35, 25, 0.07);
}

/* dropdowns render as a fairly short 32px-tall trigger by default -- give
   them a real input-sized click target so they read as proper form controls
   rather than a cramped strip. */
.dash-dropdown-trigger {
    min-height: 40px;
    padding: 0 14px;
}

/* the search box embedded inside an open, searchable dropdown's menu */
.dash-dropdown-search-container {
    border-radius: 8px !important;
}

/* Plain <input> elements (dcc.Input) get no such treatment from Dash and
   currently fall back to the browser's default focus outline. Give them a
   matching rounded-corner + green-ring focus state. */
input[type="text"],
input[type="number"] {
    transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #25BD56 !important;
    box-shadow: 0 0 0 3px rgba(37, 189, 86, 0.18);
}

/* A "label + control" pair rendered as one visually contained unit (light
   tinted background, rounded border) instead of a bare label floating above
   a bare dropdown/input. */
.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f3f7f4;
    border: 1px solid #e3e8e4;
    border-radius: 12px;
    padding: 8px 14px;
}
.control-group label {
    font-weight: 700;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #5c6b64;
    white-space: nowrap;
}

/* A row of one or more control-groups, e.g. the page-level gene picker or a
   card's inline controls. */
.control-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* A real search box: rounded input with room for a leading icon, instead of
   a bare rectangular text field. Icon is a plain inline SVG data-uri, no
   extra asset/network request. */
.search-input-wrap {
    position: relative;
    display: inline-block;
}
.search-input-wrap::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c6b64' stroke-width='2.2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='m20 20-3.5-3.5'/></svg>") no-repeat center / contain;
    pointer-events: none;
}
.search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px 11px 40px !important;
    font-size: 15px !important;
    border-radius: 10px !important;
    border: 1px solid #d7ded9 !important;
    background: #fff;
}

/* Autocomplete suggestion list (components.autocomplete): a plain floating
   panel below the search input, populated by a callback as the user types.
   Replaces dcc.Dropdown for the Gene/Track pickers -- Dash 4's own Dropdown
   is a click-to-open trigger with a *separate* embedded search field, not a
   directly-typable combobox, and there's no prop to restore the old
   react-select-style behavior (checked Dash's changelog through 4.4.1). */
.autocomplete {
    position: relative;
}
.ac-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 50;
    max-height: 320px;
    overflow-y: auto;
}
.ac-menu:empty {
    display: none;
}
.ac-menu:not(:empty) {
    background: #fff;
    border: 1px solid #d7ded9;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(15, 35, 25, 0.14);
}
.ac-option {
    padding: 9px 14px;
    font-size: 14px;
    color: #14181a;
    cursor: pointer;
    border-bottom: 1px solid #f0f3f1;
}
.ac-option:last-child {
    border-bottom: none;
}
.ac-option:hover {
    background: #e9f9ee;
}

/* buttons (components.BUTTON) get a slightly darker hover -- !important is
   needed since inline style has higher specificity than an external
   stylesheet, and hover states can't be expressed inline. */
.app-btn:hover {
    background: #14602f !important;
}
