Wp2ghost/Wp2GhostUI/wwwroot/app.css
2026-10-14 19:12:29 +02:00

279 lines
11 KiB
CSS

/* WP2Ghost-Oberfläche */
:root {
--bg: #f4f5f7;
--card: #ffffff;
--text: #1f2328;
--muted: #667085;
--border: #dfe3e8;
--accent: #2b5fd9;
--accent-text: #ffffff;
--ok: #1a7f4b;
--ok-bg: #e3f6ec;
--warn: #9a5b00;
--warn-bg: #fdf0d5;
--error: #b42318;
--log-bg: #15181d;
--log-text: #d7dce3;
--radius: 8px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
margin: 0;
background: var(--bg);
color: var(--text);
font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
font-size: 14px;
line-height: 1.45;
}
h1 { margin: 0; font-size: 20px; }
h2 { margin: 0 0 12px; font-size: 15px; }
code { padding: 1px 4px; border-radius: 4px; background: var(--bg); }
/* Kopfzeile */
.topbar {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 10px 20px;
padding: 10px 20px;
background: var(--card);
border-bottom: 1px solid var(--border);
}
.topbar__status { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.chip {
max-width: 420px;
padding: 2px 10px;
border: 1px solid var(--border);
border-radius: 999px;
color: var(--muted);
font-size: 12px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.chip--ok { border-color: #b7e2c8; background: var(--ok-bg); color: var(--ok); }
.chip--warn { border-color: #f1d9a3; background: var(--warn-bg); color: var(--warn); }
/* Umschalter zwischen den beiden Ghost-Instanzen */
.ghost-switch { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.ghost-switch__options { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.ghost-switch__option {
max-width: 240px;
padding: 2px 12px;
border: 0;
background: none;
color: var(--muted);
font: inherit;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
}
.ghost-switch__option + .ghost-switch__option { border-left: 1px solid var(--border); }
.ghost-switch__option:hover:not(:disabled) { background: var(--bg); }
.ghost-switch__option.is-active { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.ghost-switch__option.is-warn:not(.is-active) { color: var(--warn); }
.ghost-switch__option:disabled { cursor: default; }
.tabs { display: flex; gap: 4px; }
.tab { padding: 6px 14px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.tab:hover { background: var(--bg); }
.tab.is-active { border-color: var(--border); background: var(--bg); color: var(--text); font-weight: 600; }
/* Aufteilung: links die Arbeit, rechts der Ablauf mit Rückfragen */
.layout {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(340px, 34%);
gap: 16px;
align-items: start;
padding: 16px 20px;
}
.side { position: sticky; top: 16px; }
.card { margin-bottom: 16px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.card__head h2 { margin: 0; }
.count { color: var(--muted); font-size: 12px; font-weight: 400; }
.hint { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; }
.empty { margin: 24px 0; color: var(--muted); text-align: center; }
.spacer { flex: 1; }
/* Knöpfe und Eingaben */
.btn {
padding: 7px 14px;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--card);
color: var(--text);
font: inherit;
cursor: pointer;
}
.btn:hover:not(:disabled) { border-color: #b9c0cb; background: #f8f9fb; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--primary { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }
.btn--primary:hover:not(:disabled) { border-color: #214cb3; background: #214cb3; }
.btn--danger { border-color: #e7b1ab; color: var(--error); }
.btn--small { padding: 4px 10px; font-size: 12.5px; }
.btn--option { border-color: var(--accent); color: var(--accent); font-weight: 600; }
input[type="text"], input[type="url"], input[type="password"], input[type="number"], input[type="search"], select {
padding: 6px 9px;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--card);
color: var(--text);
font: inherit;
}
input:focus, select:focus, .btn:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters input[type="search"] { width: 220px; }
.check { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; }
.more { margin-top: 12px; }
.more summary { color: var(--muted); cursor: pointer; }
.selectbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--muted); font-size: 12.5px; }
.selectbar input[type="number"] { width: 92px; padding: 4px 8px; }
.form { display: grid; gap: 14px; max-width: 620px; }
.form label { display: grid; gap: 4px; font-weight: 600; }
.form .hint { margin: 0; font-weight: 400; }
.instance { display: grid; gap: 10px; margin: 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); }
.instance legend { padding: 0 6px; font-weight: 600; }
.instance.is-active { border-color: var(--accent); }
/* Post-Liste */
.tablewrap { max-height: calc(100vh - 400px); min-height: 240px; overflow: auto; border: 1px solid var(--border); border-radius: 6px; }
.posts { width: 100%; border-collapse: collapse; }
.posts th {
position: sticky;
top: 0;
z-index: 1;
padding: 8px 10px;
border-bottom: 1px solid var(--border);
background: #f8f9fb;
color: var(--muted);
font-size: 12px;
font-weight: 600;
text-align: left;
white-space: nowrap;
}
.posts td { height: 38px; padding: 0 10px; border-bottom: 1px solid #eef0f3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.posts tr.is-selected td { background: #eef3fe; }
.posts tbody tr:hover td { background: #f6f8fb; }
.col-check { width: 34px; }
.col-id { width: 70px; color: var(--muted); font-variant-numeric: tabular-nums; }
.col-date { width: 96px; font-variant-numeric: tabular-nums; }
.col-num { width: 62px; text-align: right !important; font-variant-numeric: tabular-nums; }
.col-title { max-width: 360px; font-weight: 500; }
.col-cats { max-width: 220px; color: var(--muted); }
.badge { display: inline-block; margin-right: 4px; padding: 1px 8px; border-radius: 999px; background: #eef0f3; color: var(--muted); font-size: 12px; }
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--muted { background: #eceef1; }
.badge--run { margin-left: 6px; background: #e4ecfd; color: var(--accent); font-weight: 400; }
/* Toter Link: Suche nach Ersatz mit Vorschau */
.assistant { border: 2px solid var(--accent); }
.assistant__facts { display: grid; gap: 4px; margin-bottom: 12px; overflow-wrap: anywhere; }
.assistant__key { display: inline-block; min-width: 96px; color: var(--muted); font-size: 12.5px; }
.assistant__search { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.assistant__search input { flex: 1; min-width: 200px; }
.assistant__search a.btn { text-decoration: none; }
.assistant__body { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(0, 3fr); gap: 14px; align-items: start; }
.assistant__results { display: grid; gap: 8px; max-height: 520px; overflow-y: auto; }
.assistant__error { color: var(--error); }
.suggestion { padding: 10px; border: 1px solid var(--border); border-radius: 6px; }
.suggestion.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.suggestion__title { font-weight: 600; }
.suggestion__url { color: var(--ok); font-size: 12px; overflow-wrap: anywhere; }
.suggestion__snippet { margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.suggestion__actions { display: flex; gap: 6px; margin-top: 8px; }
.assistant__address { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.assistant__address input { flex: 1; min-width: 180px; }
.assistant__frame { width: 100%; height: 460px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.assistant__placeholder {
display: flex;
align-items: center;
justify-content: center;
height: 160px;
border: 1px dashed var(--border);
border-radius: 6px;
color: var(--muted);
}
@media (max-width: 900px) {
.assistant__body { grid-template-columns: minmax(0, 1fr); }
}
/* Ablauf: Protokoll und Rückfrage */
.card--log { display: flex; flex-direction: column; max-height: calc(100vh - 110px); }
.log {
flex: 1;
min-height: 220px;
margin: 0;
padding: 10px 12px;
border-radius: 6px;
background: var(--log-bg);
color: var(--log-text);
font-family: Consolas, "Cascadia Mono", monospace;
font-size: 12.5px;
line-height: 1.5;
white-space: pre-wrap;
overflow-wrap: anywhere;
overflow-y: auto;
}
/* Leerzeilen behalten ihre Höhe */
.log__line:empty::before { content: "\200b"; }
.log__head { color: #8fb4ff; font-weight: 600; }
.log__error { color: #ff9a8f; }
.log__warn { color: #ffd479; }
.prompt { margin-top: 12px; padding: 12px; border: 2px solid var(--accent); border-radius: var(--radius); background: #f3f6fe; }
.prompt__label { margin-bottom: 4px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.prompt__text { margin-bottom: 10px; font-weight: 600; overflow-wrap: anywhere; }
.prompt__options { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.prompt__input { display: flex; gap: 6px; }
.prompt__input input { flex: 1; min-width: 0; }
@media (max-width: 1100px) {
.layout { grid-template-columns: minmax(0, 1fr); }
.side { position: static; }
.card--log { max-height: none; }
.log { max-height: 50vh; }
.tablewrap { max-height: 60vh; }
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #14171b;
--card: #1c2026;
--text: #e6e9ee;
--muted: #98a2b3;
--border: #2d333c;
--accent: #6b97ff;
--accent-text: #0d1117;
--ok: #6fd39b;
--ok-bg: #173526;
--warn: #f1c36a;
--warn-bg: #3a2e12;
--error: #ff8f85;
--log-bg: #0d1014;
}
.btn:hover:not(:disabled) { border-color: #46505d; background: #232830; }
.btn--primary:hover:not(:disabled) { border-color: #8aadff; background: #8aadff; }
.posts th { background: #20252c; }
.posts td { border-bottom-color: #262b33; }
.posts tr.is-selected td { background: #1d2a45; }
.posts tbody tr:hover td { background: #222830; }
.badge { background: #2a3038; }
.badge--muted { background: #262b33; }
.badge--run { background: #1d2a45; }
.prompt { background: #182238; }
}