*, *::before, *::after {
    box-sizing: border-box;
}

html, body, #app {
    height: 100%;
    margin: 0;
    overflow-x: hidden;
    overscroll-behavior: none;
}

.page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow-x: hidden;
}

* {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

body {
    -webkit-text-size-adjust: none;
    -webkit-user-select: none;
    user-select: none;
    background-attachment: fixed;
    background-color: black;
    font-family: 'RobotoRegular', 'Droid Sans', 'Segoe UI', Segoe, 'San Francisco',
        'Helvetica Neue', Helvetica, Arial, Geneva, sans-serif;
    font-size: 14px;
    height: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
}

#header {
    background-color: black;
    height: 58px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

#searchTb {
    border: 2px solid #ccc;
    border-radius: 8px;
    height: 50px;
    color: white;
    background-color: black;
    padding-left: 12px;
    padding-right: 36px;
    font-size: 21px;
    box-sizing: border-box;
    width: 100%;
}

    #searchTb:-webkit-autofill,
    #searchTb:-webkit-autofill:hover,
    #searchTb:-webkit-autofill:focus {
        -webkit-text-fill-color: #fff; /* text colour */
        -webkit-box-shadow: 0 0 0 1000px #2a2a2a inset; /* covers the white background */
        caret-color: #fff;
        transition: background-color 9999s ease-in-out 0s;
    }

.search-wrapper {
    position: relative;
    margin-left: 8px;
    margin-right:5px;
    width: 75%;
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
}

#searchTb:focus {
    border: 2px solid #7bc1f7;
    outline: none;
}

#divContainer {
    background-color: black;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
}

.row {
    cursor: pointer;
    padding: 10px;
}

.divOdd {
    background-color: #E0E0E0;
}

.divEven {
    background-color: white;
}

.rowWidth {
    display: flex;
    width: 100%;
}

.divFill {
    display: flex;
    width: 100%;
}

.divLeftStyle {
    width: 60%;
}

.divRightStyle {
    width: 40%;
    text-align: right;
}

/* Side navigation */

.sidenav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    max-height: 100vh;
    width: 79%;
    max-width: 340px;
    background: #111;
    display: flex;
    flex-direction: column;
    padding: 4rem 1.5rem 1.5rem;
    gap: 0.5rem;
    overflow-y: auto;
    box-sizing: border-box;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidenav.is-open {
    transform: translateX(0);
}

.sidenav a {
    color: #fff;
    text-decoration: none;
    font-size: 0.99rem;
    padding: 10px 0;
    display: flex;
    align-items: center;
    min-height: 44px;
    box-sizing: border-box;
}

/*.sidenav a:active {
    background-color: rgba(255, 255, 255, 0.1);*/ /* adjust to fit your theme */
/*}*/
.sidenav a:active,
.sidenav-checkbox:active {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidenav-checkbox {
    color: #fff;
    text-decoration: none;
    font-size: 0.96rem;
    padding: 10px 0;
    display: flex;
    align-items: center;
    min-height: 44px;
    box-sizing: border-box;
}

.sidenav .closebtn {
    font-size: 1.8rem;
    align-self: flex-end;
    margin-bottom: 0.5rem;
}

/* Hamburger icon */
.burger-container {
    display: inline-block;
    cursor: pointer;
    background: transparent;
    border: none;
    margin-left: auto;
    margin-right: 12px;
}

.burger-bar1, .burger-bar2, .burger-bar3 {
    width: 30px;
    height: 2px;
    background-color: white;
    margin: 6px 0;
}

/* Context menu, replaces the jQuery right-click context menu */
/*.context-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 3;
}

.context-menu {
    position: fixed;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    min-width: 200px;
    padding: 4px 0;*/
    /* Nudge slightly so the tapped element isn't hidden under the finger/cursor */
    /*transform: translate(-10px, 10px);
}

.context-menu a {
    display: block;
    padding: 10px 16px;
    text-align: left;
    font-size: 15px;
    color: black;
    text-decoration: none;
    white-space: nowrap;
}

.context-menu a:hover {
    background: #f0f0f0;
}

.context-menu a:not(:last-child) {
    border-bottom: 1px solid #eee;
}*/

.context-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 3;
    display: none;
}

.context-menu-backdrop.visible {
    display: block;
}

.context-menu {
    position: fixed;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    min-width: 200px;
    padding: 4px 0;
    transform: translate(-10px, 10px);
    z-index: 4;
    visibility: hidden;
}

.context-menu.positioned {
    visibility: visible;
}

