/* Brand colors. These are Joltti's own teal; a signed-in user's "Change colors" theme (My settings) overrides
   them with a generated combination (Theming/ThemePalette.cs), so every brand color must come from here.
   Status colors (green, red, yellow) and neutral greys stay fixed. */
:root {
    --brand: #0a5c63;
    --brand-ink: #0a3f45;
    --brand-soft: #e3f4f1;
    --brand-softer: #f2f8f7;
    --header-start: #0a7c70;
    --header-end: #0a5560;
    --on-header-muted: #d4efea;
    /* Buttons, text links and checkboxes use the same color as the highlighted side menu item
       (MR, 2026-11-19: "use the same color in buttons"). */
    --action: #0a5c63;
    --action-hover: #084a50;
    --action-soft: #e3f4f1;
    --page-bg-1: #eefaf6;
    --page-bg-2: #f5fbfa;
    --page-bg-3: #e8f4f6;
    --blob-1: rgba(18, 195, 154, 0.32);
    --blob-2: rgba(10, 92, 99, 0.24);
    --blob-3: rgba(95, 184, 214, 0.22);
    --shadow-tint: rgba(10, 85, 96, 0.1);
    --hero-start: #0a5560;
    --hero-end: #07363c;
    --hero-overlay-top: rgba(4, 38, 43, 0.5);
    --hero-overlay-bottom: rgba(4, 38, 43, 0.62);
    --backdrop: rgba(4, 38, 43, 0.55);
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    line-height: 1.5;
    /* Checkboxes, radio buttons and the like in the brand color too. */
    accent-color: var(--action);
}

/* The home page (the page with the hero video): the window below the video is the header's teal, not the light page
   background with its color spots (MR, 2026-11-20). "fixed" keeps the gradient the size of the window. */
html:has(.hero) {
    min-height: 100%;
    background: linear-gradient(90deg, var(--header-start), var(--header-end)) fixed;
}

    html:has(.hero) .page-background {
        display: none;
    }

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8y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xNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* Header */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.account-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.inline-form {
    display: inline;
    margin: 0;
}

/* Buttons and links */
.button {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--action);
    border-radius: 0.375rem;
    background: var(--action);
    color: #fff;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

    .button:hover {
        background: var(--action-hover);
    }

    .button:disabled {
        border-color: #b5b5b5;
        background: #d9d9d9;
        color: #555;
        cursor: not-allowed;
    }

.button-secondary {
    background: #fff;
    color: var(--action);
}

    .button-secondary:hover {
        background: var(--action-soft);
    }

.button-small {
    padding: 0.3rem 0.75rem;
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--action);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

/* Forms */
.form {
    display: grid;
    gap: 1rem;
    max-width: 28rem;
}

.field {
    display: grid;
    gap: 0.3rem;
}

    .field label {
        font-weight: 600;
    }

    .field input:not([type=checkbox]), .field select {
        padding: 0.5rem 0.6rem;
        border: 1px solid #b5b5b5;
        border-radius: 0.375rem;
        font: inherit;
    }

.field-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .field-checkbox label {
        font-weight: normal;
    }

.hint {
    margin: 0;
    color: #555;
    font-size: 0.9rem;
}

.form-footer {
    margin: 0.75rem 0 0;
}

.notice {
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--action);
    background: var(--action-soft);
}

    .notice p {
        margin: 0;
    }

.notice-error {
    border-left-color: #e50000;
    background: #fdecec;
}

.badge {
    margin-left: 0.5rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: #f1e7c4;
    font-size: 0.85rem;
}

/* Dashboard */
.status-pendingactivation {
    color: #8a5a00;
}

.status-active {
    color: #1d7a3a;
}

.checklist {
    display: grid;
    gap: 1rem;
    max-width: 40rem;
    padding: 0;
    list-style: none;
}

    .checklist li {
        display: flex;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        border: 1px solid #e5e5e5;
        border-radius: 0.5rem;
    }

    .checklist li.current {
        border-color: var(--action);
    }

    .checklist p {
        margin: 0.35rem 0 0.5rem;
    }

.step-mark {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: #e5e5e5;
    font-weight: 700;
}

.checklist li.done .step-mark {
    background: #26b050;
    color: #fff;
}

.details {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.35rem 1.5rem;
}

    .details dt {
        font-weight: 600;
    }

    /* Long values such as email addresses wrap instead of widening the page. */
    .details dd {
        margin: 0;
        overflow-wrap: anywhere;
    }

/* On a phone, each label goes above its value. */
@media (max-width: 30rem) {
    .details {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

        .details dd {
            margin-bottom: 0.6rem;
        }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Data tables (for example, /admin/tenants) */
.table-scroll {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

    .data-table th,
    .data-table td {
        padding: 0.6rem 0.6rem;
        border-bottom: 1px solid #e3ebea;
        text-align: left;
        vertical-align: top;
    }

    .data-table th {
        border-bottom: 2px solid var(--brand);
        color: var(--brand);
        font-weight: 600;
        white-space: nowrap;
    }

    .data-table tbody tr:hover {
        background: var(--brand-softer);
    }

.subscription-valid {
    color: #1d7a3a;
}

.subscription-ended {
    color: #b3261e;
}

.subscription-none {
    color: #666;
}

/* Development-only notes (for example, the prefilled sign-up form). */
.notice-dev {
    border-left-color: #b26a00;
    background: #fff4e0;
    font-size: 0.9rem;
}

/* A page heading with an action button on the right (for example, Products + "Add a product"). */
.page-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

    .page-heading h1 {
        margin: 0;
    }

.field textarea {
    padding: 0.5rem 0.6rem;
    border: 1px solid #b5b5b5;
    border-radius: 0.375rem;
    font: inherit;
    resize: vertical;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

/* Text links: the brand's action color with a soft underline, the same before and after a visit. */
a {
    color: var(--action);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

    /* Plain text links only; :where() keeps it weak, so buttons and the menus keep their own. */
    a:where(:not(.button)):hover {
        color: var(--action-hover);
        text-decoration-thickness: 2px;
    }

/* A quiet second action next to the main button, for example "Cancel". Same size as .button. */
.button-ghost {
    border-color: #c9d6d4;
    background: transparent;
    color: var(--brand-ink);
}

    .button-ghost:hover {
        border-color: var(--brand);
        background: var(--brand-softer);
        color: var(--brand);
    }

a.button {
    text-decoration: none;
}

/* Two short fields side by side (for example price and billing period); stacked on a phone. */
.field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 1rem;
}

.field input[type=file] {
    padding: 0.4rem 0;
    font: inherit;
}
