:root {
    --nav-color: #000;
    --nav-hover-color: black;
    --selected-color: #D33E43;
    --dt-row-hover: 200, 200, 200;
    --bulma-shadow: 0 0.5em 1em -0.125em hsla(221deg,14%,4%,0.1),0 0px 0 1px hsla(221deg,14%,4%,0.02)
}

body {
    margin: 0;
    padding: 0;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
}

/*********** MAIN-WRAPPER *************/
.main-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
}


@media screen and (max-width: 1023px) {
    .main-wrapper {
        display: flex;
        height: calc(100vh - var(--bulma-navbar-height));
        width: 100vw;
    }
}


/*********** MAIN-NAV *************/

/* this contains the main nav for desktop. here we set display hidden on touch. no changes needed here */
.main-nav-container {

}

/* The actual class for the nav bar element. */
/* Makes it actually stick to the side. */
.main-nav {
    background: var(--nav-color);
    color: #fff;
    width: 210px; /* Increased width of the sidebar */
    flex-shrink: 0;
    height: 100vh;
    transition: width 0.3s ease-in-out;
    position: fixed;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    overflow: hidden;
    align-content: center;
}

.main-nav.collapsed {
    width: calc(1rem + 1rem + 1.5em + 1em); /* Width margins 1rem + 1rem + fa-fw width + icon margin right */
}

.main-nav-content {
    display: flex;
    flex-direction: column;
}

.main-nav-padding {
    flex-grow: 1;
}


/*********** MAIN-NAV Username *************/
.main-nav-username {
    display: flex;
    align-items: center;
    transition: opacity 0.3s ease;
    margin-bottom: 2em; /* Space between username and menu items */
}

.main-nav-username.collapsed .main-nav-username-text {
    opacity: 0;
    transition: opacity 0.3s ease; /* Only text fades out, not the profile picture */
}

.profile-picture {
    width: 50px; /* Profile picture size */
    height: 50px;
    border-radius: 50%; /* Make the profile picture round */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px; /* Space between the profile picture and text */
    flex-shrink: 0; /* Prevent the profile picture from shrinking */
    transition: all 0.3s ease;
}

.main-nav-username.collapsed .profile-picture {
    width: 40px; /* Profile picture size */
    height: 40px;
}

.main-nav-username-text {
    display: flex;
    flex-direction: column; /* Stack the full name and username vertically */
    white-space: nowrap; /* Prevent text from wrapping */
}

/* Styling for full name */
.main-nav-username p {
    margin: 0; /* Remove default margin */
    font-size: 1em; /* Increase size of full name */
    font-weight: bold;
    white-space: nowrap; /* Prevent name from wrapping */
}

/* Styling for username */
.main-nav-username span {
    display: block; /* Ensure username is displayed on a new line */
    font-size: 1em; /* Adjust size for username */
    font-weight: normal;
    margin-top: 0.2em; /* Reduce space between full name and username */
    white-space: nowrap; /* Prevent username from wrapping */
}


/*********** MAIN-NAV menu-list *************/

/* Flex container for menu items */
/* Styling for each menu item */
.menu-list a {
    display: flex;
    align-items: center;
    padding: 0.5em;
    text-decoration: none;
    background-color: inherit;
    transition: background-color 0.2s;

    border: 1px solid rgba(0,0,0,0);
}

/* Icon and text */
.menu-list i {
    margin-right: 1em;
}

.menu-list a:hover {
    background: transparent;
    text-decoration: none;
}

.menu-list a.is-active {
    color: #4a4a4a;
    background: transparent;
    text-decoration: none;

    border: 1px solid;
    border-image-source: linear-gradient(to right, transparent, var(--selected-color), transparent);
    border-image-slice: 1;
}

.menu-list a.is-active .is-symbol {
    color: var(--selected-color);
}
.menu-list a:hover {
    color: var(--selected-color);

    border: 1px solid;
    border-image-source: linear-gradient(to right, transparent, var(--selected-color), transparent);
    border-image-slice: 1;
}

.menu-list li {
    padding-bottom: 0.2rem;
}


.main-nav .menu-list span {
    transition: opacity 0.3s;
    white-space: nowrap;
}

/* Hide text in collapsed state */
.main-nav.collapsed .menu-list span {
    white-space: nowrap;
    opacity: 0;
    overflow: hidden;
}

.menu-label {
    color: inherit;
    transition: opacity 0.3s, width 0.3s;
}

.main-nav .menu-label.collapsed {
    width: 0;
    opacity: 0;
}

/* Toggle button */
.toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 1.5em;
    margin-bottom: 1em;
}

/* Adjust logo for collapsed state */
.main-nav-header .logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1em;
}

.main-nav-header .logo i {
    font-size: 1.5em;
}

.is-dark a {
    color: #f8f9fa;
}

.is-dark .menu-list a:hover {
    color: #f8f9fa;
    background-color: var(--nav-hover-color);
}

