/* * Styles for the token-driven component library. * * Rules here encode design decisions Mantine's variables cannot express on their * own — chiefly the two that change *form* rather than color between themes: * the dashed danger treatment and status-by-brightness. See ui-design.md. * * Nothing in this file hardcodes a color; every value comes from a token. */ /* ------------------------------------------------------------------ Icons */ .wrolpi-icon-spin { animation: wrolpi-icon-spin 0.9s linear infinite; } @keyframes wrolpi-icon-spin { to { transform: rotate(360deg); } } @media (prefers-reduced-motion: reduce) { .wrolpi-icon-spin { animation: none; } } .wrolpi-icon-stack { position: relative; display: inline-flex; line-height: 0; } /* * The corner glyph sits on the main one, so it carries the surface color behind * it — without that the two sets of strokes cross and neither reads. */ .wrolpi-icon-stack-corner { position: absolute; right: -3px; bottom: -3px; display: flex; background: var(--bg); border-radius: 50%; padding: 1px; } /* ---------------------------------------------------------------- Buttons */ /* * Dashed borders mean "destructive or failed", and nothing else may use them. * In night mode a destructive button drops its fill entirely: 1.5px keeps the * dashes legible at low brightness, where a 1px hairline dash disappears. */ /* * In light, dark, and amber the button stays filled, which `color="red"` already * does. Night is the exception, and it cannot be expressed by overriding * Mantine's `--button-*` variables: Mantine writes those as inline styles on the * element, which no stylesheet rule can outrank. Setting the real properties * works instead — this selector (0,2,0 plus an element) outranks the Mantine * class rule that reads the variables. */ html[data-theme="night"] .wrolpi-button-danger { background: transparent; color: var(--red); border: 1.5px dashed var(--red); } html[data-theme="night"] .wrolpi-button-danger:hover:not(:disabled) { background: var(--panel); } /* The icon inside inherits currentColor, so it follows without another rule. */ /* ----------------------------------------------------------- Theme picker */ .wrolpi-theme-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; } .wrolpi-theme-option { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: 10px 12px; background: var(--panel); color: var(--text); border: 1px solid var(--border); font: inherit; cursor: pointer; } .wrolpi-theme-option:hover { background: var(--head); } /* The selected theme is marked by a heavier border as well as color, so the selection survives in monochrome themes. */ .wrolpi-theme-option-active { border: 2px solid var(--blue); padding: 9px 11px; } html[data-theme="night"] .wrolpi-theme-option-active, html[data-theme="amber"] .wrolpi-theme-option-active { border-color: var(--text); } .wrolpi-theme-option:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; } .wrolpi-theme-option-name { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; } .wrolpi-theme-option-description { font-size: 12px; color: var(--muted); line-height: 1.4; } /* Separated from the theme grid: it configures the chosen theme, it is not a choice. */ .wrolpi-media-filter-setting { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); } /* ------------------------------------------------------------ Pagination */ .wrolpi-pagination button { background: var(--panel); color: var(--text); border: 1px solid var(--border); } .wrolpi-pagination button[data-active] { background: var(--blue); color: var(--btn-text); border-color: var(--blue); } /* Night and amber have no second hue to spend, so the current page is marked by a heavier border and the panel surface instead of a filled block of color. */ html[data-theme="night"] .wrolpi-pagination button[data-active], html[data-theme="amber"] .wrolpi-pagination button[data-active] { background: var(--panel); color: var(--text); border: 2px solid var(--text); } .wrolpi-pagination button:disabled { color: var(--muted); background: var(--bg); } /* ---------------------------------------------------------------- Tab bar */ .wrolpi-tabs { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); margin-bottom: 14px; } .wrolpi-tabs-links { display: flex; flex-wrap: wrap; } .wrolpi-tabs-right { padding-bottom: 6px; } .wrolpi-tab { display: inline-block; padding: 8px 14px; color: var(--muted); text-decoration: none; font-size: 13px; border: 1px solid transparent; /* Sits on the bar's own rule, so the active tab can erase it and read as connected to the panel below. */ margin-bottom: -1px; } .wrolpi-tab:hover { color: var(--text); } .wrolpi-tab-active { color: var(--text); background: var(--panel); border-color: var(--border); border-bottom-color: var(--panel); font-weight: 600; } .wrolpi-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; } /* ------------------------------------------------------------- Search box */ .wrolpi-searchbox { position: relative; width: 100%; } .wrolpi-searchbox-control { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--border); padding: 0 8px; } .wrolpi-searchbox-control:focus-within { border-color: var(--blue); } html[data-theme="night"] .wrolpi-searchbox-control:focus-within, html[data-theme="amber"] .wrolpi-searchbox-control:focus-within { border-color: var(--text); } .wrolpi-searchbox-icon { display: flex; color: var(--muted); } .wrolpi-searchbox-input { flex: 1; min-width: 0; padding: 8px 0; background: none; border: none; outline: none; color: var(--text); font: inherit; font-size: 13px; } .wrolpi-searchbox-input::placeholder { color: var(--muted); } .wrolpi-searchbox-loading, .wrolpi-searchbox-clear { flex: none; } /* * The suggestion list overlays the page rather than pushing it down — a search * that reflows the results underneath it is unusable while typing. */ .wrolpi-searchbox-results { position: absolute; z-index: 20; top: 100%; left: 0; right: 0; /* * Tall enough for a full set of grouped suggestions -- directories, channels and * domains together run past 320px, and the last group was being clipped -- but * still capped so a long list cannot cover the page. */ max-height: min(60vh, 480px); overflow-y: auto; background: var(--panel); border: 1px solid var(--border); border-top: none; } .wrolpi-searchbox-group-name { padding: 6px 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: var(--head); } .wrolpi-searchbox-result { padding: 7px 10px; cursor: pointer; border-top: 1px solid var(--border); } .wrolpi-searchbox-result-active { background: var(--head); } .wrolpi-searchbox-result-title { font-size: 13px; color: var(--text); overflow-wrap: anywhere; } .wrolpi-searchbox-result-description { font-size: 11px; color: var(--muted); } .wrolpi-searchbox-empty { padding: 10px; font-size: 12px; color: var(--muted); } /* ---------------------------------------------------------------- Modals */ /* * Actions sit below the body, separated by a hairline rather than a raised bar. * Right-aligned, so the confirming action lands where the eye finishes reading. */ .wrolpi-modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; /* Bleed back out through the modal body's own padding so the rule spans the full width; -1 * whatever Mantine padded the body with. */ margin: 18px calc(var(--mantine-spacing-md) * -1) calc(var(--mantine-spacing-md) * -1); padding: 12px var(--mantine-spacing-md); border-top: 1px solid var(--border); } /* A stack of form rows, replacing Semantic's `ui stackable grid` in edit forms. */ .wrolpi-form-rows { display: flex; flex-direction: column; gap: 14px; } /* ------------------------------------------------------------- Form fields */ /* * `hooks/useForm.js` renders its own