#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    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,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1zbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA9NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA7MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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");
    }

h1:focus {
    outline: none;
}

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

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

.validation-message {
    color: #e50000;
}

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

:root{
    --primary:#0b6b2b;
    --accent:#f4a300;
    --text:#222;
    --muted:#666;
    --max-width:1100px;
    --container-pad:1rem;
    --radius:6px;
    --nav-grey: #7a7a7a;
    --nav-active: #e31b23;
    --header-height: 64px;
    --header-top-gap: 16px;   /* space between viewport top and navbar */
    --header-gap-below: 12px; /* space between navbar and hero image */
}

/* Reset / layout helpers */
*{box-sizing:border-box}
html,body{
    height:100%;
    margin:0;
    font-family:Segoe UI,system-ui,-apple-system,Roboto,"Helvetica Neue",Arial;
    color:var(--text);
    overflow-x:hidden; /* prevent horizontal scrollbar from full-bleed elements */
    -webkit-font-smoothing:antialiased;
}
body{
    min-height:100vh;
    overflow-y:auto; /* allow page scrolling when content requires it */
    /* Reserve space for the fixed header (top gap + header + gap below) so content starts below it */
    padding-top: calc(var(--header-top-gap) + var(--header-height) + var(--header-gap-below));
}

/* Basic helpers */
h1:focus { outline: none; }
.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid #e50000; }
.validation-message { color: #e50000; }

/* Header / Navigation */
/* Use fixed positioning so header's top offset doesn't create extra document flow height */
.site-header{
    background: #ffffff;
    border-bottom: none;  /* ensure no grey divider */
    box-shadow: none;
    position: fixed;
    top: var(--header-top-gap);
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    display:flex;
    align-items:center;
    /* visually separate header from content using the reserved space on body (no margin needed) */
}

/* Left-aligned grouping: increased horizontal padding so nav isn't flush to the edges */
.header-left{
    display:flex;
    align-items:center;
    gap:1.25rem;
    padding:0 2rem; /* ample horizontal breathing room */
    margin:0;
    width:100%;
}

/* Brand */
.brand{display:flex;align-items:center;gap:0.5rem}
.brand-logo{height:80px;width:auto;object-fit:contain}

/* Nav */
.site-nav{display:flex;gap:1.25rem;align-items:center}
.site-nav a{
    padding:0.25rem 0.125rem;
    border-radius:2px;
    color:var(--nav-grey);
    font-weight:600;
    font-size:0.95rem;
    text-transform:none;
    text-decoration: none;
}
.site-nav a:hover{ color:#333; }
.site-nav a.active, .site-nav a[aria-current="page"]{ color:var(--nav-active); }

/* Home hero — full-bleed background sized to available viewport without overflow */
/* Because header is fixed, hero can be set to the remaining viewport height but capped
   so it doesn't get excessively tall on very large screens. */
.home-hero {
    /* full-bleed */
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    /* choose the smaller of (available viewport space) and 80vh so hero can't exceed a comfortable height */
    height: min( calc(100vh - var(--header-top-gap) - var(--header-height) - var(--header-gap-below)), 82vh );
    display: flex;
    align-items: center;
    justify-content: center;
    /* responsive inner padding that won't create overflow (box-sizing:border-box) */
    padding-inline: clamp(1rem, 6vw, 6rem);
    padding-block: clamp(0.75rem, 6vh, 3rem);
    background-image: url('');
    background-image: url('/../Images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
    text-align: center;
    overflow: hidden;
}

/* Optional subtle gradient overlay to keep text readable */
.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,0.26), rgba(0,0,0,0.26));
    pointer-events: none;
}

/* Constrain title width and vertically center content in a predictable way */
.home-hero .hero-inner {
    position: relative;
    z-index: 1;
    width: min(1200px, 100%);
    max-width: 90ch;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

/* Title styling — larger, balanced, and constrained for very wide screens */
.hero-title {
    margin: 0;
    padding: 0 0.5rem;
    font-weight: 900;
    font-size: clamp(3.5rem, 10vw, 8.5rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1;
    text-shadow: 0 8px 28px rgba(0,0,0,0.6);
    word-break: break-word;
    hyphens: auto;
}

/* If you want a subtitle or small CTA under the title, keep it readable */
.home-hero .hero-sub {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(255,255,255,0.95);
    margin-top: 0.25rem;
}

/* Main content spacing */
.container{max-width:var(--max-width);margin:0 auto;padding:0 var(--container-pad);}
.main-content{padding:1.6rem 0}
.page-body{margin-top:1rem}

/* Footer */
.site-footer{border-top:1px solid #eee;padding:1rem 0;background:#fff;color:var(--muted)}
.footer-inner{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap}
.footer-links a{margin-left:0.6rem;color:var(--muted)}

/* Register page — improved form field and radio-card styling */

/* Form labels & inputs */
.form-row label {
    display: block;
    margin-bottom: 0.35rem;
    color: #222;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    background: #ffffff;
    color: #222;
    font-size: 0.95rem;
    box-shadow: none;
    transition: border-color .12s ease, box-shadow .12s ease, transform .06s ease;
}

.form-control:focus {
    outline: none;
    border-color: rgba(11,107,43,0.9);
    box-shadow: 0 4px 18px rgba(11,107,43,0.06);
}

/* Notification */
.notification {
    background: #f3fff4;
    color: #0b6b2b;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(11,107,43,0.12);
}

/* Radio-list as selectable light cards */
.radio-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.radio-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0.9rem 1rem 0.9rem 46px; /* room for indicator */
    gap: 0.75rem;
    border-radius: 10px;
    border: 1px solid #e6e6e6;
    background: #fff;
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease, transform .06s ease;
    color: #222;
    user-select: none;
}

.radio-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}

/* Keep the native input accessible but visually hidden */
.radio-item .form-check-input {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    opacity: 0;
}

/* Label text */
.radio-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #222;
    line-height: 1.1;
}

