/* ===================================================================
   Websites: the finder (groups, websites, date range), the summary row, one tile per website with its own numbers,
   and the same numbers as a table. The cards are the app's glass: translucent at rest, solid white on hover, with a small lift.
   Light + dark, phone width (16px gutter, no sideways scroll), right-to-left through logical properties.
   =================================================================== */

.ws-page {
    --glass: rgba(255, 255, 255, .7);
    --glass-hover: #ffffff;
    --glass-border: rgba(226, 232, 240, .95);
    --glass-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 20px rgba(15, 23, 42, .06);
    --glass-shadow-hover: 0 14px 34px rgba(15, 23, 42, .13);
    --glass-blur: blur(12px) saturate(1.4);
    --glass-field: rgba(255, 255, 255, .85);
    --glass-pop: rgba(255, 255, 255, .97);
    --glass-ease: .35s ease;

    --ws-good: #15803d;
    --ws-bad: #dc2626;
    --ws-warn: #b45309;
    --ws-line: var(--color-border-soft);

    min-height: 100vh;
    min-height: 100dvh;
    background:
        radial-gradient(1100px 420px at 50% -120px, color-mix(in srgb, var(--color-green) 9%, transparent), transparent 70%),
        var(--color-bg-soft);
}

:root[data-theme="dark"] .ws-page {
    --glass: rgba(17, 27, 47, .62);
    --glass-hover: #111b2f;
    --glass-border: rgba(255, 255, 255, .08);
    --glass-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .28);
    --glass-shadow-hover: 0 14px 34px rgba(0, 0, 0, .55);
    --glass-field: rgba(15, 23, 42, .7);
    --glass-pop: rgba(15, 23, 42, .97);

    --ws-good: var(--color-green);
    --ws-bad: #f87171;
    --ws-warn: #fbbf24;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .ws-page { --glass: rgba(255, 255, 255, .94); }
    :root[data-theme="dark"] .ws-page { --glass: rgba(17, 27, 47, .95); }
}

/* the page area: the whole width of the window on every page (Overview, Websites, Traffic, Compare), with the same margins at the sides */
.ws {
    width: 100%;
    margin: 0 auto;
    padding: 22px clamp(16px, 2.4vw, 32px) 72px;
}

.ws [hidden],
.ws-menu[hidden] {
    display: none !important;
}

/* a card: glass at rest, white (dark: deep blue) when the pointer or the focus is on it */
.ws-glass {
    border: 1px solid var(--glass-border);
    background: var(--glass);
    box-shadow: var(--glass-shadow);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    transition: background var(--glass-ease), box-shadow var(--glass-ease), transform .25s var(--ease);
}

/* ===== the head: title, subtitle, "Add website" ===== */

.ws-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 20px;
    margin-bottom: 18px;
}

.ws-head-text {
    min-width: 0;
}

.ws-title {
    margin: 0;
    font-size: clamp(22px, 2.2vw, 26px);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
    color: var(--color-black);
}

.ws-subtitle {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--color-text-soft);
}

/* Share (the whole organization) and Add website, side by side */
.ws-head-acts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ===== buttons of the page ===== */

.ws-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .15s, filter .15s, box-shadow .15s;
}

.ws-btn .material-symbols-outlined { font-size: 19px; }

.ws-btn-primary {
    background: var(--color-green);
    color: var(--color-green-ink);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

.ws-btn-primary:hover { filter: brightness(.95); }

.ws-btn-soft {
    background: color-mix(in srgb, var(--color-green) 14%, transparent);
    color: var(--color-green-dark);
}

:root[data-theme="dark"] .ws-btn-soft { color: var(--color-green); }

.ws-btn-soft:hover { background: color-mix(in srgb, var(--color-green) 24%, transparent); }

.ws-btn-text { color: var(--color-text-soft); }
.ws-btn-text:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-text); }

.ws-btn-small {
    min-height: 30px;
    padding: 0 10px;
    font-size: 13px;
}

.ws-btn-big {
    min-height: 46px;
    padding: 0 22px;
    font-size: 15px;
}

/* the red button of the Delete dialog */
.ws-btn-danger {
    background: #dc2626;
    color: #ffffff;
}

.ws-btn-danger:hover:not(:disabled) { filter: brightness(.93); }

/* ===== a problem the person should know about ===== */

.ws-note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin-bottom: 14px;
    padding: 9px 12px;
    border-radius: 12px;
    background: color-mix(in srgb, #f59e0b 15%, transparent);
    font-size: 13.5px;
    font-weight: 600;
}

.ws-note > span:not(.material-symbols-outlined) { flex: 1 1 220px; }
.ws-note .material-symbols-outlined { font-size: 20px; color: var(--ws-warn); }

/* ===== websites shared with this organization, waiting for an answer: one calm glass row each ===== */

.ws-inbox { margin-bottom: 16px; }

.ws-inbox-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ws-inbox-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 12px 14px;
    border-radius: 14px;
}

.ws-inbox-row:hover,
.ws-inbox-row:focus-within {
    background: var(--glass-hover);
}

.ws-inbox-row .ws-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 13px;
}

.ws-inbox-id {
    flex: 1 1 220px;
    min-width: 0;
}

