:root {
    --primary-color: #03a842;
    --dark-overlay: rgba(0, 0, 0, 0.3);
    --hover-overlay: rgba(0, 0, 0, 0.5);
    --text-light: #ffffff;
    --text-dark: #333333;
    --base-font-size: 1rem;
    --content-width: 56.25rem;
}

html, body {
    height: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
    font-family: 'Open Sans', sans-serif;
    overscroll-behavior-y: none;
}

@keyframes simple-blink {
    0%, 100% { color: #ffffff; } 
    60% { color: #aaaaaa; } 
}

.chat-box.forum-box {
    overflow: hidden !important;
}

#forumIframe {
    overflow: hidden !important;
}
    
.simple-blink {
    animation: simple-blink 1s infinite;
}

@keyframes nos-blink {
    0%, 100% { 
        opacity: 1;
    } 
    50% { 
        opacity: 0.5;
    } 
}

.nos-special.simple-blink {
    animation: nos-blink 1s infinite !important;
    text-shadow: 
        0 0 0.0625rem #ff0000,
        0 0 0.0625rem #ff0000,
        0 0 0.0625rem #ff0000;
}

.page:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    opacity: 0.4;
}

.page {
    position: relative;
    display: table;
    table-layout: fixed;
    width: 100%;
    height: 100%;
    line-height: normal;
    text-align: center;
    font-size: 1.1em;
    color: var(--text-light);
    background-color: #ffffff;
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.nav-button, .right-button {
    background: rgba(90, 89, 89, 0.459);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    border-right: 0.125rem solid var(--primary-color);
    font-family: 'Open Sans', sans-serif;
    text-align: center;
    padding: 0.5625rem 1.1875rem; 
    font-size: 1rem;
    border-radius: 0.1875rem;        
    border-bottom: 0.125rem solid var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-button {
    border-left: 0.125rem solid var(--primary-color);
    border-right: none;
}

.nav-button:hover, .right-button:hover {
    background: var(--hover-overlay);
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.2);
}

.native-special {
    color: #d3f801 !important;
}

.non-knap-streg {
    display: inline-block;
     width: 6.25rem;
    height: 0;
    border-top: 0.125rem solid #970177;
    border-bottom: 0.0625rem solid #03a842;
    margin: 0 auto;
    vertical-align: center;
}

.nos-special {
    color: #ff0000 !important;
}

.nos-knap-streg {
    display: inline-block;
     width: 6.25rem;
    height: 0;
    border-top: 0.125rem solid #03a842;
    border-bottom: 0.0625rem solid red;
    margin: 0 auto;
    vertical-align: center;
}

.privat-knap-streg {
    display: inline-block;
     width: 6.25rem;
    height: 0;
    border-top: 0.0625rem solid red;
    border-bottom: 0.125rem solid #03a842;
    margin: 0 auto;
    vertical-align: center;
}

.content {
    /* max-width: 56.25rem; */
    width: var(--content-width) !important;  /* Din udregnede værdi */
    margin: 0 auto !important;
    font-size: var(--base-font-size) !important;
    padding: 
        var(--vertical-padding) 
        var(--horizontal-padding) !important;
}

.container {
    position: relative;
    display: table-cell;
    width: 100%;
    vertical-align: middle;
    padding: 1em 2em;
    z-index: 1;
}

.valg-container {
    background: rgba(255, 255, 255, 0.95);
    border: 0.125rem solid var(--primary-color);
    border-radius: 0.5rem;
    margin: 0 auto; 
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 0rem;
    width: calc(50% + 2.1875rem);
    max-width: auto;
    min-height: 25rem;
    box-sizing: border-box;
    position: absolute;
    top: 50%;
    left: 51%;
    transform: translate(-50%, -50%); 
    z-index: 1000;
    text-align: center;
    font-family: 'Open Sans', sans-serif;
    font-size: 1.1em; 
    line-height: 1.3;
    padding: 1.25rem 1.5625rem;
}

.valg-container p {
    margin-bottom: 0.625rem;
}

.valg-container strong {
    display: block;
    margin-bottom: 0.625rem;
    color: black;
    font-size: 1.1em;
}

.valg-container .valg-option {
    margin: 0.25rem 0;
    padding: 0.5rem;
    background: rgba(240, 240, 240, 0.9);
    border: 0.0625rem solid #ffffff;
    border-radius: 0.25rem;
    display: flex; 
    align-items: flex-start;
    text-align: left;
}

.valg-container .valg-option label {
    font-style: bold;
    font-size: 0.95em;
    color: black;
    margin-left: 0.625rem;
    display: block;
    text-align: left;
}

.valg-container .valg-option label em {
    font-style: italic;
    color: black;
    font-size: 0.9em;
    display: block;
    margin-top: 0.3125rem;
    text-align: left;
}

.valg-container .gem-knap {
    margin-top: 0.9375rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    transition: all 0.3s ease;
    margin-bottom: 0;
    font-size: 1em;
    padding: 0.5rem 1rem;
}

.valg-container .gem-knap:hover {
    background: #028a35;
    transform: translateY(-0.125rem);
}

.valg-option.disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
}

