
html {
    background-color: black;
    color: orange;
    font-family: Arial, Helvetica, sans-serif;
}

.error, .danger {
    color: red;
}

.messages {
    list-style-type: none;
    padding: 0;
}

.flash {
    position: relative;
    padding: 10px 35px 10px 15px;
    color: orange;
    background-color: #2a2a2a;
    border: 1px solid orange;
    border-radius: 6px;
    padding: 3px;
    transition: opacity 0.5s ease;
}

/* The cross */
.flash::after {
    content: "×";                 /* the multiply symbol */
    position: absolute;
    right: 10px;                  /* distance from the right edge */
    top: 50%;
    transform: translateY(-50%);  /* vertical centering */
    font-size: 20px;
    cursor: pointer;
    opacity: 0.6;
}

.flash::after:hover {
    opacity: 1;
}

.flash.hide {
    opacity: 0;
}

.flash.success {
    color: greenyellow;
    border-color:  greenyellow;
}

.flash.danger {
    color: red;
    border-color:  red;
}

hr {
    border-top: 2px solid orange;
}

strong,
a,
a:visited {
    color: yellow;
    font-weight: bold;
}

p.block {
    text-align: justify;
}

section.hidden {
    display: none;
}

.site-header {
    display:                 flex;
    justify-content:         space-between;
    align-items:             center;
    padding:                 1rem 0;
    border:                  1px solid  orange;
    border-radius:  8px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 60px;
    width: auto;
}

.title-block {
    display: flex;
    flex-direction: column;
}

.title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.subtitle {
    margin: 0;
    font-size: 1rem;
    color: yellow;
}

/* --- Navigation --- */
#menu-toggle, 
.menu-button-container {
    display: none;
}

.nav > ul {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav a {
    text-decoration:  none;
    color:            orange;
    background-color: #2a2a2a;
    font-weight:      500;
    padding:          4px 1em;
}

.nav a:hover {
    color: black;
    background-color: orange;
}

.nav a.danger {
    color: red;
}

/* Language Selection for index page */
/* Hide the radio buttons */
input[type="radio"].lang-button {
    display: none;
}

/* Style the flag labels */
.flag {
    cursor: pointer;
    font-size: 1.8rem;
    margin-right: 0.5rem;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.flag:hover {
    opacity: 0.8;
}

/* Highlight active flag */
#lang-en:checked ~ .flag-en,
#lang-de:checked ~ .flag-de {
    opacity: 1;
}

/* Hide all languages by default */
.lang {
    display: none;
}

/* Show the selected language */
#lang-en:checked ~ .lang-en {
    display: block;
}

#lang-de:checked ~ .lang-de {
    display: block;
}


/* --- User Dropdown --- */
.user-menu {
    position: relative;
    margin-right: 0.5rem;
}

.user-btn {
    background: #2a2a2a;
    color: orange;
    border: none;
    font-weight: 500;
    font-size: 100%;
    padding: 4px 1em;
    cursor: pointer;
}

.user-btn:hover {
    color: black;
    background-color: orange;
}

.dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 2.2rem;
    background: #2a2a2a;
    border: 1px solid orange;
    border-radius: 6px;
    list-style: none;
    padding: 0.5rem 0;
    min-width: 150px;
}

.dropdown li a {
    display: block;
    padding: 0.5rem 1rem;
    color:   orange;
}

.dropdown li a:hover {
    background: orange;
    color: #2a2a2a;
}

/* Show dropdown when parent has .open */
.user-menu.open .dropdown {
    display: block;
}

/* --- Hamburger (hidden on desktop) --- */
.hamburger {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
}

a.extern {
    color: orange;
}

a.extern:visited {
    color: yellow;
}


/* Input Forms */
form {
    width: fit-content;
    margin: 5px auto;
    padding: 10px;
    border: 2px solid orange;
    border-radius: 8px;
}

form.microform {
    display: inline;
    border: 0;
    margin: 0 1.5rem;
    padding: 0;
}

form p.buttonrow {
    display: flex;
    justify-content: center;
}

