/* ============================================================
   Theme overrides for the microsys advanced-filter helper.
   Scoped to .microsys-filter so nothing else is affected.
   ============================================================ */

/* ------------------------------------------------------------------
   CLEAR button (filters active).
   Default is Bootstrap btn-warning (bright yellow) which reads as
   "too light" and out of place on dark themes. Make it sit on the
   same dark surface as the adjacent search/submit chip, with a soft
   red icon so it still signals "clear/reset".
   ------------------------------------------------------------------ */

/* dark */
:root.theme-dark .microsys-filter .microsys-filter-clear {
    color: #f1a3a3 !important;
    border-color: rgba(220, 53, 69, 0.30) !important;
    background: linear-gradient(180deg, rgba(38, 38, 38, 0.98), rgba(24, 24, 24, 0.96)) !important;
    box-shadow: none !important;
}

/* aether */
:root.theme-aether .microsys-filter .microsys-filter-clear {
    color: #f1a3a3 !important;
    border: 1px solid rgba(220, 53, 69, 0.30) !important;
    background: linear-gradient(180deg, rgba(42, 47, 56, 0.98), rgba(34, 38, 47, 0.96)) !important;
    box-shadow: inset 0 1px 0 var(--aether-line-soft) !important;
}

/* prism */
:root.theme-prism .microsys-filter .microsys-filter-clear {
    color: #f1a3a3 !important;
    border: 1px solid rgba(220, 53, 69, 0.30) !important;
    background: linear-gradient(180deg, rgba(42, 47, 56, 0.98), rgba(34, 38, 47, 0.96)) !important;
    box-shadow: inset 0 1px 0 var(--prism-line-soft) !important;
}

/* gothic */
:root.theme-gothic .microsys-filter .microsys-filter-clear {
    color: #f6a8c0 !important;
    border-color: rgba(255, 64, 129, 0.30) !important;
    background: linear-gradient(180deg, rgba(26, 16, 37, 0.98), rgba(14, 9, 22, 0.96)) !important;
    box-shadow:
        inset 0 1px 0 rgba(224, 224, 255, 0.04),
        0 12px 24px -18px rgba(0, 0, 0, 0.46) !important;
}

/* shared: clear icon inherits the button colour, no pill/box treatment */
:root.theme-dark   .microsys-filter .microsys-filter-clear > .bi,
:root.theme-aether .microsys-filter .microsys-filter-clear > .bi,
:root.theme-prism  .microsys-filter .microsys-filter-clear > .bi,
:root.theme-gothic .microsys-filter .microsys-filter-clear > .bi {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
}

/* ------------------------------------------------------------------
   CLEAR button — mono theme (light theme).
   Bootstrap warning yellow + white icon is invisible. Use the same
   light surface as mono's submit chip with a dark icon.
   ------------------------------------------------------------------ */
:root.theme-mono .microsys-filter .microsys-filter-clear {
    color: var(--mono-800, #1e293b) !important;
    border-color: rgba(203, 160, 0, 0.4) !important;
    background:
        radial-gradient(circle at top, rgba(71, 85, 105, 0.08), transparent 58%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.98)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        0 8px 18px -16px rgba(15, 23, 42, 0.18) !important;
}
:root.theme-mono .microsys-filter .microsys-filter-clear > .bi {
    color: var(--mono-700, #334155) !important;
}

/* ------------------------------------------------------------------
   ACTION buttons (add / zip / excel) — retro theme.
   The retro neutral chip surface makes the default Bootstrap blue/green
   buttons look faint and washed-out. Give them saturated retro colours,
   stronger borders, and matching icons so they read clearly.
   ------------------------------------------------------------------ */

/* add (btn-primary) */
:root.theme-retro .microsys-filter .microsys-filter-action.btn-primary,
:root.theme-retro .microsys-filter a.microsys-filter-action.btn-primary,
:root.theme-retro .microsys-filter button.microsys-filter-action.btn-primary {
    color: var(--retro-amber) !important;
    border-color: rgba(212, 165, 116, 0.45) !important;
    background: linear-gradient(180deg, rgba(38, 30, 22, 0.98), rgba(26, 20, 15, 0.96)) !important;
}

/* zip (btn-outline-primary) */
:root.theme-retro .microsys-filter .microsys-filter-action.btn-outline-primary,
:root.theme-retro .microsys-filter a.microsys-filter-action.btn-outline-primary {
    color: var(--retro-amber) !important;
    border-color: rgba(212, 165, 116, 0.40) !important;
    background: linear-gradient(180deg, rgba(34, 27, 20, 0.98), rgba(24, 19, 14, 0.96)) !important;
}

/* excel (btn-outline-success) — muted olive keeps the "export" green hint */
:root.theme-retro .microsys-filter .microsys-filter-action.btn-outline-success,
:root.theme-retro .microsys-filter a.microsys-filter-action.btn-outline-success {
    color: #b5c27a !important;
    border-color: rgba(181, 194, 122, 0.40) !important;
    background: linear-gradient(180deg, rgba(30, 32, 22, 0.98), rgba(20, 22, 15, 0.96)) !important;
}

/* retro action icons inherit the button colour */
:root.theme-retro .microsys-filter .microsys-filter-action.btn-primary > .bi,
:root.theme-retro .microsys-filter .microsys-filter-action.btn-outline-primary > .bi,
:root.theme-retro .microsys-filter .microsys-filter-action.btn-outline-success > .bi {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
}
