﻿/* Hide Bootstrap navbar on mobile */
@media (max-width: 991.98px) {
    #mainNavbar .navbar-collapse {
        display: none !important;
    }

    body {
        padding-top: 60px;
    }
}

/* Burger button */
#vmBurger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.vm-bline {
    display: block;
    width: 20px;
    height: 2px;
    background: rgb(203, 213, 225);
    border-radius: 2px;
    transition: all 0.3s ease;
}

#vmBurger.vm-open .vm-bline:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: #DC2626;
}

#vmBurger.vm-open .vm-bline:nth-child(2) {
    opacity: 0;
}

#vmBurger.vm-open .vm-bline:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: #DC2626;
}

/* Drawer wrapper */
#vmDrawer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    pointer-events: none;
}

    #vmDrawer.vm-open {
        pointer-events: auto;
    }

/* Backdrop */
#vmBackdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

#vmDrawer.vm-open #vmBackdrop {
    background: rgba(0, 0, 0, 0.5);
}

/* Panel */
#vmPanel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 85vw;
    max-width: 340px;
    background: #0d1424;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    z-index: 10000;
}

#vmDrawer.vm-open #vmPanel {
    transform: translateX(0);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

/* Panel header */
.vm-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    height: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #0B1120;
}

    .vm-panel-head img {
        max-height: 34px;
        width: auto;
    }

/* Close button */
#vmClose {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10001;
    position: relative;
}

    #vmClose:hover {
        background: rgba(220, 38, 38, 0.15);
        border-color: rgba(220, 38, 38, 0.3);
    }

    #vmClose .material-icons-round {
        font-size: 20px;
        color: rgba(203, 213, 225, 0.7);
    }

/* Nav body */
.vm-nav-body {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

.vm-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Nav links */
.vm-navlink {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    width: 100%;
    color: rgb(203, 213, 225);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .vm-navlink:hover {
        background: rgba(220, 38, 38, 0.07);
        color: #fff;
    }

    .vm-navlink.vm-active {
        color: #fff;
        background: rgba(220, 38, 38, 0.05);
        border-left: 3px solid #DC2626;
    }

.vm-link-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .vm-link-icon .material-icons-round {
        font-size: 17px;
        color: rgba(203, 213, 225, 0.5);
    }

.vm-navlink:hover .vm-link-icon {
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.3);
}

    .vm-navlink:hover .vm-link-icon .material-icons-round {
        color: #DC2626;
    }

.vm-link-label {
    flex: 1;
}

.vm-chev {
    display: flex;
    transition: transform 0.3s ease;
}

    .vm-chev .material-icons-round {
        font-size: 18px;
        color: rgba(203, 213, 225, 0.35);
    }

.vm-navlink.vm-active .vm-chev {
    transform: rotate(180deg);
}

/* Dropdowns */
.vm-drop {
    max-height: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.15);
    transition: max-height 0.3s ease;
}

    .vm-drop.vm-drop-open {
        max-height: 600px;
    }

.vm-drop-head {
    padding: 8px 16px 4px 62px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(148, 163, 184, 0.45);
    text-transform: uppercase;
}

.vm-drop-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 16px 10px 62px;
    color: rgba(203, 213, 225, 0.8);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

    .vm-drop-item:hover {
        background: rgba(220, 38, 38, 0.07);
        color: #fff;
    }

    .vm-drop-item.vm-drop-all {
        color: rgb(203, 213, 225);
        font-weight: 600;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        padding-bottom: 11px;
    }

    .vm-drop-item .material-icons-round {
        font-size: 15px;
        color: rgba(148, 163, 184, 0.5);
    }

    .vm-drop-item.vm-drop-all .material-icons-round {
        color: #DC2626;
    }

.vm-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.3);
}

.vm-drop-item:hover .vm-dot {
    background: #DC2626;
}

. /* Notification Dropdown FIX */
#vmNotifDrop {
    max-height: 0;
    overflow: hidden;
    background: rgba(0,0,0,0.15);
    transition: max-height .3s ease;
}

#vmNotifDrop.vm-drop-open {
    max-height: 320px; /* prevent huge expansion */
    overflow-y: auto; /* scroll notifications */
    overflow-x: hidden;
}

/* Notification Items */
.vm-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,.04);
    transition: background .2s ease;
    min-width: 0; /* IMPORTANT for text wrapping */
}

    .vm-notif-item:hover {
        background: rgba(220,38,38,.05);
    }

.vm-notif-content {
    flex: 1;
    min-width: 0; /* IMPORTANT prevents overflow */
}

.vm-notif-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    /* Prevent title breaking layout */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vm-notif-msg {
    font-size: 12px;
    color: rgba(203,213,225,.7);
    margin-bottom: 4px;
    line-height: 1.35;
    /* Multi-line clamp */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.vm-notif-time {
    font-size: 10px;
    color: rgba(148,163,184,.5);
}

.vm-notif-delete {
    flex-shrink: 0; 
    width: 24px;
    height: 24px;
    margin-top: 2px;
    border-radius: 6px;
    
    border: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

    .vm-notif-delete .material-icons-round {
        font-size: 14px;
    }

    .vm-notif-delete:hover {
        background: rgba(220,38,38,.15);
        border-color: rgba(220,38,38,.3);
    }
/* Language row */
.vm-lang-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.vm-lang-label {
    color: rgba(148, 163, 184, 0.5);
    font-size: 11.5px;
    display: flex;
    align-items: center;
    gap: 3px;
}

    .vm-lang-label .material-icons-round {
        font-size: 13px;
    }

.vm-lang-chips {
    display: flex;
    gap: 6px;
}

.vm-lang-chip {
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: rgb(203, 213, 225);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .vm-lang-chip.vm-lang-active {
        background: rgba(220, 38, 38, 0.15);
        border-color: rgba(220, 38, 38, 0.4);
        color: #DC2626;
    }

/* Auth section */
.vm-auth-section {
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vm-user-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    margin-bottom: 4px;
}

.vm-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #DC2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.vm-user-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
}

.vm-user-type {
    font-size: 10.5px;
    color: rgba(148, 163, 184, 0.55);
}

.vm-account-links {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.vm-account-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border-radius: 9px;
    color: rgb(203, 213, 225);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

    .vm-account-link:hover {
        background: rgba(220, 38, 38, 0.07);
        color: #fff;
    }

    .vm-account-link .material-icons-round {
        font-size: 17px;
        color: #DC2626;
    }

    .vm-account-link.vm-logout {
        color: #f87171;
    }

        .vm-account-link.vm-logout .material-icons-round {
            color: #f87171;
        }

.vm-notif-badge {
    margin-left: auto;
    background: #DC2626;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 20px;
}

.vm-btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    background: transparent;
    color: rgb(203, 213, 225);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .vm-btn-login:hover {
        background: rgba(255, 255, 255, 0.05);
        color: #fff;
    }

    .vm-btn-login .material-icons-round {
        font-size: 17px;
    }

.vm-btn-register {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 11px;
    border: none;
    background: #DC2626;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.35);
    transition: all 0.2s ease;
}

    .vm-btn-register:hover {
        background: #b91c1c;
    }

    .vm-btn-register .material-icons-round {
        font-size: 17px;
    }

/* Hide on desktop */
@media (min-width: 992px) {
    #vmDrawer,
    #vmBurger {
        display: none !important;
    }
}