/* Small details line (day + time on first line, location/price as secondary) */
.radio-label strong { font-weight:700; font-size:1rem; color:#111; }
.radio-label small { color:#666; font-size:0.92rem; }

/* Circular indicator to the left of each card (uses the sibling + selector) */
.radio-label::before {
    content: "";
    display: block;
    position: absolute;
    left: 18px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #cfcfcf;
    background: transparent;
    transition: background .12s ease, border-color .12s ease, box-shadow .12s ease;
}

/* When radio is checked, style the indicator and label */
.radio-item input[type="radio"]:checked + .radio-label::before {
    background: var(--nav-active);
    border-color: var(--nav-active);
    box-shadow: 0 0 0 6px rgba(227,27,35,0.06);
}

/* When checked: subtle card highlight (modern browsers support) */
.radio-item:has(input[type="radio"]:checked) {
    border-color: rgba(227,27,35,0.9);
    background: rgba(227,27,35,0.04);
}

/* Fallback for browsers without :has(): highlight the label area when input is checked */
.radio-item input[type="radio"]:checked + .radio-label {
    /* slightly darken text to emphasize selection */
    color: #111;
}

/* Ensure the visible indicator aligns on small screens */
@media (max-width:480px) {
    .radio-item { padding: 0.7rem 0.9rem 0.7rem 44px; border-radius:8px; }
    .radio-label::before { width:16px; height:16px; left:16px; }
}

/* Make submit button visually consistent with inputs */
.btn.primary {
    background: var(--nav-active);
    color: #fff;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.btn.primary:hover { opacity: 0.95; transform: translateY(-1px); }

/* Register: move submit button down and responsive width */
.form-row ~ .btn.primary,
form .btn.primary {
    margin-top: 1.25rem;
    display: inline-block;
}

/* Ensure full-width on very small screens for easier tapping */
@media (max-width:480px) {
    .form-row ~ .btn.primary,
    form .btn.primary {
        width: 100%;
        display: block;
    }
}

/* Schedule page — card-like table rows that match form styling */

/* Base table layout */
.schedule-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.75rem; /* vertical gap between "cards" */
    margin-top: 1rem;
}

/* Header styling */
.schedule-table thead th {
    padding: 0.5rem 1rem;
    text-align: left;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.95rem;
}

/* Make each body row appear as a card */
.schedule-table tbody tr {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
    transition: transform .08s ease, box-shadow .12s ease;
    overflow: hidden;
}

/* Cells inside the card */
.schedule-table td {
    padding: 0.9rem 1rem;
    vertical-align: middle;
    border-bottom: none;
    color: #222;
    font-size: 0.95rem;
}

/* Emphasize the first column (day/time) */
.schedule-table td:first-child {
    font-weight: 700;
    color: #111;
}

/* Hover effect */
.schedule-table tbody tr:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

/* Responsive: convert table to stacked cards on small screens */
@media (max-width: 700px) {
    .schedule-table thead {
        display: none; /* hide header on small devices */
    }

    .schedule-table,
    .schedule-table tbody,
    .schedule-table tr,
    .schedule-table td {
        display: block;
        width: 100%;
    }

    .schedule-table tbody tr {
        margin-bottom: 0.75rem;
        padding: 0.6rem 0.75rem;
    }

    .schedule-table td {
        padding: 0.35rem 0.5rem;
        border: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* inject labels for each column for stacked layout */
    .schedule-table td:nth-child(1)::before { content: "Dag"; font-weight:700; margin-right:0.75rem; color:#666; }
    .schedule-table td:nth-child(2)::before { content: "Tid"; font-weight:700; margin-right:0.75rem; color:#666; }
    .schedule-table td:nth-child(3)::before { content: "Plats"; font-weight:700; margin-right:0.75rem; color:#666; }
    .schedule-table td:nth-child(4)::before { content: "Pris"; font-weight:700; margin-right:0.75rem; color:#666; }

    .schedule-table td::before {
        display: inline-block;
        min-width: 5.25rem;
        font-size: 0.85rem;
    }
}

/* Small visual polish to align schedule styling with form cards */
.schedule-table td small,
.schedule-table td .muted {
    color: var(--muted);
    font-size: 0.92rem;
}

/* Ensure schedule area matches the page container spacing */
.schedule-table {
    margin-left: 0;
    margin-right: 0;
}

/* Accessibility: focus styles for keyboard users when row contains interactive elements */
.schedule-table tbody tr:focus-within {
    outline: 3px solid rgba(11,107,43,0.08);
    outline-offset: 2px;
}

.schedule-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.schedule-row:hover {
    background-color: #f0f0f0;
}

/* Spinner animation */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button with spinner */
.btn.primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.btn.primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-submit-container {
    margin-top: 1rem;
}

/* Disabled form fields styling */
input:disabled,
.form-control:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sponsors {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-top: 20px;
}

.sponsor-logo {
    height: 80px;
    width: auto;
    transition: opacity 0.3s ease;
}

.sponsor-logo-lrg {
    height: 50px;
    width: auto;
    transition: opacity 0.3s ease;
}
    .sponsor-logo:hover {
        opacity: 0.7;
    }

@media (max-width: 600px) {
    .sponsors {
        flex-direction: column;
        gap: 20px;
    }
}