.ws-inbox-t {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.ws-inbox-t strong { font-weight: 800; }

.ws-inbox-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 12px;
    margin: 2px 0 0;
    color: var(--color-text-soft);
    font-size: 12.5px;
}

.ws-inbox-acts {
    display: flex;
    gap: 6px;
    margin-inline-start: auto;
}

.ws-inbox-err { flex: 1 1 100%; }

/* the plan: Accept takes its last free place (a line under the row's text), or the plan is full (a note across the row) */
.ws-inbox-last { align-items: center; gap: 5px; color: var(--color-text); }
.ws-inbox-last .material-symbols-outlined { font-size: 16px; color: var(--ws-warn); }
.ws-inbox-acts .ws-btn:disabled { opacity: .5; cursor: not-allowed; filter: none; box-shadow: none; }

.ws-loading {
    padding: 40px 0;
    color: var(--color-text-muted);
    font-size: 14px;
    text-align: center;
}

/* ===== the finder: GROUPS -> WEBSITES -> DATE RANGE, one row that wraps ===== */

.ws-finder {
    position: relative;
    z-index: 20;   /* its popups float over the cards below */
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 16px;
    margin-bottom: 22px;
    padding: 12px 14px 14px;
    border-radius: 16px;
}

.ws-finder:hover,
.ws-finder:focus-within {
    background: var(--glass-hover);
}

.ws-f-groups {
    flex: 0 1 220px;
    min-width: 0;
}

.ws-f-websites {
    flex: 1 1 320px;
    min-width: 0;
    max-width: 640px;
}

.ws-f-range {
    position: relative;
    flex: 0 1 auto;
    min-width: 0;
    margin-inline-start: auto;
}

.ws-finder .xselect-label,
.ws-f-label {
    margin-bottom: 6px;
    color: var(--color-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

/* the range button: the same field as the selects */
.ws-range-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 38px;
    padding-inline: 11px 6px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--glass-field);
    font-size: 14px;
    text-align: start;
    transition: border-color .15s, box-shadow .15s;
}

.ws-range-btn:hover { border-color: color-mix(in srgb, var(--color-text) 28%, transparent); }

.ws-f-range.is-open .ws-range-btn {
    border-color: var(--color-green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-green) 18%, transparent);
}

.ws-range-btn > .material-symbols-outlined:first-child {
    font-size: 19px;
    color: var(--color-text-soft);
}

.ws-range-text {
    display: flex;
    flex: 1;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.ws-range-name {
    font-weight: 700;
}

.ws-range-name:empty { display: none; }

.ws-range-dates {
    overflow: hidden;
    color: var(--color-text-soft);
    font-size: 13px;
    text-overflow: ellipsis;
}

.ws-range-arrow {
    flex: none;
    width: 26px;
    color: var(--color-text-muted);
    font-size: 22px;
    text-align: center;
    transition: transform .15s;
}

.ws-f-range.is-open .ws-range-arrow { transform: rotate(180deg); }

.ws-range-pop {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline-end: 0;
    z-index: 1000;
    width: min(360px, calc(100vw - 32px));
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--glass-pop);
    box-shadow: 0 12px 40px rgba(15, 23, 42, .16);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    backdrop-filter: blur(20px) saturate(1.4);
}

:root[data-theme="dark"] .ws-range-pop { box-shadow: 0 14px 40px rgba(0, 0, 0, .55); }

.ws-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ws-preset {
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    transition: background .15s, border-color .15s;
}

.ws-preset:hover { background: color-mix(in srgb, var(--color-text) 6%, transparent); }

.ws-preset[aria-pressed="true"] {
    border-color: var(--color-green);
    background: color-mix(in srgb, var(--color-green) 16%, transparent);
    color: var(--color-green-dark);
}

:root[data-theme="dark"] .ws-preset[aria-pressed="true"] { color: var(--color-green); }

.ws-custom {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--ws-line);
}

.ws-custom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ws-date {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    font-size: 12.5px;
    font-weight: 700;
}

.ws-date input,
.ws-input {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: color-mix(in srgb, var(--color-bg) 70%, transparent);
    color: var(--color-text);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
}

.ws-date input:focus,
.ws-input:focus {
    outline: 0;
    border-color: var(--color-green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-green) 20%, transparent);
}

.ws-range-err {
    margin: 0;
    color: var(--ws-bad);
    font-size: 13px;
    font-weight: 600;
}

.ws-custom-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* the NEX date range field: its label in the page's own style (NEX writes small capitals) */
.ws-custom-nex .nexinput-label {
    color: var(--color-text);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.ws-custom-nex .nexinput-input { font-variant-numeric: tabular-nums; }

/* NEX's calendar floats on the page's body: two months side by side, one under the other where they do not fit (a phone) */
.ws-page .nexdate { max-width: calc(100vw - 16px); }
.ws-page .nexdate-body { flex-wrap: wrap; }
.ws-page .nexdate-pane { flex: 1 1 200px; }

@media (max-width: 500px) {
    .ws-page .nexdate { width: 262px; }
}

/* ===== the summary row ===== */

.ws-summary { margin-bottom: 30px; }

.ws-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

@media (min-width: 1280px) {
    .ws-kpis { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

.ws-kpi {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--tone) 3%, var(--glass));
}

.ws-kpi:hover,
.ws-kpi:focus-within {
    z-index: 3;   /* its help floats over the neighbours */
    background: var(--glass-hover);
    box-shadow: var(--glass-shadow-hover);
    transform: translateY(-2px);
}

.ws-kpi-h {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.ws-kpi-ico {
    display: grid;
    place-items: center;
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--tone) 14%, transparent);
    color: var(--tone);
}