.context-menu a {
    display: block;
    padding: 14px 20px;
    text-align: left;
    font-size: 15px;
    color: black;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.1s ease;
}

.context-menu a:hover {
    background: #f0f0f0;
}

.context-menu a:active {
    background: #d6d6d6;
}

.context-menu a:not(:last-child) {
    border-bottom: 1px solid #eee;
}


.sidenav a:active,
.context-menu-item:active {
    animation: blink-tap 0.2s ease;
}

@keyframes blink-tap {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        opacity: 1;
    }
}


/* Hidden by default - Blazor's JS shows this only when an actual
   unhandled error occurs, by setting display:block directly */
#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;
    color: black;
}

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






.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.loading-popup {
    width: 260px;
    padding: 28px 25px;
    border-radius: 18px;
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    text-align: center;
    color: white;
    animation: loadingPopupIn 0.2s ease-out;
}

.loading-spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto 18px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: loadingSpin 0.8s linear infinite;
}

.loading-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.loading-subtitle {
    font-size: 13px;
    opacity: 0.65;
}

@keyframes loadingSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes loadingPopupIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}




.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}


.burger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 34px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
    margin-left: auto;
    margin-right: 15px;
    background: transparent;
    border: none;
    padding: 0;
    position: relative;
}

    .burger::before {
        content: "";
        position: absolute;
        top: -12px;
        left: -40px;
        right: -12px;
        bottom: -12px;
        /* invisible, just expands the clickable area */
    }


    .burger span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: white;
        border-radius: 2px;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .burger-blink {
        animation: blink-tap 0.3s ease;
    }

    @keyframes blink-tap {
        0% {
            opacity: 1;
        }

        50% {
            opacity: 0.5;
        }

        100% {
            opacity: 1;
        }
}

    .burger.is-open span:nth-child(1) {
        transform: translateY(8.5px) rotate(45deg);
    }

    .burger.is-open span:nth-child(2) {
        opacity: 0;
    }

    .burger.is-open span:nth-child(3) {
        transform: translateY(-8.5px) rotate(-45deg);
    }


.load-more-spinner {
    display: flex;
    justify-content: center;
    padding: 16px 0;
}

.loading-spinner.small {
    width: 24px;
    height: 24px;
}



/*#components-reconnect-modal {
    display: none !important;
}*/






.yearpick-backdrop,
.participate-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000; /* must be above your toast-box and context-menu z-indexes */
}

.yearpick-box,
.participate-box {
    background: #1e1e1e;
    color: white;
    border-radius: 8px;
    padding: 20px;
    width: min(90vw, 360px);
    max-height: 80vh;
    overflow-y: auto;
}

.yearpick-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.yearpick-selector,
.yearpick-actions,
.participate-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

    .yearpick-selector select {
        flex: 1;
    }


.toast-box {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    background: #323232;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 99999;
    max-width: calc(100vw - 32px);
    text-align: center;
    animation: toast-in 0.2s ease-out;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translate(-50%, 15px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}








.login-box {
    width: 100%;
    max-width: 400px;
    margin: 40px auto;
    padding: 32px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.10);
}

    .login-box h3 {
        margin: 0 0 28px 0;
        text-align: center;
        font-size: 26px;
        font-weight: 600;
        color: #222;
    }

.login-field {
    margin-bottom: 20px;
}

    .login-field label {
        display: block;
        margin-bottom: 7px;
        font-size: 14px;
        font-weight: 500;
        color: #444;
    }

    .login-field input {
        width: 100%;
        box-sizing: border-box;
        padding: 13px 14px;
        border: 1px solid #d6d6d6;
        border-radius: 10px;
        background: #fafafa;
        color: #222;
        font-size: 16px;
        outline: none;
        transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    }

        .login-field input:focus {
            background: #fff;
            border-color: #777;
            box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.07);
        }

        .login-field input::placeholder {
            color: #999;
        }

.login-error {
    margin: 15px 0;
    padding: 11px 14px;
    border-radius: 9px;
    background: #fff0f0;
    color: #c62828;
    font-size: 14px;
}

.login-submit {
    width: 100%;
    margin-top: 8px;
    padding: 13px 20px;
    border: none;
    border-radius: 10px;
    background: #222;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
}

    .login-submit:hover {
        background: #333;
    }

    .login-submit:active {
        transform: scale(0.98);
    }

    .login-submit:disabled {
        opacity: 0.55;
        cursor: not-allowed;
    }


