/* Minimal styles needed for first paint on public pages. Full rules live in site.css / MudBlazor.min.css. */
@font-face {
    font-family: Montserrat;
    font-style: normal;
    font-weight: 400 700;
    font-display: optional;
    src: url('/fonts/montserrat-latin.woff2') format('woff2');
}

/* Brand primary — keep in sync with MasterLayout MudTheme (light Primary). */
:root {
    --mud-palette-primary: #4C5C92;
    --mud-palette-primary-light: #8B9BCF;
    --mud-palette-primary-dark: #3A4670;
    --mud-palette-on-primary: #ffffff;
    --mud-palette-background: #ffffff;
    --mud-palette-text-primary: #424242;
    --mud-default-borderradius: 4px;
    /* Reserve app bar space before full MudBlazor.css arrives (dense toolbar). */
    --mud-appbar-height: 64px;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: Montserrat, "Segoe UI", system-ui, -apple-system, sans-serif;
    /* Reduce fallback↔Montserrat metric mismatch (approximate). */
    font-size-adjust: 0.52;
    background: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
}

.mud-layout {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    overflow-x: hidden;
}

.mud-appbar {
    min-height: 48px;
}

.mud-appbar-dense ~ .mud-main-content,
.mud-main-content {
    padding-top: 48px;
}

.mud-typography-h4 {
    margin: 0;
    font-size: 2.125rem;
    line-height: 1.235;
    font-weight: 400;
}

.mud-typography-h5 {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.334;
    font-weight: 400;
}

.mud-typography-h6 {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.6;
    font-weight: 500;
}

.mud-typography-body1 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

.mud-theme-dark {
    --mud-palette-primary: #8B9BCF;
    --mud-palette-primary-light: #A8B5DB;
    --mud-palette-primary-dark: #4C5C92;
    --mud-palette-on-primary: #12141C;
}

/* Explicit width+height (not auto) so aspect-ratio box matches first paint. */
.homepage-logo {
    display: block;
    width: 137px;
    height: 75px;
    aspect-ratio: 300 / 164;
    max-width: 100%;
    object-fit: contain;
}

@media (min-width: 960px) {
    .homepage-logo {
        width: 200px;
        height: 109px;
    }
}

.mud-card.home-panel-card {
    width: 900px;
    height: 850px!important;
    max-width: 100%;
    border: 1px solid #616161 !important;
    border-radius: var(--mud-default-borderradius, 4px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.home-panel-media {
    display: block;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background-color: #e8e8e8;
    flex-shrink: 0;
}

.home-panel-media img {
    display: block;
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.homepage-qr {
    display: block;
    width: 200px;
    height: 200px;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.mud-card.home-panel-card .mud-card-content {
    flex: 1 1 auto;
    overflow: auto;
    min-height: 0;
}

.mud-card.home-panel-card .mud-card-actions {
    margin-top: auto;
}

.home-panel-content {
    color: var(--mud-palette-text-primary);
}

@media (max-width: 959px) {
    .mud-card.home-panel-card {
        height: auto !important;
        min-height: unset;
        max-height: none;
        overflow: visible;
    }

    .mud-card.home-panel-card .mud-card-content {
        flex: 0 1 auto;
        overflow: visible;
        min-height: unset;
        max-height: none;
    }

    .mud-card.home-panel-card .mud-card-actions {
        margin-top: 0;
    }

    .home-panel-content .safe-content-viewer .html-content-wrapper,
    .home-panel-content .safe-content-viewer .ql-editor {
        overflow: visible;
        max-height: none;
        min-height: unset;
    }
}

.mud-card.public-content-card {
    width: 900px;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
    border: 1px solid #9e9e9e !important;
    border-radius: var(--mud-default-borderradius, 4px);
    overflow: visible;
    box-sizing: border-box;
}

.public-content-card-media {
    width: 100%;
    height: clamp(190px, 32vw, 320px);
    overflow: hidden;
    background-color: #e8e8e8;
    border-radius: var(--mud-default-borderradius, 4px) var(--mud-default-borderradius, 4px) 0 0;
}

.public-content-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

img.public-content-card-media {
    display: block;
    width: 100%;
    height: clamp(190px, 32vw, 320px);
    background-color: #e8e8e8;
    border-radius: var(--mud-default-borderradius, 4px) var(--mud-default-borderradius, 4px) 0 0;
    box-sizing: border-box;
}

.public-content-card-media-contain {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--mud-palette-surface);
}

.public-content-card-media-contain img {
    object-fit: contain;
    padding: 1rem;
}

img.public-content-card-media.object-contain {
    padding: 1rem;
}

.public-content-card-image {
    display: block;
    margin-inline: auto;
    border: 1px solid var(--mud-palette-lines-default, #9e9e9e);
    border-radius: var(--mud-default-borderradius, 4px);
    overflow: hidden;
    box-sizing: border-box;
}

.public-content-card-image picture,
.public-content-card-image img {
    display: block;
}

.public-content-card-image img {
    max-width: 100%;
    height: auto;
    border-radius: inherit;
}

.public-content-card-title {
    padding: 1.5rem 1.5rem 1rem;
}

.public-content-card-body {
    padding: 1.5rem;
}

.public-content-card-actions {
    justify-content: center;
    padding: 0 1.5rem 1.5rem;
}

.public-content-card-body {
    color: var(--mud-palette-text-primary);
}

.mud-card[role="button"] {
    cursor: pointer;
}

.mud-card[role="button"]:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

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

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

#reconnect-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10001;
    color: transparent;
    font-size: 0;
}

#reconnect-modal.reconnect-visible {
    display: flex !important;
    opacity: 1 !important;
    background-color: rgb(0 0 0 / 35%) !important;
}
