html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

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

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.full-width-menu .mud-menu {
    width: 100%;
}

/* Animation for blinking icon effect */
@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* Apply to an icon to make it blink */
.blink-icon {
    animation: blink 1s linear infinite;
    color: var(--mud-palette-error); /* Optional: make it red */
}

/* ============================================================
   Buildify Design System — Shared layout classes
   ============================================================ */

/* CSS variables for module accent colors */
:root {
    --bf-color-tickets:     #2E9138;  /* green-6 */
    --bf-color-forms:       #0F49A5;  /* blue-7 */
    --bf-color-files:       #DB8500;  /* orange-6 */
    --bf-color-projects:    #425467;  /* contrast-7 */
    --bf-color-blueprints:  #6B3FA0;  /* purple-7 */
    --bf-color-muted:       #7E91A8;  /* contrast-5 */
    --bf-shadow-card:    0 1px 3px rgba(0, 0, 0, 0.08);
    --bf-bg-page:        #F5F5F5;  /* neutral light grey */
}

/* Outer page container — fills the screen below the AppBar */
.bf-page {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 64px);
    overflow: hidden;
}

/* Scrollable content area */
.bf-scroll-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--bf-bg-page);
}

/* Sticky action bar at the bottom */
.bf-action-bar {
    flex-shrink: 0;
    padding: 0.75rem 1rem;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Base card — white block with shadow and rounded corners */
.bf-card {
    background: white;
    margin: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    box-shadow: var(--bf-shadow-card);
    padding: 0.875rem 0.75rem;
}

/* Card variant for form fields (extra padding) */
.bf-card--form {
    background: white;
    margin: 0 0.75rem 0.5rem 0.75rem;
    border-radius: 0.5rem;
    box-shadow: var(--bf-shadow-card);
    padding: 1.25rem;
}

/* First form card on a page (extra top margin) */
.bf-card--form:first-of-type {
    margin-top: 0.75rem;
}

/* Last form card on a page (extra bottom margin) */
.bf-card--form:last-of-type {
    margin-bottom: 0.75rem;
}

/* List item card — clickable, with colored left border */
.bf-card--item {
    background: white;
    margin: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    box-shadow: var(--bf-shadow-card);
    padding: 0.875rem 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border-left: 4px solid transparent;
}

.bf-card--item:active {
    background: #F5F5F5;
}

/* Accent colors as left border on list items */
.bf-card--item.accent-tickets     { border-left-color: var(--bf-color-tickets); }
.bf-card--item.accent-forms       { border-left-color: var(--bf-color-forms); }
.bf-card--item.accent-files       { border-left-color: var(--bf-color-files); }
.bf-card--item.accent-projects    { border-left-color: var(--bf-color-projects); }
.bf-card--item.accent-blueprints  { border-left-color: var(--bf-color-blueprints); }

/* Leaflet blueprint popup link */
.bp-popup-link {
    color: var(--bf-color-primary, #1976d2);
    text-decoration: none;
    display: block;
    min-width: 120px;
}
.bp-popup-link:hover { text-decoration: underline; }

/* Navigation card (no left border, with chevron) */
.bf-card--nav {
    background: white;
    margin: 0 0.75rem 0.5rem 0.75rem;
    border-radius: 0.5rem;
    box-shadow: var(--bf-shadow-card);
    padding: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Muted / caption text color */
.bf-text-muted {
    color: var(--bf-color-muted);
}

/* Padding wrapper around a list of cards */
.bf-list {
    padding: 0.5rem 0;
}

/* Inner flex row within a list card (avatar + content + meta) */
.bf-card--body {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
    width: 100%;
}

/* Main text column within a card body */
.bf-card--content {
    flex: 1;
    min-width: 0;
}

/* Right-aligned badge/action area within a card */
.bf-card--meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Action bar as an inline flex row (multiple buttons side by side) */
.bf-action-bar--row {
    display: flex;
    gap: 0.5rem;
}

/* Warning/alert icon color */
.bf-icon-warning { color: #F57C00; }

/* Muted chevron navigation icon */
.bf-icon-chevron { color: #BDBDBD; }

/* Flex-fill utilities for MudBlazor components in horizontal layouts */
.bf-text-flex  { flex: 1; }
.bf-btn-flex   { flex: 1; }
.bf-input-flex { flex: 1; }

/* Semi-bold text (600 weight) */
.bf-font-semibold { font-weight: 600; }

/* Empty state: large centered muted icon */
.empty-state-icon-lg {
    font-size: 4.5rem;
    color: #BDBDBD;
    margin-bottom: 1rem;
}

/* Empty state caption text */
.empty-state-caption { color: #9E9E9E; }

/* Truncated single-line bold card title */
.card-title-truncate {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* File tree: file icon (orange) */
.file-icon--file   { color: #F57C00; margin-right: 0.5rem; font-size: 1.25rem; }

/* File tree: folder icon (amber) */
.file-icon--folder { color: #FFA726; margin-right: 0.5rem; font-size: 1.25rem; }

/* File/folder name text in tree view */
.file-node-name { font-weight: 600; }

/* Module hub tile icons — base size + per-module color */
.module-tile-icon              { font-size: 2.25rem; }
.module-tile-icon--tickets     { color: var(--bf-color-tickets); }
.module-tile-icon--files       { color: var(--bf-color-files); }
.module-tile-icon--forms       { color: var(--bf-color-forms); }
.module-tile-icon--muted       { color: #BDBDBD; }

/* Module hub tile label text */
.module-tile-label             { font-weight: 700; color: #212121; }
.module-tile-label--muted      { font-weight: 700; color: #757575; }
.module-tile-caption--muted    { color: #BDBDBD; }

/* Carousel: fixed-height presets */
.carousel-height-220 { height: 13.75rem; }
.carousel-height-180 { height: 11.25rem; }

/* Carousel: empty/placeholder state */
.carousel-empty-white { background-color: white; }
.carousel-empty-icon  { font-size: 3rem; color: #BDBDBD; }
.carousel-empty-text  { color: #BDBDBD; margin-top: 0.5rem; }

/* Carousel: full-bleed image item */
.carousel-img-full { width: 100%; height: 13.75rem; }

/* Carousel: add-photo placeholder (edit form) */
.edit-carousel-empty-icon { font-size: 3rem; color: #BDBDBD; }
.edit-carousel-empty-text { color: #BDBDBD; }

/* Carousel: missing/unsupported image placeholder (edit form) */
.edit-carousel-placeholder      { background-color: #EFEFEF; }
.edit-carousel-placeholder-icon { font-size: 4rem; }

/* Location nav card: pin icon (teal) */
.location-pin-icon { color: #00897B; font-size: 1.5rem; }

/* Location nav card: confirmed-location label */
.location-selected-text { font-weight: 600; color: #00897B; }

/* Forms banner: date/caption text */
.form-banner-date { color: #616161; }

/* FAB with hidden input overlay — disable pointer events on FAB itself */
.fab-no-pointer { pointer-events: none; }

/* Skeleton list item: gray left border accent */
.accent-skeleton { border-left-color: #E0E0E0; }

/* Utility: prevent an element from shrinking in a flex container */
.bf-shrink-0 { flex-shrink: 0; }

/* Utility: medium-weight text (500) */
.bf-text-medium { font-weight: 500; }

/* Avatar in the ticket header (teal, white bold number) */
.issue-number-avatar {
    background-color: #00897B;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
}

/* Ticket title text */
.issue-title {
    font-weight: 700;
    line-height: 1.3;
}

/* Due date alarm icon (red) */
.issue-duedate-icon {
    color: #F44336;
}

/* Due date label text (red, bold) */
.issue-duedate-text {
    color: #F44336;
    font-weight: 600;
}

/* Description text below the header */
.issue-description {
    line-height: 1.5;
}

/* Camera capture dialog: edge-to-edge content, no default MudDialog padding/margin */
.camera-capture-dialog-content {
    margin: 0 !important;
    padding: 0 !important;
}

/* Tagged-user pill inside comment text, both while typing (MentionTextArea)
   and when rendering stored comments. Matches the backoffice's Mentiony
   styling exactly, since both apps share the same stored markup. */
.mention-area .highlight .mentiony-link {
    color: white;
    background: #009688;
    padding: 1px 4px;
    border-radius: 3px;
}
