/**
 * Frontend CSS for Incon Arbeitsablaeufe
 */

/* General Navigation Styles */
.incon-sidebar-wrapper,
.incon-start-wrapper {
    margin: 20px 0;
    border: 5px solid var(--awb-color4);
    border-radius: 20px;
    background-color: #fff;
}

.incon-nav {
    padding: 25px;
}

.incon-nav h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 17px;
    padding-bottom: 10px;
    color: var(--awb-color1)!important;
    text-transform: uppercase!important;
    line-height: 20px!important;
    font-weight: 600!important;
}

/* Menu Items */
.incon-menu-item {
    margin-bottom: 13px;
}

.incon-menu-item > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: var(--awb-color4);
    color: #282828;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none !important;
    text-transform: uppercase;
    font-size: 15px;
    line-height: 18px;
}

.incon-menu-item > a:hover,
.incon-menu-item.active a {
    background-color: var(--awb-color4);
    color:var(--awb-color1);
}

.incon-menu-item > a span {
    flex: 1;
}

.incon-menu-item > a i {
    transition: transform 0.3s;
}

.incon-menu-item.active > a i {
    transform: rotate(180deg);
}
.incon-menu-item.incon-item-lvl-1.active {
    border: 1px solid var(--awb-color4);
    border-radius: 5px;
  }
/* Submenu styling */
.menu-item-sub {
    display: none;
    padding: 3px 0 5px 15px;
}
.incon-item-lvl-2 > .menu-item-sub > .menu-item-posts > a.item-post-title{
    padding: 6px 10px 6px 0px;
}

/* Nur wenn JavaScript deaktiviert ist, zeige Submenüs an */
.no-js .incon-menu-item.active .menu-item-sub {
    display: block;
}

/* Posts styling */
.menu-item-posts {
    margin-bottom: 15px;
}

.item-post-title {
    display: block;
    padding: 6px 10px 6px 13px;
    margin-bottom: 5px;
    color: #282828!important;
    text-decoration: none!important;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    line-height: 18px;
    background-color: #fff;
    transition: background-color 0.2s;
}
a.item-post-title{
    background-color: #fff!important;
}
.item-post-title:hover {
    background-color: #e5e5e5;
}
.incon-menu-item.incon-item-lvl-2 > a{
    background-color: #fff!important;
    text-transform: uppercase;
    color:#057AAE;
    font-weight: bold;
    padding:0px 15px 0 0;
    font-size: 14px !important;
}
.incon-menu-item.incon-item-lvl-2 .fas.fa-chevron-down{
    color:#AEC7D1;
    font-size: 12px;
}
.item-post-title.current-post {
    font-weight: 500;
    color: #057aae !important;
}

/* Bookmarks styling */
.post-bookmarks {
    padding-left: 15px;
    margin-bottom: 15px;
}

a.bookmark-h2 {
    display: block;
    padding: 0px 10px 1px;
    margin-bottom: 5px;
    text-decoration: none;
    color: #282828!important;
    font-weight: 200;
    transition: background-color 0.2s;
    font-size: 13px;
    line-height: 18px;
    text-decoration: none!important;
    background:#fff!important;
}

a.bookmark-h2:hover {
    background-color: #eaeaea;
}

a.bookmark-h3 {
    display: block;
    padding: 0px 10px 1px;
    margin-bottom: 3px;
    text-decoration: none;
    background:#fff!important;
    color: #282828!important;
    font-size: 0.95em;
    transition: background-color 0.2s;
    font-size: 13px;
    line-height: 18px;
    text-decoration: none!important;
}

a.bookmark-h3:hover {
    background-color: #eaeaea;
}

.post-bookmarks a{
    position: relative;
}
.post-bookmarks a::before {
    content: '-';
    position: absolute;
    left: -2px;
  }

/* Nesting levels */
.incon-item-lvl-2 > a {
    background-color: #f0f0f0;
    font-weight: normal;
    padding-left: 20px;
}

.incon-item-lvl-3 > a {
    background-color: #f5f5f5;
    padding-left: 30px;
    font-size: 0.95em;
}

/* In-detail mode */
.in-detail .post-bookmarks {
    display: none; /* Standardmäßig ausblenden */
}

.out-detail .post-bookmarks {
    display: none;
}

/* Nur die Bookmarks des aktuellen Posts auf der Detailseite anzeigen */
body.single-incon_info .post-bookmarks,
body.single-incon_hr .post-bookmarks {
    display: none; /* Zuerst alle ausblenden */
}

/* Current anchor styling */
a.bookmark-h2.active-anchor,
a.bookmark-h3.active-anchor {
    background-color: #f0f7ff;
    font-weight: bold;
}

/* START PAGE FIXED NAVIGATION STYLING */

/* Wichtig: body-level box direkt unter body */
.incon-fixed-box {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    max-width: 480px;
    width: 480px;
    max-height: 80vh;
    background-color: #f8f8f8;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
    z-index: 999999;
}

.incon-fixed-box.collapsed {
    transform: translate(-480px, -50%);
}

.incon-fixed-box .incon-start-wrapper {
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    height: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.incon-fixed-box .incon-nav {
    height: 100%;
    overflow-y: auto;
}

.incon-start-ov-handle {
    position: absolute;
    top: 15px;
    right: -40px;
    width: 40px;
    height: 40px;
    background-color: #0073aa;
    border-radius: 0 5px 5px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 1000000;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .incon-sidebar-wrapper,
    .incon-start-wrapper {
        margin: 10px 0;
    }

    .incon-nav {
        padding: 10px;
    }

    .incon-menu-item > a {
        padding: 8px;
    }

    .incon-fixed-box {
        max-width: 320px;
        width: 320px;
    }

    .incon-fixed-box.collapsed {
        transform: translate(-320px, -50%);
    }
}