.ws-kpi-ico .material-symbols-outlined { font-size: 21px; }

/* the "?" flows after the last word, so a long name keeps the whole width of the line */
.ws-kpi-t {
    flex: 1;
    min-width: 0;
    margin: 0;
    color: var(--color-text-soft);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: break-word;
}

.ws-kpi-t .ws-help {
    margin-inline-start: 4px;
    vertical-align: -3px;
}

.ws-kpi-v {
    margin: 2px 0 0;
    font-size: 24px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.03em;
    line-height: 1.15;
    white-space: nowrap;
}

.ws-kpi-trend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 6px;
    min-height: 18px;
    margin: 0;
    font-size: 12.5px;
}

.ws-cmp { color: var(--color-text-muted); font-weight: 500; }

.ws-kpi-spark {
    height: 28px;
    margin-top: auto;
    --c: var(--tone);
}

/* the "?" next to a number and its explanation (hover, or a tap / the keyboard gives it the focus) */
.ws-help {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--color-text) 8%, transparent);
    color: var(--color-text-soft);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1;
    transition: background .15s, color .15s;
}

.ws-help:hover,
.ws-help:focus {
    background: var(--tone);
    color: #ffffff;
}

.ws-tip {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline-start: 0;
    z-index: 5;
    width: max(100%, 230px);
    padding: 9px 11px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--glass-pop);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .14);
    color: var(--color-text);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.45;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .15s, visibility .15s;
}

.ws-kpi:has(.ws-help:hover) .ws-tip,
.ws-kpi:has(.ws-help:focus) .ws-tip {
    opacity: 1;
    visibility: visible;
}

/* the cards at the end of a row open their help towards the start, so it never leaves the screen */
.ws-kpi:nth-child(4n) .ws-tip,
.ws-kpi:nth-child(4n - 1) .ws-tip {
    inset-inline: auto 0;
}

@media (min-width: 1280px) {
    .ws-kpi:nth-child(n) .ws-tip { inset-inline: 0 auto; }
    .ws-kpi:nth-child(n + 7) .ws-tip { inset-inline: auto 0; }
}

/* ===== the trend: ▲ 12% (green when it is good news, red when it is not) ===== */

.ws-trend {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ws-trend .material-symbols-outlined { font-size: 14px; }

.ws-trend.is-good,
.ws-trend.is-new { color: var(--ws-good); }
.ws-trend.is-bad { color: var(--ws-bad); }
.ws-trend.is-flat { color: var(--color-text-muted); }

/* ===== small charts ===== */

.ws-spark {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.ws-spark-line {
    fill: none;
    stroke: var(--c, var(--color-green));
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ws-spark-line.is-dash {
    stroke-width: 1.5;
    stroke-dasharray: 4 3;
    opacity: .7;
}

.ws-spark-area {
    fill: color-mix(in srgb, var(--c, var(--color-green)) 11%, transparent);
    stroke: none;
}

/* a summary card without a line over time: now and before as two thin bars, in the same height as a line */
.ws-cmpbars {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    height: 100%;
}

.ws-cmpbar {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ws-cmpbar-k {
    flex: none;
    width: 4.2em;
    overflow: hidden;
    color: var(--color-text-muted);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-cmpbar-t {
    flex: 1;
    min-width: 0;
    height: 6px;
    border-radius: 3px;
    background: color-mix(in srgb, var(--color-text) 7%, transparent);
}

.ws-cmpbar-f {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--c, var(--color-green));
}

.ws-cmpbar.is-before .ws-cmpbar-f { opacity: .4; }

/* ===== the bar above the websites: title, Sort by, Tiles | Table ===== */

.ws-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-bottom: 14px;
}

.ws-bar-t {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    margin-inline-end: auto;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.01em;
}

.ws-bar-t:focus { outline: 0; }

.ws-count {
    padding: 1px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-text) 8%, transparent);
    color: var(--color-text-soft);
    font-size: 12.5px;
    font-weight: 700;
}

.ws-count:empty { display: none; }

.ws-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-soft);
    font-size: 13px;
    font-weight: 600;
}

.ws-sort select {
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--glass-field);
    color: var(--color-text);
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
}

/* a two-way switch (Tiles | Table; Active | Paused in the edit dialog) */
.ws-seg {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: var(--glass-field);
}

.ws-seg button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 8px;
    color: var(--color-text-soft);
    font-size: 13px;
    font-weight: 700;
    transition: background .15s, color .15s;
}

.ws-seg button .material-symbols-outlined { font-size: 18px; }

.ws-seg button:hover { color: var(--color-text); }

/* the chosen one is green, as the app's main buttons */
.ws-seg button[aria-pressed="true"] {
    background: var(--color-green);
    box-shadow: 0 1px 3px color-mix(in srgb, var(--color-green-dark) 35%, transparent);
    color: var(--color-green-ink);
}

/* ===== the tiles ===== */

.ws-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 18px;
    align-items: start;
}

