@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family:"Raleway", 'Helvetica Neue', Helvetica, Arial, sans-serif;
    min-height: 100vh;
}

body {
    line-height: 1.5;
    font-family: "Raleway", sans-serif;
    margin: 0;
    padding: 0;
}

body * {
    font-family: "Raleway", 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;
}

/* AutoWebText component styling */
.auto-web-text {
    min-height: 1.5rem;
    padding: 0.25rem 0;
    border: 1px dashed transparent;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.auto-web-text:hover {
    border-color: #ccc;
    background-color: rgba(0, 0, 0, 0.02);
    cursor: pointer;
}

/* Optimize initial page render to prevent flashing */
.transparent-appbar {
    opacity: 1; /* Make sure it's visible by default */
    transition: opacity 0.5s ease-in-out;
    animation: fadeInAppbar 1s ease-in-out forwards;
}

@keyframes fadeInAppbar {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Ensure menu items load together - this fixes the Log ind button appearing before other menu items */
.transparent-appbar .mud-button {
    opacity: 1; /* Make buttons visible by default */
    transition: opacity 0.3s ease-in-out;
    /* Remove visibility: hidden to ensure buttons are always visible */
}

/* Add special class for coordinated appearance animation */
body.coordinated-buttons-animation .transparent-appbar .mud-button {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

body.coordinated-buttons-animation.buttons-ready .transparent-appbar .mud-button {
    opacity: 1;
    transition-delay: 50ms; /* Small delay to ensure they all appear together */
}

/* Fix for AppBar on homepage */
.transparent-appbar {
    contain: layout; /* CSS containment for better performance */
}

.mud-nav-item{
    width: initial;


}
.mud-nav-link {
    transition: background-color 0.3s ease;
    border-radius: 10px;
    padding: 8px 16px;
    font-weight: 500;
    min-width: unset;
    text-transform: none;
    box-shadow: none;
}

/* Avoid layout shifts */
.transparent-appbar * {
    backface-visibility: hidden; /* Prevent flickering */
}

/* AppBar styling */
/* Default styles for non-homepage */
.transparent-appbar {
    background-color: rgba(255, 255, 255, 0.92) !important;
    color: black !important;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.transparent-appbar .mud-button {
    color: rgba(0, 0, 0, 0.7) !important;
}

/* Homepage styles when not scrolled */
.transparent-appbar.homepage:not(.scrolled) {
    background-color: transparent !important;
    color: white !important;
}

.transparent-appbar.homepage:not(.scrolled) .mud-button,
.transparent-appbar.homepage:not(.scrolled) a {
    color: white !important;
}

/* Homepage styles when scrolled */
.transparent-appbar.homepage.scrolled {
    background-color: rgba(255, 255, 255, 0.92) !important;
    color: black !important;
}

.transparent-appbar.homepage.scrolled .mud-button,
.transparent-appbar.homepage.scrolled a {
    color: rgba(0, 0, 0, 0.7) !important;
}

/* Mobile-specific styles - these have higher specificity to override any conflicts */
@media (max-width: 768px) {
    /* Homepage */
    .transparent-appbar.homepage:not(.scrolled) {
        background-color: transparent !important;
        color: white !important;
    }

    .transparent-appbar.homepage:not(.scrolled) .mud-button,
    .transparent-appbar.homepage:not(.scrolled) a,
    .transparent-appbar.homepage:not(.scrolled) .mud-icon-button {
        color: white !important;
    }

    /* Ensure menu button is white on transparent header */
    .mud-appbar.transparent-appbar.homepage:not(.scrolled) .mud-icon-button {
        color: white !important;
    }
}

.missing-text-info {
    padding: 0.5rem;
    border: 1px dashed #ced4da;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.03);
}

.missing-text-info code {
    font-size: 0.75rem;
    color: #6c757d;
    display: block;
    margin-top: 0.25rem;
}

.auto-web-text-editor {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #f8f9fa;
}

#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+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* Styling for text loading placeholders */
.text-loading-placeholder {
    display: inline-block;
    position: relative;
    color: transparent;
    background: #f0f0f0;
    border-radius: 3px;
    animation: loading-pulse 1.5s infinite;
    min-width: 50px;
    min-height: 1em;
}

@keyframes loading-pulse {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 0.6;
    }
}




/* Transparent card class for MudCard components */
.transparent-card {
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Full width image for MudCardMedia */
.full-width-image {
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
}

.full-height-card {
    height: 100% !important;
}

/* Portrait container and image styling */
.portrait-container {
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.portrait-image {
    max-height: 700px;
    max-width: 100%;
    width: auto;
    height: auto;
    border-radius: 4px;
    object-fit: contain;
}


.mud-button {
    border-radius: 10px; 
    padding: 8px 16px;   
    font-weight: 500;    
    min-width: unset;    
    text-transform: none;
    box-shadow: none;
}

/* Standard "inactive" knap */
.mud-button.outlined {
    background-color: white;
    color: black;
    border: none;
    box-shadow: none;
}

/* Aktiv knap (eksempel på blå farve) */
.mud-button.active {
    background-color: #4A7BA8; /* den blå du viser */
    color: white;
    border: none;
    box-shadow: none;
}