/* NAVIGATION - navigation.php */
#navigation-bar {
    min-height: 60px;
    border-bottom:1px solid #fff;
}

#navigation-bar .popover-messages {
    position: relative;
}
#navigation-bar .notifications {
    position: relative;
}

#navigation-bar .unReadChat-desktop{
    position: absolute;
    top: 0px;
    left: 20px;
}

#navigation-bar .unReadChat-mobile{
    position: absolute;
    top: 0px;
    left: 20px;
    font-size:60%;
}
#navigation-bar .unReadNotification{
    position: absolute;
    top: 0px;
    left: 20px;
}
#navigation-bar .nav-link-padding{
    padding-left:10px;
}

#navigation-bar a {
	color:#fff;
}
#navigation-bar .navbar-toggler {
    background-image: none;
    border-color: rgba(255,255,255,.1);
}
#navigation-bar .navbar-brand .fa-lg{
	padding-right: 0px;
    padding-left: 0px;
}
#navigation-bar #mainNavbarCollapse .fa-lg{
    font-size:26px;
    line-height: 0;
    display: inline-block;
    vertical-align: middle;
    float: none;
}
#navigation-bar .nav-item {
	padding-left: 15px;
    padding-right: 15px;
}
#navigation-bar .nav-item .nav-link {
    height:42px;
}
#navigation-bar .dropdown-menu .dropdown-item {
	color:#818a91;
}
#navigation-bar .dropdown-item {
    padding-left: 30px;
    padding-right: 30px;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* POPOVER SETTINGS */
#popover-content-settings a{
    color:#818a91;
    padding: 15px 30px 15px 35px;
}
#popover-content-settings a:hover{
    border-radius:6px;
}
#popover-content-settings .dropdown-divider{
    margin:0;
}
#popover-content-settings a:last-child {
    border-bottom: none;
}

/* MESSAGE OVERVIEW — compact groen inbox-menu */

#popover-content-messages .modal-content {
    height: 400px;
    border: none;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    background: #fff;
}
#popover-content-messages .modal-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e6e2dc;
    background: #f7faf7;
}
#popover-content-messages .modal-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #2f7a2f;
    font-family: inherit;
}
#popover-content-messages .modal-title a {
    color: #2f7a2f !important;
    text-decoration: none;
}
#popover-content-messages .modal-title a:hover {
    color: #449d44 !important;
}
#popover-content-messages .modal-body {
    padding: 0;
    position: static;
    background: #fff;
}
#popover-content-messages .modal-footer {
    border-top: 1px solid #e6e2dc;
    padding: 0.55rem 1rem;
    background: #f7faf7;
}
#popover-content-messages .modal-footer a {
    color: #449d44 !important;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
}
#popover-content-messages .modal-footer a:hover {
    color: #2f7a2f !important;
}

.message-overview {
    overflow: auto;
}

#popover-content-messages .message-overview .row {
    background-color: #fff;
    margin: 0;
}
#popover-content-messages .message-overview .row:not(:last-child) {
    border-bottom: none;
}
#popover-content-messages .message-overview a:hover {
    text-decoration: none;
}

#popover-content-messages .message-overview .chat {
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-y: auto;
    background-color: #fff;
}

#popover-content-messages .message-overview .chat > li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    position: relative;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #eeeae4;
    min-height: 0;
}

#popover-content-messages .message-overview .chat > li:hover {
    background: #f4f9f4;
}

#popover-content-messages .message-overview .chat > li .chat-img {
    position: relative;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    float: none !important;
    margin: 0;
}

#popover-content-messages .message-overview .chat > li .chat-img .unread-circle {
    position: absolute;
    top: -1px;
    left: -1px;
    z-index: 2;
    font-size: 0.55rem;
    line-height: 1;
}

#popover-content-messages .message-overview .chat > li .chat-img a {
    display: block;
    width: 44px;
    height: 44px;
}

/* Override globale .img-circle-chat (85px) in dit menu */
#popover-content-messages .message-overview .chat li img,
#popover-content-messages .message-overview .chat li .img-circle-chat {
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    object-fit: cover;
    border-radius: 50%;
}

#popover-content-messages .message-overview .chat li .datic-thumb {
    width: 44px !important;
    height: 44px !important;
    max-width: 44px;
    border-radius: 50%;
    display: block;
    margin: 0;
}

