:root {
    --ohc-maroon: #4a1c24;
    --ohc-gold: #d4b785;
    --ohc-cream: #f7f1e6;
    --ohc-ink: #2b1719;
}

html, body {
    margin: 0;
    font-family: "Source Sans 3", sans-serif;
    color: var(--ohc-ink);
    background: var(--ohc-cream);
}

/* Shown before the WebAssembly runtime boots. */
.app-loading,
.app-load-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 100vh;
    padding: 2rem 1.25rem;
    text-align: center;
    font-family: "Oswald", sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ohc-maroon);
}

.app-loading[hidden],
.app-load-error[hidden] {
    display: none !important;
}

.app-loading img {
    animation: ohc-loading-logo 1.6s ease-in-out infinite;
}

.app-loading-dots span {
    display: inline-block;
    animation: ohc-loading-dot 1.4s infinite;
    opacity: .2;
}

.app-loading-dots span:nth-child(2) {
    animation-delay: .2s;
}

.app-loading-dots span:nth-child(3) {
    animation-delay: .4s;
}

.app-load-error {
    font-family: "Source Sans 3", sans-serif;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ohc-ink);
}

.app-load-error-title {
    margin: 0;
    font-family: "Oswald", sans-serif;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ohc-maroon);
    font-size: 1.35rem;
}

.app-load-error p {
    margin: 0;
    max-width: 22rem;
}

.app-load-error-retry {
    margin-top: .5rem;
    color: var(--ohc-maroon);
    font-weight: 700;
}

@keyframes ohc-loading-logo {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.06); opacity: .82; }
}

@keyframes ohc-loading-dot {
    0%, 80%, 100% { opacity: .2; }
    40% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .app-loading img,
    .app-loading-dots span {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

.ohc-brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    color: inherit;
}

.ohc-brand img {
    width: 2.75rem;
    height: 2.75rem;
    object-fit: contain;
    /* Soft cream disc so the maroon fox reads on the maroon app bar. */
    padding: .2rem;
    border-radius: 50%;
    background: radial-gradient(
        circle at center,
        rgba(247, 241, 230, .98) 0%,
        rgba(247, 241, 230, .88) 50%,
        rgba(247, 241, 230, .28) 66%,
        rgba(247, 241, 230, 0) 76%
    );
    /* Thin crisp edge + light soft lift — avoid heavy blur that muddies the mark. */
    filter:
        drop-shadow(0 0 0.6px rgba(247, 241, 230, 1))
        drop-shadow(0 1px 2px rgba(0, 0, 0, .28));
}

.ohc-brand-title {
    font-family: "Anton", Impact, sans-serif;
    letter-spacing: .06em;
    line-height: 1.05;
    text-transform: uppercase;
}

.ohc-brand-subtitle {
    font-size: .7rem;
    letter-spacing: .12em;
    opacity: .82;
    text-transform: uppercase;
}

/* Medium+ screens: primary links centered; Login / account stay on the right. */
.ohc-appbar.mud-appbar .mud-toolbar-appbar {
    position: relative;
}

.ohc-appbar-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.ohc-appbar-end {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* Gold outline reads as an invitation on the maroon bar without competing with Login. */
.ohc-install-btn.mud-button-root {
    border-color: rgba(212, 183, 133, .5);
    background: rgba(212, 183, 133, .1);
    color: var(--ohc-gold);
    white-space: nowrap;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.ohc-install-btn.mud-button-root:hover,
.ohc-install-btn.mud-button-root:focus-visible {
    border-color: var(--ohc-gold);
    background: rgba(212, 183, 133, .22);
    box-shadow: 0 0 0 3px rgba(212, 183, 133, .16);
}

/* Phones: collapse to the icon so the brand and Login keep their room. */
@media (max-width: 599.95px) {
    .ohc-install-btn-label {
        display: none;
    }

    .ohc-install-btn.mud-button-root {
        min-width: 0;
        padding: .35rem .5rem;
    }

    .ohc-install-btn .mud-button-icon-start {
        margin: 0;
    }
}

/* Photo hero used on the home page. */
.ohc-hero {
    position: relative;
    min-height: min(64vh, 32rem);
    display: grid;
    align-items: end;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(43, 16, 21, .25), rgba(43, 16, 21, .86)),
        url("../images/home-hero.jpg") center top / cover no-repeat;
}

/* Same horizontal gutters as the About Us MudContainer (MaxWidth.Large). */
.ohc-hero-container {
    width: 100%;
}

.ohc-hero-content {
    padding: 3rem 0 4rem;
    max-width: 42rem;
}

.ohc-hero-logo {
    width: clamp(4.5rem, 12vw, 7rem);
    height: auto;
    margin-bottom: .75rem;
    /* Crisp light edge, then a soft fade into the photo — mark itself stays sharp. */
    filter:
        drop-shadow(0 0 0.75px rgba(247, 241, 230, 1))
        drop-shadow(0 0 10px rgba(247, 241, 230, .4))
        drop-shadow(0 3px 10px rgba(0, 0, 0, .4));
}

.ohc-hero h1,
.ohc-hero h2 {
    color: #fff;
}

.ohc-sponsor-logos img {
    max-height: 3.25rem;
    width: auto;
    object-fit: contain;
    filter: grayscale(.15);
}

.ohc-about-photo {
    width: 100%;
    max-height: 18rem;
    object-fit: contain;
}

.ohc-memorial-photo {
    width: 100%;
    max-height: 18rem;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center top;
}

.ohc-waiver-list {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
}

.ohc-waiver-list li {
    margin-bottom: .75rem;
}

.ohc-event-past {
    opacity: .62;
}

/* Sticky footer: keep the rule with the copyright (hr/MudDivider grows in flex columns). */
.ohc-page {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--mud-appbar-height));
}

.ohc-page-body {
    flex: 1 0 auto;
}

.ohc-site-footer {
    flex: 0 0 auto;
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    text-align: center;
    border-top: 1px solid rgba(74, 28, 36, .14);
}

/* Admin / data tables: allow horizontal scroll when columns are wider than the viewport. */
.ohc-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ohc-table-scroll .mud-table {
    min-width: 0;
}

/* Keep action buttons usable in dense table rows and stacked card rows. */
.ohc-table-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: .35rem;
}

@media (max-width: 959.95px) {
    .ohc-table-actions {
        justify-content: flex-start;
        margin-top: .25rem;
    }
}

/* Drawer nav: active link keeps MudBlazor's tinted background and adds a primary edge. */
.ohc-nav-menu .mud-nav-link.active {
    border-right: 3px solid var(--mud-palette-primary);
}

.ohc-nav-menu .mud-nav-link {
    border-right: 3px solid transparent;
}

/* Hidden MudDatePicker used only so the DOB text field adornment can open the calendar. */
.ohc-dob-picker-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    pointer-events: none;
}

.ohc-volunteer-attention {
    border-radius: 8px;
    outline: 2px solid var(--ohc-gold);
    outline-offset: 4px;
    animation: ohc-volunteer-pulse 1s ease-in-out 3;
}

@keyframes ohc-volunteer-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 183, 133, 0.55); }
    50% { box-shadow: 0 0 0 10px rgba(212, 183, 133, 0); }
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: .6rem 1.25rem .7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1301;
}

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