.ws-tile {
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    background: var(--glass);
    box-shadow: var(--glass-shadow);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    transition: background var(--glass-ease), box-shadow var(--glass-ease), transform .25s var(--ease);
}

.ws-tile:hover,
.ws-tile:focus-within {
    background: var(--glass-hover);
    box-shadow: var(--glass-shadow-hover);
}

.ws-tile:hover { transform: translateY(-2px); }

.ws-tile-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px 8px 14px;
}

[dir="rtl"] .ws-tile-head { padding: 14px 14px 8px 12px; }

/* the favicon over the website's tinted initials */
.ws-badge {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    overflow: hidden;
    border-radius: 12px;
    background: color-mix(in srgb, var(--c) 15%, transparent);
    color: var(--c);
    font-size: 14px;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent);
}

.ws-badge img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 7px;
    background: #ffffff;
    object-fit: contain;
}

.ws-tile-id {
    flex: 1;
    min-width: 0;
}

.ws-tile-name {
    margin: 0;
    overflow: hidden;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-host {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    max-width: 100%;
    margin-top: 2px;
    color: var(--color-text-soft);
    font-size: 13px;
}

.ws-host span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-host .material-symbols-outlined {
    flex: none;
    font-size: 14px;
    opacity: .7;
}

a.ws-host:hover { color: var(--color-text); text-decoration: underline; }

.ws-more {
    display: grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    color: var(--color-text-muted);
    transition: background .15s, color .15s;
}

.ws-more:hover,
.ws-more[aria-expanded="true"] {
    background: color-mix(in srgb, var(--color-text) 8%, transparent);
    color: var(--color-text);
}

.ws-more .material-symbols-outlined { font-size: 22px; }

/* status, tracking, online */
.ws-tile-state {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding: 0 14px 12px;
    font-size: 12.5px;
}

.ws-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
    white-space: nowrap;
}

.ws-pill.is-active,
.ws-pill.is-primary {
    background: color-mix(in srgb, var(--color-green) 15%, transparent);
    color: var(--ws-good);
}

.ws-pill.is-paused,
.ws-pill.is-waiting {
    background: color-mix(in srgb, #f59e0b 18%, transparent);
    color: var(--ws-warn);
}

/* a website another organization shared with this one */
.ws-pill.is-shared {
    background: color-mix(in srgb, #6366f1 15%, transparent);
    color: #4f46e5;
    cursor: default;
}

:root[data-theme="dark"] .ws-pill.is-shared { color: #a5b4fc; }

.ws-pill.is-note {
    background: color-mix(in srgb, var(--color-text) 8%, transparent);
    color: var(--color-text-soft);
}

.ws-track {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--color-text-soft);
    font-weight: 600;
    white-space: nowrap;
}

.ws-track .material-symbols-outlined { font-size: 16px; }
.ws-track.is-live { color: var(--ws-good); }
.ws-track.is-silent { color: var(--ws-warn); }
.ws-track.is-none,
.ws-track.is-paused { color: var(--color-text-muted); }

.ws-online {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-muted);
    font-weight: 600;
    white-space: nowrap;
}

.ws-online.is-on { color: var(--color-text); }

.ws-dot {
    width: 8px;
    height: 8px;
    flex: none;
    border-radius: 50%;
    background: var(--color-green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-green) 18%, transparent);
}

/* the screenshot: it scrolls to the bottom of the page on hover (as on the first dashboard) */
.ws-tile-shot {
    position: relative;
    height: 150px;
    margin: 0 14px;
    overflow: hidden;
    border: 1px solid var(--ws-line);
    border-radius: 10px;
    background:
        radial-gradient(260px 120px at 50% 40%, color-mix(in srgb, var(--c) 12%, transparent), transparent 75%),
        color-mix(in srgb, var(--c) 4%, var(--color-bg-soft));
}