#popover-content-messages .message-overview .chat li .datic-thumb .datic-thumb-img,
#popover-content-messages .message-overview .chat li .datic-thumb .img-circle-chat {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
}

#popover-content-messages .message-overview .chat li.left .chat-body {
    flex: 1 1 auto;
    min-width: 0;
    color: #6a635c;
    text-decoration: none;
    padding-right: 1.6rem;
    float: none !important;
}

#popover-content-messages .message-overview .chat li.left .chat-body:hover {
    text-decoration: none;
}

#popover-content-messages .message-overview .chat li .chat-body .header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.15rem;
}

#popover-content-messages .message-overview .chat li .chat-body .primary-font {
    font-size: 0.88rem;
    font-weight: 650;
    color: #1e1a17;
    line-height: 1.25;
}

#popover-content-messages .message-overview .chat li .chat-body p,
#popover-content-messages .form-chat-message {
    margin: 0;
    height: auto !important;
    max-height: 2.4em;
    line-height: 1.25;
    font-size: 0.78rem;
    color: #818a91 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

#popover-content-messages .chat-clock {
    position: absolute;
    top: 0.65rem;
    right: 2rem;
    font-size: 0.68rem !important;
    line-height: 1.2;
    color: #9a948c !important;
    white-space: nowrap;
    font-weight: 500;
}

#popover-content-messages .chat-clock .fa {
    display: none;
}

#popover-content-messages .removeConversation {
    position: absolute;
    top: 50%;
    right: 0.2rem;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.15s ease;
}

#popover-content-messages .message-overview .chat > li:hover .removeConversation {
    opacity: 0.55;
}

#popover-content-messages .removeConversation .btn {
    padding: 0.2rem 0.35rem;
    background: transparent;
    border: 0;
    color: #9a948c;
    box-shadow: none;
}

#popover-content-messages .removeConversation .btn:hover {
    color: #449d44;
}

#popover-content-messages .removeConversation .fa-trash {
    font-size: 0.85rem;
}

#popover-content-messages .emptyMessage {
    display: block;
    padding: 1.5rem 1rem;
    color: #9a948c;
    font-size: 0.85rem;
}

#popover-content-messages .tag-blue,
#popover-content-messages .tag-green {
    color: #5cb85c !important;
}

#popover-content-messages .message-overview #divLoading.show .fa-spinner {
    display: block;
    position: absolute;
    z-index: 999;
    opacity: 1;
    color: #5cb85c;
    top: 40%;
    left: 45%;
    font-size: 28px !important;
}

/* NAVBAR FIX */
@media (max-width: 767px) {
    #navigation-bar {
        min-height: 60px;
    }
    #navigation-bar .navbar-nav {
        float: none !important;
        padding: 0.5rem 0.75rem 0.75rem;
        margin: 0;
        width: 100%;
    }
    #navigation-bar .navbar-nav .nav-item {
        float: none !important;
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    #navigation-bar .navbar-nav .nav-item + .nav-item {
        margin-left: 0;
    }
    #navigation-bar .navbar-nav .nav-link {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        width: 100%;
        height: auto;
        padding: 0.7rem 0.35rem;
        box-sizing: border-box;
    }
    /* Desktop-only knoppen nooit in het mobiele menu */
    #navigation-bar #mainNavbarCollapse .hidden-sm-down,
    #navigation-bar #mainNavbarCollapse .popover-messages,
    #navigation-bar #mainNavbarCollapse .popover-settings {
        display: none !important;
    }
    #navigation-bar .dropdown-menu {
        position: static !important;
        float: none !important;
        width: 100%;
        margin: 0;
        border: 0;
        box-shadow: none;
        background: transparent;
    }
    #navigation-bar .unReadNotification {
        font-size: 60%;
    }

    /* Scrollbaar menu boven de dock */
    #navigation-bar #mainNavbarCollapse.collapse.in,
    #navigation-bar #mainNavbarCollapse.collapsing {
        display: block;
        clear: both;
        width: 100%;
        max-height: calc(100vh - 60px - 5.5rem);
        max-height: calc(100dvh - 60px - 5.5rem);
        overflow-x: hidden;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}

/* POPOVER FIXES */
.webui-popover .webui-popover-content>div:first-child {
    width: 100%;
}
.webui-popover-content {
    overflow-y: hidden;
}