.is-dark .menu-list .is-active {
    color: #f8f9fa;
    background-color: var(--nav-hover-color);
}

a .is-symbol {
    margin-right: 10px;
}

/***** content wrapper ******/
.main-content-wrapper {
    flex-direction: row;
    flex-grow: 1;
    display: flex;
    margin-left: 210px;
    transition: margin-left 0.3s, width 0.3s ease-in-out;
    width: calc(100vw - 256px - 256px);
}

@media screen and (max-width: 1023px) {
    .main-content-wrapper {
        flex-direction: row;
        flex-grow: 1;
        margin-left: 0;
        display: flex;
        transition: margin-left 0.3s, width 0.3s ease-in-out;
        width: calc(100vw);
    }
}

.main-content-wrapper.collapsed {
    margin-left: 60px;
    width: calc(100vw - 256px);

}

/***** subnav ******/
.subnav-container {
    padding: 30px 20px;
    flex-shrink: 0;
    flex-basis: 150px; /* again, explicit width to have the browser do all the heavy lifting */
}

.subnav {
    position: fixed;
}

.subnav a {
    font-size: 0.95rem;
}

.subnav a .is-symbol {
    margin-right: 7px;
    font-size: 1.1rem;
}

.subnav .menu-list a {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: background-color 0.2s;
    padding: 0.5em 20px 0.5em 0.5em;
}

/* Icon and text */
.subnav.menu-list i {
    margin-right: 1em;
}

.subnav.menu-list a:hover {
    background: transparent;
    border-color: rgba(0, 0, 0, .125);
    text-decoration: none;
}

.subnav.menu-list a.is-active {
    color: #4a4a4a;
    background: transparent;
    border-color: rgba(0, 0, 0, .125);
    text-decoration: none;
}

.subnav.menu-list a.is-active .is-symbol {
    color: var(--selected-color);
}

.main-content.has-subnav {
    width: calc(100% - 450px);
    margin-left: 450px;
}

.subnav .menu-label {
    color: inherit;
}

/***** content *******/
.main-content {
    padding: 30px 60px 20px 20px;
    flex: 1;
    overflow: auto;
    /* max-width: 79vw; /* FIXME: workaround max-width on Kundentabelle */
}

@media only screen and (max-width: 768px) {
    .main-content {
        padding: 20px;
        max-width: 100vw;
    }
}

.content-column {
    padding: 10px 30px;
}

.content-title {
    font-size: 1.5rem;
}

.content-card {
    background: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, .125);
    border-radius: .25rem;
    padding: 20px;
    margin-bottom: 20px;
}

.columns.in-form {
    margin-bottom: 0;
}

.switch-table {
    margin-top: 20px;
}

.switch-table tr {
    padding-bottom: 20px;
}

.switch-table td {
    padding: 10px 20px;
    font-size: 1.1rem;
}

.cell {
    display: grid;
    height: 100%;
}

/* Fixing Datatables */

.dataTables_wrapper {
    clear: none;
}

.dataTables_wrapper .dataTables_info {
    clear: none;
}

table.dataTable {
    clear: none;
}

/* Dialog */
.red-submit {
    background: #f14668 !important;
}

.small-chart {
    height: 60px;
    margin-bottom: 10px;
}

.nyi a {
    color: rgba(0, 0, 0, 0.5);
    pointer-events: none;
    position: relative;
}

.nyi a:after {
    content: "NYI";
    font-size: 65%;
    color: rgba(255, 100, 100, 0.5);
    position: absolute;
    right: 5px;
    top: 5px;
}

.nyi a:hover {
    cursor: no-drop;
}

.nyi ul {
    border-left: 1px solid rgba(0, 0, 0, 0.5) !important;
}

.dep a:after {
    content: "DEP";
}

.new-tag a {
    position: relative;
}

.new-tag a:after {
    content: "NEU";
    font-size: 65%;
    color: rgba(100, 255, 100, 0.5);
    position: absolute;
    right: 5px;
    top: 5px;
}

.exp-tag a {
    position: relative;
}

.exp-tag a:after {
    content: "EXP";
    font-size: 65%;
    color: orange;
    position: absolute;
    right: 5px;
    top: 5px;
}

.menu-list .nyi.is-white a {
    color: rgba(255, 255, 255, 0.3);
}

/* Datatable */
table.dataTable thead .sorting, table.dataTable thead .sorting_desc, table.dataTable thead .sorting_asc {
    background-image: none !important;
}

.disable_link {
    color: rgba(0, 0, 0, 0.5) !important;
    pointer-events: none;
    cursor: no-drop;
}

table.dataTable.is-striped > tbody > tr.selected > *,
table.dataTable.is-striped > tbody > tr.odd.selected > *,
table.dataTable.is-striped > tbody > tr.selected:hover > * {
    box-shadow: inset 0 0 0 9999px var(--selected-color);
}

table.dataTable > tbody > tr.selected a {
    color: #485fc7;;
}