input[type="text"],
input[type="password"],
select {
    /*appearance: none; */
    background-color: #2a2a2a;
    color: orange;
    border: none;
    padding: 3px;
    font-size: 100%;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border: none;
}

input[type="range"] {
    accent-color: orange;
}

input[type="submit"] {
    background-color: orange;
    margin: 0 5px;
    padding: 5px;
    border-top: 2px solid orange;
    border-left: 2px solid orange;
    border-bottom: 2px solid #FED8B1;
    border-right: 2px solid #FED8B1;
    border-radius: 8px;
}


input[type="submit"]:active {
    border-top: 2px solid #111111;
    border-left: 2px solid #111111;
    border-bottom: 2px solid orange;
    border-right: 2px solid orange;
    padding: 6px 4px 4px 6px;
}

.container {
    display: flex;
    flex-direction: row;      /* Desktop: columns */
    gap: 1rem;
}

/* Language switch section */
.lang-switch {
    display: flex;
    flex-direction: column;   /* Desktop: vertical flags */
    gap: 0.5rem;
}

/* Flag styling */
.flag {
    cursor: pointer;
    font-size: 2rem;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.flag:hover {
    opacity: 0.8;
}

/* Highlight active flag */
#lang-en:checked ~ .lang-switch label[for="lang-en"],
#lang-de:checked ~ .lang-switch label[for="lang-de"] {
    opacity: 1;
}

ul.errors {
    list-style-type: none;
}

ul.errors li {
    color: red;
}

/* Settings */
.settings {
    display: flex;
    flex-flow: row;
    align-items:normal;
    justify-content: space-around;
    padding: 8px;
    border: 1px solid orange;
    border-radius: 8px;
}

.two-column {
    display: flex;
    flex-flow: row;
    justify-content: space-between;
}

main {
    border: 1px solid orange;
    border-radius: 8px;
    padding: 8px;
}

/* Table layout */

/* desktop table */
.responsive-table {
    width: 100%;
    border-collapse: collapse;
}

.responsive-table th,
.responsive-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid orange;
    text-align: center;
}

.responsive-table th {
    color: yellow;
}

.responsive-table tr:last-child td {
    border-bottom: none;
}

svg {
    width: auto;
    height: 70vh;
}
@media (max-width: 700px) {

    .menu-button-container {
        display: block;
        top: 0;
        right: 0;
    }

    .nav {
        display: none;
        position: absolute;
        top: 80px;
        right: 0;
        background: #2a2a2a;
        width: 200px;
        border: 1px solid orange;
        border-radius: 8px;
        padding: 1rem;
    }

    .nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .hamburger {
        display: block;
        color: orange;
        background: black;
    }

    .site-header {
        position: relative;
    }

    /* Show nav when .open is added */
       #menu-toggle:checked ~ .nav {
        display: block;
    }
  

    /* display table data as cards */
    .responsive-table thead {
        display: none;
    }

    .responsive-table tr {
        display: block;
        margin-bottom: 1rem;
        padding: 1rem;
        border: 1px solid orange;
        border-radius: 8px;
        background: #2a2a2a;
    }

    .responsive-table td {
        display: flex;
        justify-content: space-between;
        padding: 0.4rem 0;
        border: none;
    }

    .responsive-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: yellow;
        /*min-width: 20em;*/
    }

    .responsive-table td:empty {
        display: none;
    }

    /* Settings */
    .settings {
        display: flex;
        flex-flow: column;
        gap: 0.5rem;
        /* align-items: center; */
        justify-content: space-around;
        padding: 8px;
        border: 1px solid orange;
        border-radius: 8px;
    }

    svg {
        width: 100%;
        height: auto;
    }

    .container {
        flex-flow: column;
    }

    .lang-switch {
        flex-direction: row;      /* Mobile: horizontal flags */
        justify-content: center;
        order: 0;
    }

    .lang {
        order:2;
    }
    
    .example-image { order: 1; }

    .container img {
        width: 100%;
        height: auto;
    }
}