/* ---- Mobile bottom dock (eigen ruimte, niet over footer/menu) ---- */
.datic-mobile-dock {
    display: none;
}

@media (max-width: 767px) {
    .datic-mobile-dock {
        display: flex;
        position: fixed;
        left: 0.65rem;
        right: 0.65rem;
        bottom: calc(0.45rem + env(safe-area-inset-bottom, 0px));
        /* Onder navigatie/menu (navbar ~1030), boven content */
        z-index: 1020;
        align-items: stretch;
        justify-content: space-around;
        gap: 0.25rem;
        padding: 0.35rem 0.4rem;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid #e6e2dc;
        border-radius: 16px;
        box-shadow: 0 8px 24px rgba(30, 26, 23, 0.12);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-sizing: border-box;
    }

    /* Ruimte reserveren zodat dock niks overlapt (spacer ná footer) */
    body.has-mobile-dock:not(.chat-page) {
        padding-bottom: 0 !important;
    }
    body.has-mobile-dock:not(.chat-page) .wrapper::after {
        content: '';
        display: block;
        height: calc(5.1rem + env(safe-area-inset-bottom, 0px));
        pointer-events: none;
    }
    body.has-mobile-dock:not(.chat-page) footer.datic-site-footer,
    body.has-mobile-dock:not(.chat-page) footer.navbar,
    body.has-mobile-dock:not(.chat-page) footer {
        margin-bottom: 0 !important;
        position: relative !important;
    }

    /* Opengeklapt menu boven de dock */
    #navigation-bar.navbar {
        z-index: 1030;
    }
    #navigation-bar .navbar-collapse,
    #navigation-bar .dropdown-menu,
    #navigation-bar .webui-popover,
    #popover-content-settings,
    #popover-content-messages {
        z-index: 1045;
    }

    .datic-mobile-dock__item {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.15rem;
        min-width: 0;
        padding: 0.4rem 0.25rem;
        border-radius: 12px;
        text-decoration: none !important;
        color: #6a635c !important;
        -webkit-tap-highlight-color: transparent;
    }

    .datic-mobile-dock__item:hover,
    .datic-mobile-dock__item:focus {
        color: #2f7a2f !important;
        background: #f4f9f4;
        text-decoration: none !important;
    }

    .datic-mobile-dock__item.is-active {
        color: #2f7a2f !important;
        background: rgba(92, 184, 92, 0.14);
    }

    .datic-mobile-dock__item.has-unread .datic-mobile-dock__label {
        color: #2f7a2f;
        font-weight: 700;
    }

    .datic-mobile-dock__icon {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 1.75rem;
        height: 1.55rem;
        font-size: 1.25rem;
        line-height: 1;
    }

    .datic-mobile-dock__label {
        font-size: 0.68rem;
        font-weight: 600;
        line-height: 1.1;
        letter-spacing: 0.01em;
    }

    .datic-mobile-dock__badge,
    .datic-mobile-dock .unReadChat-mobile,
    .datic-mobile-dock .unReadNotification,
    .datic-mobile-dock .unReadDiscovery {
        position: absolute;
        top: -0.2rem;
        right: -0.35rem;
        min-width: 1rem;
        height: 1rem;
        padding: 0 0.25rem;
        border-radius: 999px;
        background: #d9534f;
        color: #fff;
        font-size: 0.62rem;
        font-weight: 700;
        line-height: 1rem;
        text-align: center;
    }

    .datic-mobile-dock__badge:empty,
    .datic-mobile-dock .unReadChat-mobile:empty,
    .datic-mobile-dock .unReadNotification:empty,
    .datic-mobile-dock .unReadDiscovery:empty {
        display: none !important;
    }

    #search .search-actions {
        bottom: calc(4.4rem + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* Magazine dropdown in main app nav */
#navigation-bar .mz-nav-dropdown {
    max-height: min(70vh, 480px);
    overflow-y: auto;
    min-width: 260px;
    max-width: min(340px, 92vw);
}
#navigation-bar .mz-nav-dropdown__heading {
    margin: 0.35rem 0 0.1rem;
    padding: 0.45rem 1rem 0.2rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #449d44;
    white-space: normal;
}
#navigation-bar .mz-nav-dropdown__article {
    white-space: normal;
    line-height: 1.3;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    font-size: 0.9rem;
}