.ws-shot-ph {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ws-badge.is-big {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    font-size: 18px;
}

.ws-shot-t {
    padding: 0 16px;
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.ws-shot-t.is-error { color: #ef4444; }

/* uploads a picture while there is none: glass, white on hover (as the tiles) */
.ws-shot-up {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--ws-line);
    border-radius: 10px;
    background: color-mix(in srgb, var(--color-bg) 55%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}

.ws-shot-up:hover,
.ws-shot-up:focus-visible {
    border-color: #fff;
    background: #fff;
    color: #0f172a;
}

.ws-shot-up:focus-visible { box-shadow: 0 0 0 2px var(--color-green); outline: none; }
.ws-shot-up:disabled { opacity: .5; cursor: progress; }
.ws-shot-up .material-symbols-outlined { font-size: 20px; }

.ws-tile-shot > img {
    position: absolute;
    inset-inline: 0;
    top: 0;
    width: 100%;
    height: auto;
    min-height: 100%;
    object-fit: cover;
    object-position: top;
    opacity: .85;
    transition: transform 2s cubic-bezier(.22, .61, .36, 1), opacity .5s ease;
}

/* (keyboard focus only: a click on "..." or a focus moved there by the page does not leave the picture scrolled down) */
.ws-tile:hover .ws-tile-shot > img,
.ws-tile:has(:focus-visible) .ws-tile-shot > img {
    transform: translateY(calc(150px - 100%));
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .ws-tile:hover .ws-tile-shot > img,
    .ws-tile:has(:focus-visible) .ws-tile-shot > img { transform: none; }
    .ws-tile:hover,
    .ws-kpi:hover { transform: none; }
}

/* the numbers of the tile: three big ones, a line, four small ones */
.ws-tile-body {
    display: flex;
    flex-direction: column;
    padding: 4px 14px 12px;
}

.ws-stats {
    display: grid;
    gap: 0 8px;
    margin: 0;
}

.ws-stats-big {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 10px 0 10px;
    border-bottom: 1px solid var(--ws-line);
}

.ws-stats-small {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 10px 0 4px;
}

@container (max-width: 380px) {
    .ws-stats-small { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 10px; }
}

.ws-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ws-stat dt {
    overflow: hidden;
    color: var(--color-text-soft);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-stat dd {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin: 0;
    min-width: 0;
}

.ws-stat-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 5px;
}

.ws-stat-v {
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
    line-height: 1.25;
}

.ws-stat.is-big dt { font-size: 12px; }

.ws-stat.is-big .ws-stat-v {
    font-size: 20px;
    letter-spacing: -.02em;
}

/* the conversion rate under the conversions, in words ("3.4% of sessions") */
.ws-stat-note {
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
}

.ws-stat .ws-trend { font-size: 11.5px; }

/* visitors (line and area) and sessions (dashed) over the range, in the website's colour */
.ws-tspark {
    margin-top: 8px;
}

.ws-tspark .ws-spark { height: 44px; }

.ws-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    margin: 6px 0 0;
    color: var(--color-text-muted);
    font-size: 11.5px;
    font-weight: 600;
}

.ws-key {
    width: 14px;
    height: 0;
    border-top: 2px solid var(--c);
    border-radius: 2px;
}

.ws-key.is-dash {
    margin-inline-start: 8px;
    border-top-style: dashed;
    opacity: .75;
}

/* no visit has ever arrived: the tracking code, prominently */
.ws-wait {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 10px 0 4px;
    padding: 16px 14px;
    border: 1px dashed color-mix(in srgb, var(--c) 45%, var(--color-border));
    border-radius: 12px;
    background: color-mix(in srgb, var(--c) 5%, transparent);
    text-align: center;
}

.ws-wait-t {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
}

.ws-wait-p {
    max-width: 34ch;
    margin: 0 0 6px;
    color: var(--color-text-soft);
    font-size: 13px;
    line-height: 1.45;
}

.ws-tile.is-paused .ws-tile-shot > img { filter: grayscale(.6); }

/* the foot: who the website is shared with (start), Share / Tracking code / Real-time / Traffic as icons (end).
   One height in every state (the buttons set it), so a tile never jumps when its pictures change. */
.ws-tile-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 49px;
    margin: 0 14px;
    padding: 8px 0;
    border-top: 1px solid var(--ws-line);
}

/* the round pictures, a little over each other, each with a ring in the tile's colour */
.ws-avs {
    display: inline-flex;
    align-items: center;
    flex: none;
    min-width: 0;
    padding: 2px;
    border-radius: 999px;
    cursor: default;
}

button.ws-avs {
    cursor: pointer;
    transition: background .15s;
}

button.ws-avs:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }

button.ws-avs:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-green);
}

.ws-av {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    width: 24px;
    height: 24px;
    overflow: hidden;
    border-radius: 50%;
    background: color-mix(in srgb, var(--c) 18%, var(--glass-hover));
    box-shadow: 0 0 0 2px var(--glass-hover);
    color: var(--c);
    font-size: 9.5px;
    font-weight: 800;
    line-height: 1;
}

.ws-av + .ws-av { margin-inline-start: -6px; }

.ws-av img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* not accepted yet: faded, with a dashed ring */
.ws-av.is-pending { opacity: .55; }

.ws-av.is-pending::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1.5px dashed var(--c);
    border-radius: 50%;
}

.ws-av.is-more {
    background: color-mix(in srgb, var(--color-text) 9%, var(--glass-hover));
    color: var(--color-text-soft);
    font-size: 10px;
}

/* a website shared with us: the logo of the organization that owns it (logos are not cropped) */
.ws-av.is-org img {
    padding: 3px;
    background: #ffffff;
    object-fit: contain;
}

.ws-foot-acts {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-inline-start: auto;
}

/* the icons: glass, white on hover (as the picture's upload button) */
.ws-fbtn {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border: 1px solid var(--ws-line);
    border-radius: 9px;
    background: color-mix(in srgb, var(--color-bg) 55%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: var(--color-text-soft);
    transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}

.ws-fbtn .material-symbols-outlined { font-size: 19px; }

.ws-fbtn:not([aria-disabled="true"]):hover,
.ws-fbtn:focus-visible {
    border-color: #ffffff;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .14);
    color: #0f172a;
}

.ws-fbtn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-green);
}

/* the add-on switches (Live Widget, visitors may start a chat): green while on */
.ws-ftoggle[aria-pressed="true"] {
    border-color: color-mix(in srgb, var(--color-green) 55%, transparent);
    background: color-mix(in srgb, var(--color-green) 16%, transparent);
    color: var(--color-green-dark);
}
:root[data-theme="dark"] .ws-ftoggle[aria-pressed="true"] { color: var(--color-green); }
.ws-ftoggle[aria-pressed="true"]:hover { color: var(--color-green-dark); }