@media (max-width: 480px) {
    .login-box {
        margin: 20px 16px;
        padding: 26px 20px;
        width: auto;
    }
}





.participate-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

    .participate-actions button {
        flex: 1;
        padding: 13px 20px;
        border: none;
        border-radius: 10px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
    }

        /* Opret */
        .participate-actions button:first-child {
            background: #222;
            color: #fff;
        }

            .participate-actions button:first-child:hover {
                background: #333;
            }

        /* Annuller */
        .participate-actions button:last-child {
            background: #eeeeee;
            color: #333;
        }

            .participate-actions button:last-child:hover {
                background: #e2e2e2;
            }

        .participate-actions button:active {
            transform: scale(0.98);
        }

        .participate-actions button:disabled {
            opacity: 0.55;
            cursor: not-allowed;
        }


.participate-desc {
    margin: 0;
    padding: 4px 2px;
    color: #555;
    font-size: 15px;
    line-height: 1.5;
}







.yearpick-actions {
    display: flex;
    margin-top: 20px;
}

    .yearpick-actions button {
        width: 100%;
        padding: 13px 20px;
        border: none;
        border-radius: 10px;
        background: #eeeeee;
        color: #333;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s ease, transform 0.1s ease;
    }

        .yearpick-actions button:hover {
            background: #e2e2e2;
        }

        .yearpick-actions button:active {
            transform: scale(0.98);
        }





.yearpick-selector {
    width: 100%;
    margin-top: 10px;
}

    .yearpick-selector select {
        width: 100%;
        box-sizing: border-box;
        padding: 13px 42px 13px 14px;
        border: 1px solid #d6d6d6;
        border-radius: 10px;
        background-color: #fafafa;
        color: #222;
        font-size: 16px;
        font-weight: 500;
        cursor: pointer;
        outline: none;
        transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
        /* Remove the browser's default arrow */
        appearance: none;
        /* Simple custom arrow */
        background-image: linear-gradient(45deg, transparent 50%, #555 50%), linear-gradient(135deg, #555 50%, transparent 50%);
        background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px;
        background-size: 5px 5px;
        background-repeat: no-repeat;
    }

        .yearpick-selector select:hover {
            background-color: #fff;
            border-color: #bbb;
        }

        .yearpick-selector select:focus {
            background-color: #fff;
            border-color: #777;
            box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.07);
        }


.participate-cancel {
    margin-top: 12px;
}

    .participate-cancel button {
        width: 100%;
        padding: 13px 20px;
        border: none;
        border-radius: 10px;
        background: #eeeeee;
        color: #333;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s ease, transform 0.1s ease;
    }

        .participate-cancel button:hover {
            background: #e2e2e2;
        }

        .participate-cancel button:active {
            transform: scale(0.98);
        }















.date-picker-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.date-picker-modal {
    background: #111;
    color: #fff;
    border-radius: 8px;
    padding: 20px;
    width: 280px;
    max-width: 90vw;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

    .date-picker-modal p {
        margin: 0 0 16px 0;
        font-size: 0.95rem;
    }

    .date-picker-modal select {
        width: 100%;
        padding: 8px;
        margin-bottom: 16px;
        background: #222;
        color: #fff;
        border: 1px solid #444;
        border-radius: 4px;
    }

.date-picker-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

    .date-picker-actions button {
        flex: 1;
        padding: 8px;
        border: none;
        border-radius: 4px;
        background: #333;
        color: #fff;
        cursor: pointer;
    }

        .date-picker-actions button:hover {
            background: #444;
        }










.region-filter {
    padding: 10px 16px;
    color: #fff;
}

.region-label {
    display: block;
    color: #fff;
    opacity: 0.7;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.region-select-wrap {
    position: relative;
}

    /* custom arrow */
    .region-select-wrap::after {
        content: "";
        position: absolute;
        right: 14px;
        top: 50%;
        width: 8px;
        height: 8px;
        border-right: 2px solid #c9c9c9;
        border-bottom: 2px solid #c9c9c9;
        transform: translateY(-70%) rotate(45deg);
        pointer-events: none;
    }

.region-select {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    padding: 11px 38px 11px 14px;
    font-size: 16px; /* 16px stops iOS from zooming in on focus */
    color: #fff;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 10px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .region-select:hover {
        border-color: #777;
    }

    .region-select:focus {
        border-color: #b00020; /* change to your accent colour */
        box-shadow: 0 0 0 3px rgba(176, 0, 32, 0.25);
    }

    .region-select option {
        background: #2a2a2a;
        color: #fff;
    }