:root {
    --tblr-font-sans-serif: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

/* Scoped to <html> so the always-dark sidebar does not hide its own theme toggle. */
html[data-bs-theme="dark"] .hide-theme-dark,
html[data-bs-theme="light"] .hide-theme-light {
    display: none !important;
}

/* ASP.NET validation output, styled like Tabler's own. */
.validation-summary-valid {
    display: none;
}

.validation-summary-errors ul {
    margin-bottom: 0;
    padding-left: 1rem;
}

.input-validation-error {
    border-color: var(--tblr-danger) !important;
}

/* Lets long text truncate inside flex rows. */
.min-w-0 {
    min-width: 0;
}

/* Claim progress tracker: a dot per stage, joined by a line that turns green as the claim moves on. */
.claim-track {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.claim-track li {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
}

.claim-track li + li::before {
    content: "";
    position: absolute;
    top: .75rem;
    left: -50%;
    width: 100%;
    height: 2px;
    background: var(--tblr-border-color);
    transform: translateY(-50%);
}

.claim-track li.is-done + li::before,
.claim-track li.is-skipped + li::before {
    background: var(--tblr-green);
}

.claim-track-dot {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--tblr-border-color);
    border-radius: 50%;
    background: var(--tblr-bg-surface);
    color: var(--tblr-secondary);
    font-size: .8rem;
    transition: transform .15s ease;
}

.claim-track-label {
    display: block;
    margin-top: .25rem;
    padding: 0 .125rem;
    color: var(--tblr-secondary);
    font-size: .7rem;
    line-height: 1.2;
}

.claim-track .is-done .claim-track-dot {
    border-color: var(--tblr-green);
    background: var(--tblr-green);
    color: #fff;
}

.claim-track .is-paid .claim-track-dot {
    border-color: var(--tblr-teal);
    background: var(--tblr-teal);
    color: #fff;
}

.claim-track li.is-paid::before {
    background: var(--tblr-green);
}

.claim-track .is-current .claim-track-dot {
    border-color: var(--tblr-yellow);
    background: var(--tblr-yellow);
    color: #fff;
    animation: claim-track-pulse 2s ease-out infinite;
}

.claim-track .is-current .claim-track-label {
    color: var(--tblr-body-color);
    font-weight: 600;
}

.claim-track .is-sentback .claim-track-dot {
    border-color: var(--tblr-blue);
    background: var(--tblr-blue);
    color: #fff;
}

.claim-track .is-rejected .claim-track-dot {
    border-color: var(--tblr-red);
    background: var(--tblr-red);
    color: #fff;
}

.claim-track .is-skipped .claim-track-dot {
    border-style: dashed;
    border-color: var(--tblr-green);
    color: var(--tblr-green);
}

.claim-row:hover .claim-track-dot {
    transform: scale(1.08);
}

@keyframes claim-track-pulse {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tblr-yellow) 55%, transparent); }
    70% { box-shadow: 0 0 0 .5rem color-mix(in srgb, var(--tblr-yellow) 0%, transparent); }
    100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tblr-yellow) 0%, transparent); }
}

/* On phones there is no room for every stage name; the current one stays and the caption below says the rest. */
@media (max-width: 575.98px) {
    .claim-track-label {
        visibility: hidden;
    }

    .claim-track .is-current .claim-track-label {
        visibility: visible;
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .claim-track .is-current .claim-track-dot {
        animation: none;
    }

    .claim-track-dot {
        transition: none;
    }
}

/* Claim history: a vertical line of events with an icon for each. */
.claim-history {
    margin: 0;
    padding: 0;
    list-style: none;
}

.claim-history > li {
    position: relative;
    padding: 0 0 1.25rem 2.75rem;
}

.claim-history > li:last-child {
    padding-bottom: 0;
}

.claim-history > li:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 2rem;
    bottom: .25rem;
    left: .9375rem;
    width: 2px;
    background: var(--tblr-border-color);
}