.valg-option.disabled label {
    cursor: not-allowed !important;
}

input[name="haandtering"]:disabled + label {
    cursor: not-allowed !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(0.625rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message-button, .chat-box {
    position: absolute;
    right: 1.25rem;
    z-index: 10;
    overflow: hidden;
}

.chat-box {
    top: 1.25rem !important;  
    left: 1.25rem !important;
    bottom: 1.25rem !important;
    width: calc(100% - 2.5rem) !important;
    height: calc(100% - 2.5rem) !important;
    background: white;
    border-radius: 0.625rem;
    box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.15);
}

.reading-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: 80vh;
    overflow-y: auto;
    transition: max-width 0.3s ease-in-out;
    z-index: 6;
    background: white;
    border-radius: 0.625rem;
    box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    width: min(80vw, 56.25rem); 
    min-width: 18.75rem;
    height: 60vh;
    color: var(--text-dark);
    padding: 1.5625rem;
    backdrop-filter: blur(0.625rem);
    border: 0.0625rem solid rgba(255,255,255,0.2);
    margin: 0 1.25rem; 

}

.reading-box-content {
    padding: 1.5625rem;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.6;
    font-size: 1.1em;
}

.extra-button {
    padding: 0.5625rem 1.1875rem;
    background: rgba(90, 89, 89, 0.459);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    border-bottom: 0.125rem solid var(--primary-color);
    border-right: 0.125rem solid var(--primary-color);
    border-left: 0.125rem solid var(--primary-color);
    border-radius: 0.1875rem;        
    font-family: 'Open Sans', sans-serif;
    font-size: 1em;
    min-width: 6.25rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.extra-button:hover {
    background: var(--hover-overlay);
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.2);
}

.extra-button.active {
    background: linear-gradient(135deg, rgba(90, 89, 89, 0.459), rgba(90, 89, 89, 0.459)) !important;
    font-weight: bold;
    box-shadow: 0 0.25rem 0.75rem rgba(61, 255, 43, 0.3) !important;
}

.extra-connector {
    background: repeating-linear-gradient(
        to top,
        #03a842,
        #03a842 0.1875rem,
        transparent 0.1875rem,
        transparent 0.375rem
    );
    pointer-events: none;
    width: 0.1875rem !important;
}

.extra-level-vertical {
    background: repeating-linear-gradient(
        to bottom,
        var(--primary-color),
        var(--primary-color) 0.1875rem,
        transparent 0.1875rem,
        transparent 0.375rem
    );
    pointer-events: none;
    width: 0.125rem !important;
}

.extra-level-horizontal {
    background: repeating-linear-gradient(
        to right,
        var(--primary-color),
        var(--primary-color) 0.1875rem,
        transparent 0.1875rem,
        transparent 0.375rem
    );
    pointer-events: none;
    height: 0.125rem !important;
}

.left-extra-connector {
    border-top: 0.125rem dashed var(--primary-color);
    background-color: transparent;
}

.left-extra-level-vertical {
    border-left: 0.125rem dashed var(--primary-color);
    background-color: transparent;
    width: 0.125rem;
}

.left-extra-level-horizontal {
    border-top: 0.125rem dashed var(--primary-color);
    background-color: transparent;
    height: 0.125rem;
}

.left-dot-marker {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
    pointer-events: none;
}

.rotation-controls {
    right: -1.875rem;
    top: 30%;
    transform: translateY(-50%);
    display: flex;
    gap: 0.3125rem;
}

.extra-connector, .extra-level-vertical, .extra-level-horizontal,
.left-extra-connector, .left-extra-level-vertical,
.left-extra-level-horizontal, .left-dot-marker, .rotation-controls { 
    z-index: 5;
    position: absolute;
}