/* Traffic: its page is not there yet */
.ws-fbtn[aria-disabled="true"] {
    opacity: .45;
    cursor: default;
}

/* ===== the table ===== */

.ws-table-wrap {
    position: relative;   /* (its screen-reader-only texts stay inside the scroll box instead of widening the page) */
    overflow-x: auto;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    background: var(--glass-hover);
    box-shadow: var(--glass-shadow);
    scrollbar-width: thin;
}

.ws-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13.5px;
}

.ws-table th,
.ws-table td {
    padding: 10px;
    border-bottom: 1px solid var(--ws-line);
    text-align: start;
    vertical-align: middle;
}

.ws-table tbody tr:last-child > * { border-bottom: 0; }

/* the headers may take two lines, so the columns stay as narrow as their numbers */
.ws-table thead th {
    padding: 0;
    color: var(--color-text-soft);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

.ws-th {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    width: 100%;
    min-height: 44px;
    padding: 4px 10px;
    font-weight: inherit;
    text-align: inherit;
}

.ws-th-i { flex: none; }

.ws-table .is-num { text-align: end; }
.ws-table .is-num .ws-th { justify-content: flex-end; }

.ws-th:hover { color: var(--color-text); }

.ws-th-i {
    font-size: 15px;
    opacity: .4;
}

.ws-th-i.is-on {
    color: var(--color-green-dark);
    opacity: 1;
}

:root[data-theme="dark"] .ws-th-i.is-on { color: var(--color-green); }

.ws-th-act { width: 52px; }

.ws-table tbody tr { transition: background .15s; }
.ws-table tbody tr:hover > * { background: color-mix(in srgb, var(--color-green) 4%, var(--glass-hover)); }

/* the website column stays in view while the table scrolls sideways */
.ws-sticky {
    position: sticky;
    inset-inline-start: 0;
    z-index: 1;
    background: var(--glass-hover);
}

.ws-cell-site {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    max-width: 280px;
}

.ws-cell-site .ws-badge {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 11.5px;
}

.ws-cell-site .ws-badge img { padding: 5px; }

.ws-cell-id {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ws-cell-name,
.ws-cell-host {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-cell-name { font-weight: 800; }

.ws-cell-host {
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 500;
}

.ws-cell-state {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    min-width: 130px;
}

.ws-cell-v {
    display: block;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ws-table td .ws-trend { font-size: 11.5px; }

.ws-table .ws-nw { white-space: nowrap; }

.ws-td-act { text-align: end; }

/* ===== nothing to show ===== */

.ws-nomatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 16px;
    color: var(--color-text-soft);
    font-size: 14px;
    text-align: center;
}

.ws-nomatch p { margin: 0; }

.ws-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: clamp(36px, 7vw, 64px) 20px;
    border-radius: 20px;
    text-align: center;
}

.ws-empty-ico {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin-bottom: 6px;
    border-radius: 22px;
    background: color-mix(in srgb, #6366f1 13%, transparent);
    color: #6366f1;
}

.ws-empty-ico .material-symbols-outlined { font-size: 40px; }

.ws-empty-t {
    margin: 0;
    font-size: clamp(20px, 2.4vw, 24px);
    font-weight: 800;
    letter-spacing: -.02em;
}

.ws-empty-p {
    max-width: 46ch;
    margin: 0 0 8px;
    color: var(--color-text-soft);
    font-size: 15px;
    line-height: 1.5;
}

/* while new numbers are on their way the old ones stay, a little faded (no spinner, nothing that pulses) */
.is-busy .ws-kpi-v,
.is-busy .ws-kpi-trend,
.is-busy .ws-kpi-spark,
.is-busy .ws-tile-body,
.is-busy .ws-table tbody {
    opacity: .5;
}

.ws-kpi-v,
.ws-kpi-trend,
.ws-kpi-spark,
.ws-tile-body,
.ws-table tbody {
    transition: opacity .2s ease;
}

/* ===== the menu of a website ===== */

.ws-menu {
    position: fixed;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    min-width: 220px;
    max-width: calc(100vw - 16px);
    padding: 6px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--glass-pop, var(--color-bg));
    box-shadow: 0 12px 36px rgba(15, 23, 42, .16);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    backdrop-filter: blur(20px) saturate(1.4);
    font-family: var(--font-sans);
}

:root[data-theme="dark"] .ws-menu { box-shadow: 0 14px 40px rgba(0, 0, 0, .55); }

.ws-menu-item {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 38px;
    padding: 0 11px;
    border-radius: 8px;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 600;
    text-align: start;
}

.ws-menu-item .material-symbols-outlined {
    font-size: 19px;
    color: var(--color-text-soft);
}

.ws-menu-item:hover,
.ws-menu-item:focus {
    outline: 0;
    background: color-mix(in srgb, var(--color-text) 7%, transparent);
}

.ws-menu-item:focus-visible { box-shadow: inset 0 0 0 2px var(--color-green); }

.ws-menu-item.is-danger,
.ws-menu-item.is-danger .material-symbols-outlined { color: var(--ws-bad, #dc2626); }

.ws-menu-sep {
    height: 1px;
    margin: 5px 4px;
    background: var(--color-border);
}

/* ===== the edit / delete dialogs (on top of scripts/sitedialogs.js and its styles) ===== */

.ws-fs {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.ws-fs legend {
    margin-bottom: 7px;
    padding: 0;
    font-size: 13px;
    font-weight: 700;
}

.ws-fs .sd-hint { margin-top: 6px; }

.ws-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ws-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.ws-chips:empty { display: none; }

.ws-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    color: var(--color-text-soft);
    font-size: 13px;
    font-weight: 600;
    transition: background .15s, border-color .15s, color .15s;
}

.ws-chip[aria-pressed="true"] {
    border-color: var(--c);
    background: color-mix(in srgb, var(--c) 14%, transparent);
    color: var(--color-text);
}

.ws-inline {
    display: flex;
    gap: 8px;
}

.ws-inline .ws-input {
    flex: 1;
    height: 34px;
}

.ws-domains {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}

.ws-domain {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    border-bottom: 1px solid var(--ws-line);
}

.ws-domain:last-child { border-bottom: 0; }

.ws-domain-id {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    padding: 4px 0;
}

.ws-domain-host {
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* removed in the draft: still listed (with Undo) until Save */
.ws-domain.is-removed .ws-domain-host {
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.ws-domains + .sd-note { margin-bottom: 8px; }
.ws-domains + .sd-note[hidden] { display: none; }

.ws-icon-btn {
    display: grid;
    place-items: center;
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: var(--color-text-muted);
}

.ws-icon-btn:hover {
    background: color-mix(in srgb, #ef4444 12%, transparent);
    color: var(--ws-bad, #dc2626);
}

.ws-icon-btn:disabled { opacity: .5; cursor: default; }

.ws-icon-btn .material-symbols-outlined { font-size: 19px; }

/* Edit: the error and Cancel / Save stay at the bottom of the dialog while its fields scroll (sd-body is the scrolling box; its
   padding is 16px 20px 18px: the foot covers its bottom padding, edge to edge) */
.ws-edit .ws-dialog-foot {
    position: sticky;
    bottom: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 -20px -18px;
    padding: 12px 20px 18px;
    border-top: 1px solid var(--color-border-soft);
    background: var(--color-bg);
}

/* (a field or an error that comes into view, by the keyboard or by script, is not left under the foot) */
.ws-edit .sd-body { scroll-padding-bottom: 110px; }

.ws-dialog-text {
    margin: 0;
    color: var(--color-text-soft);
    font-size: 14.5px;
    line-height: 1.5;
}

/* ===== the Share dialog: This website | All websites, the e-mail and the permission, then who has it ===== */

.ws-share-modes { display: flex; }

.ws-share-modes button {
    flex: 1 1 0;
    justify-content: center;
    min-height: 38px;
    font-size: 13.5px;
}

/* one calm line under the switch: what sharing means here */
.ws-share-help {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding: 9px 12px;
    border-radius: 10px;
    background: var(--glass-field);
    color: var(--color-text-soft);
    font-size: 13px;
    line-height: 1.5;
}

.ws-share-help .material-symbols-outlined {
    flex: none;
    margin-top: 1px;
    font-size: 18px;
    color: var(--color-green-dark);
}

:root[data-theme="dark"] .ws-share-help .material-symbols-outlined { color: var(--color-green); }

/* the e-mail and Share in one row; the permission (and its one-line hint) under them */
.ws-share-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 10px;
    row-gap: 14px;
    align-items: end;
}

.ws-share-form > * { grid-column: 1 / -1; }

.ws-share-form > .sd-field { grid-column: 1; margin: 0; }

.ws-share-form > .sd-actions {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
}

.ws-share-form > .sd-actions .sd-btn { min-height: 44px; padding-inline: 22px; }

.ws-share-perm {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
}

.ws-share-perm > legend { margin-bottom: 8px; }

.ws-share-perm .sd-hint {
    flex: 1 1 180px;
    margin: 0;
}

.ws-share .ws-seg { max-width: 100%; }

.ws-share-perm .ws-seg button { min-height: 32px; }

.ws-share-perm .ws-seg button .material-symbols-outlined { font-size: 16px; }

/* how many have it, next to the list's title */
.ws-share-count {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    margin-inline-start: 8px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--glass-field);
    color: var(--color-text-soft);
    font-size: 11.5px;
    font-weight: 800;
    vertical-align: 2px;
}

.ws-share-count:empty { display: none; }

.ws-share-sent {
    margin: 0;
    padding: 8px 11px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--color-green) 13%, transparent);
    color: var(--color-green-dark);
    font-size: 13px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

:root[data-theme="dark"] .ws-share-sent { color: var(--color-green); }

.ws-share-sent[hidden] { display: none; }

.ws-share-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--color-border-soft);
}

.ws-people {
    display: flex;
    flex-direction: column;
}

.ws-person {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    min-height: 48px;
    padding: 6px 0;
    border-bottom: 1px solid var(--ws-line);
}

.ws-person:last-child { border-bottom: 0; }

.ws-person-id {
    display: flex;
    flex: 1 1 200px;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.ws-person-name {
    max-width: 100%;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-person-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    max-width: 100%;
    color: var(--color-text-muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.ws-person-sub:empty { display: none; }

.ws-person-acts {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-inline-start: auto;
}

.ws-person-role {
    padding: 0 6px;
    color: var(--color-text-soft);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.ws-person-note {
    padding: 10px 0;
    color: var(--color-text-muted);
    font-size: 13px;
}

/* the round picture of a person: initials on their colour, their photo over them when they have one */
.ws-person-av {
    position: relative;
    overflow: hidden;
    display: grid;
    flex: none;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--av, #64748b) 20%, transparent);
    color: color-mix(in srgb, var(--av, #64748b) 80%, var(--color-text));
    font-size: 12.5px;
    font-weight: 800;
}

.ws-person-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ws-person-x {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    color: var(--color-text-muted);
    transition: background .15s, color .15s;
}

.ws-person-x .material-symbols-outlined { font-size: 19px; }

.ws-person-x:hover:not(:disabled) {
    background: color-mix(in srgb, #ef4444 12%, transparent);
    color: var(--ws-bad, #dc2626);
}

.ws-person-x:focus-visible { outline: 2px solid var(--color-green); outline-offset: 1px; }

.ws-person-x:disabled { opacity: .5; cursor: progress; }

/* asked first: after one click the icon becomes the question ("Remove?"); a second click does it */
.ws-person-x.is-sure {
    width: auto;
    padding: 0 10px;
    background: color-mix(in srgb, #ef4444 13%, transparent);
    color: var(--ws-bad, #dc2626);
    font-size: 12.5px;
    font-weight: 800;
    white-space: nowrap;
}

/* an invitation: when its link stops working, and Resend */
.ws-person-exp { color: var(--color-text-muted); }
.ws-person-again { min-height: 30px; padding-inline: 10px; }

/* an invitation that waits for the person to confirm the address of the account they already have */
.ws-person-wait { color: var(--ws-warn); font-weight: 700; }

/* "Make {name} an owner?" under the person's row, with Make owner / Cancel */
.ws-person-ask {
    display: flex;
    flex: 1 1 100%;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: color-mix(in srgb, #f59e0b 12%, transparent);
}

.ws-person-ask-q {
    flex: 1 1 220px;
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
}

/* All websites on a plan with no room for another person: said on top, the e-mail field waits */
.ws-share-full[hidden] { display: none; }

/* the permission in a list row: a button with the role's picture and name; it opens the list of roles (.ws-role-menu) */
.ws-role {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 6px 0 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: var(--glass-field);
    color: var(--color-text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.ws-role .ws-role-ic { font-size: 17px; color: var(--color-text-soft); }
.ws-role .ws-role-caret { font-size: 18px; color: var(--color-text-soft); transition: transform .15s var(--ease, ease); }
.ws-role[aria-expanded="true"] .ws-role-caret { transform: rotate(180deg); }

.ws-role:hover:not(:disabled) { background: color-mix(in srgb, var(--color-text) 9%, var(--glass-field, transparent)); }

.ws-role:focus-visible,
.ws-role[aria-expanded="true"] {
    outline: 0;
    border-color: var(--color-green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-green) 20%, transparent);
}

.ws-role:disabled { opacity: .6; cursor: default; }

/* the list of roles: the look of the website menu, above the dialog it was opened from */
.ws-role-menu { z-index: 2100; }
.ws-role-menu .ws-menu-item.is-current { color: var(--color-green-dark, #16a34a); }
.ws-role-menu .ws-menu-item.is-current .material-symbols-outlined { color: inherit; }
.ws-role-menu .ws-role-check { margin-inline-start: auto; font-size: 18px; }

@media (prefers-reduced-motion: reduce) { .ws-role .ws-role-caret { transition: none; } }

/* ===== small screens ===== */

@media (max-width: 900px) {
    .ws-f-range {
        flex: 1 1 100%;
        margin-inline-start: 0;
    }
    .ws-f-websites { max-width: none; }
}

@media (max-width: 560px) {
    .ws { padding-top: 16px; }

    .ws-head .ws-btn { width: 100%; }
    .ws-head-acts { width: 100%; }
    .ws-head-acts .ws-btn { flex: 1 1 0; width: auto; }

    .ws-inbox-acts { flex: 1 1 100%; }
    .ws-inbox-acts .ws-btn { flex: 1 1 0; }

    /* a person's permission and buttons go under the name */
    .ws-person-id { flex-basis: calc(100% - 44px); }   /* (next to the round picture) */

    .ws-finder {
        gap: 10px;
        padding: 10px 12px 12px;
    }

    .ws-f-groups,
    .ws-f-websites {
        flex: 1 1 100%;
    }

    .ws-range-pop { width: 100%; }

    .ws-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .ws-kpi { padding: 10px; }
    .ws-kpi-ico { width: 36px; height: 36px; }
    .ws-kpi-v { font-size: 21px; }

    /* two cards per row: the right-hand one opens its help towards the start */
    .ws-kpi:nth-child(n) .ws-tip { inset-inline: 0 auto; }
    .ws-kpi:nth-child(2n) .ws-tip { inset-inline: auto 0; }

    .ws-bar-t { flex-basis: 100%; }
    .ws-sort { flex: 1; }
    .ws-sort select { flex: 1; min-width: 0; }

    .ws-tiles { gap: 14px; }
}

@media (max-width: 380px) {
    #WS_VIEW button span:not(.material-symbols-outlined) { display: none; }   /* (only Tiles | Table goes down to its icons) */
    .ws-custom-row { grid-template-columns: 1fr; }
}