.table tr.is-disabled {
    background: repeating-linear-gradient(
            -45deg,
            #fff,
            #fff 10px,
            rgba(255, 143, 41, 0.3) 10px,
            rgba(255, 143, 41, 0.3) 20px
    );
    color: #555555;
}

.table tr.is-disabled.is-selected {
    background: repeating-linear-gradient(
            -45deg,
            rgba(255, 143, 41, 0.8),
            rgba(255, 143, 41, 0.8) 10px,
            rgba(255, 143, 41, 1) 10px,
            rgba(255, 143, 41, 1) 20px
    );
    color: #fff;
}

th {
    padding-left: 10px !important;
}

.jBox-Confirm-button-submit {
    border-bottom-right-radius: 4px;
    background: var(--selected-color) !important;
    color: #fff;
}

/* button styling */
.manage_button:hover {
    background: rgba(0, 0, 0, 0.2) !important;
}

.new_button:hover {
    background: rgba(100, 255, 100, 0.2) !important;
}

.edit_button:hover {
    background: rgba(255, 255, 0, 0.1) !important;
}

.disable_button:hover {
    background: rgba(255, 0, 0, 0.2) !important;
}

.enable_button:hover {
    background: rgba(100, 255, 100, 0.2) !important;
}

.delete_button:hover {
    background: #D33E43 !important;
    color: #fff !important;
}

.show_changelog:before {
    content: "" !important; /* workaround for icon bug */
}

/* Flexbox styles to center content */
.bg-img {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    /*background-image: url("https://picsum.photos/1920/1080/?blur");*/
    /*background-image: url("https://loremflickr.com/3840/2160/norway,fjord/all");*/
    background-color: #000;
    background-size: cover;
    background-position: center;
}

#loginForm {
    margin: 20px !important;
    text-align: center;
    max-width: 25em;
}

.logo img {
    max-width: 85%;
    height: auto;
}

.has-black-background-custom {
    background: #000;
    color: #fff;
    border: 1px solid;
    border-image-source: linear-gradient(to right, black, white, black);
    border-image-slice: 1;
}
.has-black-background-custom-2 {
    background: #000;
    color: #fff;
    border: 1px solid;
    border-image-source: linear-gradient(to right, black, black);
    border-image-slice: 1;
}

.has-black-background-custom::placeholder {
    color: #434343;
}

.has-black-background-custom-2::placeholder {
    color: #434343;
}

.white-link {
    color: white;
    text-decoration: underline;
}

pre {
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-left: 3px solid #f36d33;
    color: #666;
    page-break-inside: avoid;
    font-family: monospace;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 1.6em;
    max-width: 100%;
    overflow: auto;
    padding: 1em 1.5em;
    display: block;
    word-wrap: break-word;
}

.auto-break-container {
    padding: 10px; /* Optional: Adds some padding */
    word-wrap: break-word; /* Break long words onto the next line */
    overflow-wrap: break-word; /* Ensures that words break at appropriate points */
    white-space: normal; /* Allows normal wrapping */
}

.navbar {
    background-color: var(--nav-color);
}

.navbar-brand a {
    color: white;
}

.dashtable td {
    padding-bottom: 1em;
}

/* Disable transitions when .no-transitions is applied to body */
.no-transitions * {
    transition: none !important;
}

.dt-profile-image {
    width: 65px;
    border-radius: 100%;
    display: block;
}

/* helping bulma doing the right thing :) */
.is-vcentered tr td {
    vertical-align: middle;
}


/* MOBIL */
@media only screen and (max-width: 768px) {
    .main-wrapper {
        min-height: calc(100vh - 3.25rem);
    }

    .main-content {
        height: calc(100vh - 3.25rem - 60px);
        margin-bottom: 60px;

    }

    .main-content-wrapper.collapsed {
        margin-left: 0;
    }
}

@media only screen and (max-width: 768px) {
    .main-content {
        padding: 20px;
        max-width: 100vw;
    }
}


/* Mobile action buttons */
footer {
    position: fixed;
    bottom: 0;
    height: 60px;
    width: 100vw;
    display: inline;
    text-align: center;
    padding-top: 10px;
}

footer ul {
    display: inline;
}

footer ul li {
    display: inline;
    text-align: center;
}

footer ul.menu-list a {
    width: auto;
    display: inline-block !important;
    box-shadow: 0px 0px 1px black;

    border-radius: 0.25rem;
}

footer a > i {
    margin: 0 !important;
}

.navbar-menu {
    position: absolute;
    width: 100vw;
    background-color: var(--nav-color);
}

.navbar-divider {
    display: block;
    background: rgba(1, 22, 30, 0.1)
}

a.navbar-item {
    color: white;
}

a.navbar-item:hover, a.navbar-item:active, a.navbar-item:focus {
    background: var(--selected-color);
}

a.navbar-item.is-active {
    background-color: var(--nav-hover-color);
}

a.navbar-item.is-active i {
    color: var(--selected-color);
}

.text-container {
    white-space: normal;
}