.nav-buttons {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.right-buttons {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.connector-line, .right-connector {
    position: absolute;
    height: 0;
    border-top: 0.125rem dashed var(--primary-color);
    z-index: 999;
    pointer-events: none;
}

.nav-button#native,
.nav-button#privat {
  flex-shrink: 0;
  position: relative;
}

.extra-buttons {
    position: absolute;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.9375rem;
    background: transparent !important;
    border-radius: 0.1875rem;
    box-shadow: none !important; 
    border: none !important; 
    animation: fadeInUp 0.3s ease;
}

.left-extra-buttons {
    position: absolute;
    display: flex;
    flex-direction: row;
    gap: 0.625rem;
    padding: 0.9375rem;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    align-items: center;
    justify-content: center;
}

.nav-button#native, .nav-button#privat,
.extra-buttons, .left-extra-buttons { 
    z-index: 4;
}

.left-extra-button {
    padding: 0.5625rem 1.1875rem;
    background: rgba(90, 89, 89, 0.459);
    color: #ffffff;
    border: none;
    border-bottom: 0.125rem solid var(--primary-color);
    border-right: 0.125rem solid var(--primary-color);
    border-left: 0.125rem solid var(--primary-color);
    border-radius: 0.1875rem;        
    font-family: 'Open Sans', sans-serif;
    font-size: 1em;
    min-width: 6.25rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.left-extra-button:hover {
    background: var(--hover-overlay);
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.2);
}

.left-extra-button.active {
    background: linear-gradient(135deg, rgba(90, 89, 89, 0.459), rgba(90, 89, 89, 0.459)) !important;
    font-weight: bold;
    box-shadow: 0 0.25rem 0.75rem rgba(61, 255, 43, 0.3) !important;
    color: #ffffff;
}

.reading-box img {
    border-radius: 0.3125rem;
}

.copyright a:hover {
    color: var(--text-light);
}

.language-toggle img:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0.5rem rgba(3, 168, 66, 0.4);
}

.reading-box-sort {
    background: black !important;
    color: #ffffff; 
}

.reading-box-hvid {
    background: rgba(255, 255, 255, 0.95); 
    color: black !important;
}

.chat-message-button {
    top: 50%;
    transform: translateY(-50%);
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #03a842, #028a35);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    border-radius: 3.125rem;
    font-family: 'Open Sans', sans-serif;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    box-shadow: 0 0.25rem 0.9375rem rgba(3, 168, 66, 0.4);
    min-width: 6.25rem;
    animation: pulse-glow 2s infinite;
}

.welcome-box {
    top: 1.5625rem;
    left: 0rem;
    display: inline-block;
    background: none;
    border: none;
    padding: 0;
    font-weight: bold;
    font-size: 1.125rem;
    min-width: 21.875rem;
    min-height: 3.125rem;
}

.welcome-box::after {
    content: attr(data-text);
    text-align: center;
    width: 100%;
    font-size: 1.125rem;
    color: #ffffff;
}

.welcome-box::after, #ai-disclaimer,
.last-updated, .update-date, .copyright,
.copyright a {
    text-shadow: 
        0.0625rem 0.0625rem 0 black,
        -0.0625rem -0.0625rem 0 black,
        0.0625rem -0.0625rem 0 black,
        -0.0625rem 0.0625rem 0 black,
        0 0.0625rem 0 black,
        0.0625rem 0 0 black,
        0 -0.0625rem 0 black,
        -0.0625rem 0 0 black;
}

#ai-disclaimer {
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    right: 0;
    width: fit-content;
    max-width: 80%;
    text-align: center;
    font-size: 1.4rem;
    display: none;
    background: transparent;
    color: white;
}

.last-updated, .update-date {
    color: #03a842;
    bottom: 0.8125rem;
    left: 0.8125rem;
}

.copyright {
    color: white; 
    bottom: 0.8125rem;
    right: 0.8125rem;
    transition: all 0.3s ease;
}

.last-updated, .copyright {
    font-size: 0.875rem;
}

.copyright a {
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s ease;
    right: 0.8125rem;
}

.language-toggle img {
    border: 0.0625rem solid #03a842;
    width: 1.5625rem;
    right: 0.3125rem;
    height: 0.9375rem;
    border-radius: 0.1875rem;
    transition: all 0.3s ease;
}

.language-toggle {
    top: 0.9375rem;
    right: 0.3125rem;
    cursor: pointer;
}