.claim-history-icon {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
}

.claim-history .is-waiting .claim-history-icon {
    border: 2px dashed var(--tblr-yellow);
    background: var(--tblr-bg-surface);
    color: var(--tblr-yellow);
}

.claim-history-comment {
    margin: .5rem 0 0;
    padding: .5rem .75rem;
    border-left: 3px solid var(--tblr-border-color);
    border-radius: 0 var(--tblr-border-radius) var(--tblr-border-radius) 0;
    background: var(--tblr-bg-surface-secondary);
    font-size: .875rem;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

/* Policy check: the live result on the line form, and flagged lines on the claim page. */
.policy-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: .5rem .75rem;
    border-radius: var(--tblr-border-radius);
    font-size: .875rem;
}

.policy-status.is-success {
    background: color-mix(in srgb, var(--tblr-green) 12%, transparent);
    color: var(--tblr-green);
}

.policy-status.is-warning {
    background: color-mix(in srgb, var(--tblr-yellow) 16%, transparent);
    color: color-mix(in srgb, var(--tblr-yellow) 70%, var(--tblr-body-color));
}

.policy-status.is-neutral {
    background: var(--tblr-bg-surface-secondary);
    color: var(--tblr-secondary);
}

.policy-line {
    border-left: 3px solid transparent;
}

.policy-line.is-warning {
    border-left-color: var(--tblr-yellow);
    background: color-mix(in srgb, var(--tblr-yellow) 5%, transparent);
}

.policy-line.is-danger {
    border-left-color: var(--tblr-red);
    background: color-mix(in srgb, var(--tblr-red) 5%, transparent);
}

/* Notification bell */
.notification-count {
    position: absolute;
    top: -.35rem;
    right: -.55rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 .3rem;
    border-radius: 1rem;
    font-size: .65rem;
    line-height: 1.15rem;
    text-align: center;
}

.notification-menu {
    width: 22rem;
    max-width: calc(100vw - 2rem);
}

.notification-menu .list-group {
    max-height: 24rem;
    overflow-y: auto;
}

.notification-unread {
    background: color-mix(in srgb, var(--tblr-primary) 6%, transparent);
}

.notification-pulse {
    animation: notification-pulse .9s ease-out 2;
}

@keyframes notification-pulse {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tblr-red) 60%, transparent); }
    100% { box-shadow: 0 0 0 .5rem color-mix(in srgb, var(--tblr-red) 0%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
    .notification-pulse {
        animation: none;
    }
}

/* Communications log: the email exactly as sent */
.email-preview {
    display: block;
    width: 100%;
    height: 42rem;
    border: 0;
    border-top: 1px solid var(--tblr-border-color);
    background: #f4f6fa;
}

/* New claim: the two ways to start, as tiles. */
.start-option {
    border: 1px solid var(--tblr-border-color);
    transition: border-color .15s, box-shadow .15s;
}

.start-option:hover {
    border-color: var(--tblr-primary);
}

.start-option.is-selected {
    border-color: var(--tblr-primary);
    box-shadow: 0 0 0 .15rem rgba(var(--tblr-primary-rgb), .15);
}

.start-option .start-option-check {
    font-size: 1.4rem;
    color: var(--tblr-primary);
    visibility: hidden;
}

.start-option.is-selected .start-option-check {
    visibility: visible;
}

/* Visit plan cards in the picker. */
.visit-plan-card {
    transition: transform .15s, box-shadow .15s;
}

.visit-plan-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--tblr-box-shadow-card-hover, 0 .5rem 1rem rgba(0, 0, 0, .08));
}

.visit-plan-card.is-used,
.visit-plan-card.is-cancelled {
    opacity: .72;
}

.visit-plan-facts li {
    display: flex;
    gap: .5rem;
    align-items: flex-start;
    margin-bottom: .35rem;
    color: var(--tblr-secondary);
}

.visit-plan-facts li .ti {
    margin-top: .15rem;
}

.visit-plan-summary {
    border-left: 3px solid var(--tblr-primary);
}

/* The Visit plan card opens the meetings drawer: its body and the "View meetings" row. */
.visit-plan-open {
    cursor: pointer;
}

.visit-plan-open:hover,
.visit-plan-meetings-toggle:hover {
    background: var(--tblr-bg-surface-secondary, rgba(0, 0, 0, .02));
}

.visit-plan-meetings-toggle {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    padding: .6rem var(--tblr-card-spacer-x, 1.25rem);
    border: 0;
    border-top: 1px solid var(--tblr-border-color);
    background: none;
    text-align: start;
}

/* What changed in the planner since the claim was submitted, on the card and in the drawer. */
.visit-plan-flag {
    display: flex;
    gap: .35rem;
    align-items: flex-start;
    margin: .5rem 0;
    font-size: .8125rem;
}

.visit-plan-flag .ti {
    margin-top: .15rem;
}

/* The meetings drawer: wide enough to read on a desktop, the whole screen on a phone. */
.visit-meetings.offcanvas-end {
    --tblr-offcanvas-width: 34rem;
    width: min(34rem, 100vw);
}

.meeting-tile {
    background: var(--tblr-bg-surface-secondary, #f6f8fb);
    border-radius: var(--tblr-border-radius);
    padding: .5rem .75rem;
}

.meeting-day-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .5rem;
    margin: 1rem 0 .5rem;
    padding-bottom: .35rem;
    border-bottom: 1px solid var(--tblr-border-color);
}

.meeting-card {
    border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
    padding: .65rem .8rem;
    margin-bottom: .5rem;
}

.meeting-card.is-cancelled {
    background: var(--tblr-bg-surface-secondary, #f6f8fb);
    color: var(--tblr-secondary);
}

.meeting-rating {
    color: var(--tblr-gray-300, #c8d3e1);
    font-size: 1rem;
    letter-spacing: .1rem;
    line-height: 1;
    margin: .1rem 0 .25rem;
}

.meeting-rating .is-on {
    color: var(--tblr-yellow);
}

/* The Winways logo beside the app name, in the sidebar and on the sign-in page. */
.brand-logo {
    flex-shrink: 0;
    object-fit: contain;
}

/* Sign-in page: the WINWAYS logo, on a white plate in dark mode (its edges were drawn against white). */
.auth-logo {
    max-width: 100%;
    height: auto;
}

[data-bs-theme="dark"] .auth-logo {
    background: #fff;
    padding: .5rem .75rem;
    border-radius: var(--tblr-border-radius-lg, 8px);
    box-sizing: content-box;
}

.auth-app-name {
    margin-top: .35rem;
    color: var(--tblr-secondary);
    font-weight: 500;
    letter-spacing: .3em;
    text-transform: uppercase;
    font-size: .8125rem;
}

/* "Sign in with Google" in Google's own button style: white with a grey outline, the four-colour G on the left,
   Roboto Medium 14px, 40px high; the dark version follows Google's dark button. */
.google-signin {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    padding: 0 12px 0 42px;
    border: 1px solid #747775;
    border-radius: 4px;
    background: #fff;
    color: #1f1f1f;
    font-family: "Roboto", var(--tblr-font-sans-serif, sans-serif);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .25px;
    transition: background-color .218s, box-shadow .218s;
}

.google-signin:hover {
    background: #f7f8f8;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15);
}

.google-signin:active {
    background: #eceded;
}

.google-signin:focus-visible {
    outline: 2px solid #0b57d0;
    outline-offset: 2px;
}

.google-signin-logo {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
}

[data-bs-theme="dark"] .google-signin {
    background: #131314;
    border-color: #8e918f;
    color: #e3e3e3;
}

[data-bs-theme="dark"] .google-signin:hover {
    background: #1e1e20;
}