.language-toggle, .language-toggle img, .copyright a,
.last-updated, .update-date, #ai-disclaimer, .copyright,
.welcome-box::after, .welcome-box {
    z-index: 2; 
    position: absolute;
}

.tooltip-word:hover {
    background-color: rgba(3, 168, 66, 0.1);
    color: var(--primary-color);
    border-bottom: 0.125rem solid var(--primary-color);
}

.tooltip-container.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 10000;
}

.tooltip-container::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0.9375rem;
    width: 0;
    height: 0;
    border-left: 0.5rem solid transparent;
    border-right: 0.5rem solid transparent;
    border-top: 0.5rem solid var(--primary-color);
}

.tooltip-word {
    position: relative;
    cursor: help;
    border-bottom: 0.0625rem dotted var(--primary-color);
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.tooltip-container {
    position: absolute;
    z-index: 10000;
    background: white;
    border: 0.125rem solid var(--primary-color);
    border-radius: 0.375rem;
    padding: 0.75rem;
    max-width: 18.75rem;
    box-shadow: 0 0.3125rem 0.9375rem rgba(0,0,0,0.2);
    font-size: 0.9em;
    line-height: 1.4;
    color: black;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    font-family: 'Open Sans', sans-serif;
    pointer-events: none;
}

.chat-message-button.has-new {
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    animation: pulse-glow-red 1.5s infinite;
}

.chat-message-button:hover {
    background: linear-gradient(135deg, #04c44d, #039f3f);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 0.375rem 1.25rem rgba(3, 168, 66, 0.6);
}

.chat-message-button:active {
    transform: translateY(-50%) scale(0.95);
}

.half-circle-btn.proxy {
    box-shadow: 0 0.25rem 0.9375rem 0.3125rem rgba(250, 0, 0, 0.7);
}

.half-circle-btn {
    position: absolute;
    top: 0rem;
    left: 50%;
    transform: translateX(-80%);
    width: 4.375rem;
    height: 1.125rem;
    background: rgba(116, 114, 114, 0.411); 
    color: rgb(255, 251, 0);
    border: none;
    border-radius: 0 0 1.25rem 1.25rem;
    cursor: pointer;
    z-index: 1000;
    font-size: 0.8125rem;
    font-style: italic;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.half-circle-btn[style*="display: none"] {
    display: none !important;
    position: fixed !important;
    top: -6.25rem !important;
    left: -6.25rem !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.half-circle-btn.normal {
    animation: pulse-glow-normal 0.7s infinite;
}

@keyframes pulse-glow-normal {
    10%, 100% {
        box-shadow: 0rem 40x -1.5625rem rgba(84, 85, 85, 0.4); 
    }
    90% {
        box-shadow: 0 0.25rem 1.5625rem rgba(18, 209, 1, 0.8);
    }
}

.half-circle-btn.alert {
    animation: pulse-glow-alert 0.4s infinite;
}

@keyframes pulse-glow-alert {
    0%, 100% {
        box-shadow: 0 0.25rem 0.9375rem rgba(255, 107, 107, 0.4);
    }
    50% {
        box-shadow: 0 0.25rem 1.5625rem rgba(255, 107, 107, 0.8);
    }
}

.half-circle-btn.besked {
    animation: pulse-glow-besked 0.4s infinite;
}

@keyframes pulse-glow-besked {
    30%, 100% { box-shadow: 0 0.25rem 0.9375rem rgba(255, 255, 0, 0.4); }
    70% { box-shadow: 0 0.25rem 1.5625rem rgba(255, 255, 0, 0.8); }
}

#chat-message-box {
    width: 37.5rem !important;
    max-width: 90vw !important;
    height: 37.5rem !important;
    max-height: 80vh !important;
}

#chat-messages {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f0f0f0;
}

#chat-messages::-webkit-scrollbar {
    width: 0.375rem;
}

#chat-messages::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 0.1875rem;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 0.1875rem;
}

#chat-input:focus {
    outline: none;
    border-color: #028a35 !important;
    box-shadow: 0 0 0 0.125rem rgba(3, 168, 66, 0.2);
}

.rotating-buttons-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

.nav-button.rotating-hidden {
  display: none !important;
}

.nav-button.rotating-visible {
  display: flex !important;
  position: relative;
}

.rotation-up, .rotation-down {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}

.rotation-up:hover, .rotation-down:hover {
  opacity: 1;
}

.rot-pi button {
    width: 0.9375rem;
    left: calc(var(--knap-bredde) + -1rem);
    height: 2.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3125rem;
    font-weight: bold;
}