/* WAI-Core: src/app/static/css/shell/nav.css v5 */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    overflow: visible;
    margin-bottom: 20px;
    background-color: transparent;
}

.navbar-container {
    position: relative;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 41px;
    margin-right: 41px;
    margin-top: 10px;
}

.navbar-main {
    background-color: #243f53;
    color: white;
    border-radius: 9999px;
    height: 60px;
    padding: 0 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-shadow:
        0px 6px 20px rgba(0, 0, 0, 0.3),
        0px 4px 12px rgba(17, 29, 38, 0.4),
        inset 0px -2px 0px rgba(255, 255, 255, 0.15),
        inset 0px 2px 0px rgba(255, 255, 255, 0.15);
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    transition: all 0.15s ease, padding 0.15s ease;
    overflow: visible;
}

#nav-menu-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    z-index: 1;
}

#nav-buttons {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 auto;
    height: 40px;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: center;
    white-space: nowrap;
    overflow: visible;
}

#nav-buttons li {
    margin: 0 15px;
    position: relative;
}

#nav-buttons li:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -15px;
    transform: translateY(-50%);
    width: 2px;
    height: 50%;
    background-color: rgba(255, 255, 255, 0.3);
}

#nav-buttons li a {
    text-decoration: none;
    color: white;
    font-size: 1.08rem;
    padding: 10px 12px;
    transition: color 0.3s ease;
    position: relative;
    display: block;
    white-space: nowrap;
}

#nav-buttons > li.active-nav-item > a {
    color: #4CAF50 !important;
    font-weight: bold;
}

#nav-buttons > li.active-nav-item > a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #4CAF50;
    transform: translateX(-50%);
}

#nav-buttons li a:hover::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #4CAF50;
    transform: translateX(-50%);
}

.submenu {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    background-color: #243f53;
    left: 0;
    width: 200px;
    top: 100%;
    z-index: 999;
    transition: all 0.3s ease;
    transform: translateY(-20px);
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
    padding: 10px;
    list-style: none;
}

#nav-buttons li:hover .submenu,
.dropdown-toggle:hover + .submenu,
.submenu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    margin: 0;
    display: block;
}

.submenu li::after {
    display: none !important;
}

.submenu li a {
    color: #fff;
    padding: 12px 15px;
    text-decoration: none;
    display: block;
    text-align: left;
    transition: color 0.3s ease;
    font-size: 0.9rem;
    position: relative;
}

.submenu .active-submenu-item a {
    color: #4CAF50;
    font-weight: bold;
}

.submenu .active-submenu-item a::after,
.submenu li a:hover::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #4CAF50;
    transform: translateX(-50%);
}

.submenu li a:hover {
    color: #4CAF50;
}

.auth-nav-section {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

#auth-buttons {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    height: 100%;
    align-items: center;
    flex-shrink: 0;
}

#auth-buttons li {
    display: flex;
    margin: 0px;
    margin-left: 15px;
    position: relative;
}

#auth-buttons li a {
    text-decoration: none;
    color: #fff;
    font-size: 0.99rem;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    display: block;
}

#auth-buttons li:not(:first-child)::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -8px;
    transform: translateY(-50%);
    width: 2px;
    height: 70%;
    background-color: rgba(255, 255, 255, 0.3);
}

#auth-buttons li a {
    text-decoration: none;
    color: white;
    font-size: 0.99rem;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    display: block;
}

#auth-buttons li a:hover {
    color: #4CAF50;
}

#auth-buttons li a:hover::after {
    width: 100%;
}

#auth-buttons li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #4CAF50;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

#auth-buttons li a:hover::after {
    width: 100%;
}

#auth-buttons li a:hover {
    color: #4CAF50;
}

#auth-buttons > li.active-nav-item > a {
    color: #4CAF50 !important;
    font-weight: bold;
}

#auth-buttons > li.active-nav-item > a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #4CAF50;
    transform: translateX(-50%);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.26rem;
    cursor: pointer;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    flex-shrink: 0;
}

.nav-circle {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--brand-color-header);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    overflow: hidden;
    transition: background-color 0.3s ease;
    cursor: pointer;
    touch-action: none;
    user-select: none;
    box-shadow:
        0px 6px 20px rgba(0, 0, 0, 0.3),
        0px 4px 12px rgba(17, 29, 38, 0.4),
        inset 0px -2px 0px rgba(255, 255, 255, 0.15),
        inset 0px 2px 0px rgba(255, 255, 255, 0.15);
}

.nav-circle:focus {
    outline: none;
}

.nav-circle:focus-visible::before {
    opacity: 1;
    box-shadow: inset 0 0 12px var(--brand-color-highlight);
}

.nav-circle::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 4px solid var(--brand-color-highlight);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
    pointer-events: none;
}

.nav-circle:hover::before {
    opacity: 1;
    box-shadow: inset 0 0 12px var(--brand-color-highlight);
}

.inner-circle {
    position: relative;
    width: 85%;
    height: 85%;
    background-color: var(--brand-color-header);
    border-radius: 50%;
    overflow: hidden;
    justify-content: center;
    align-items: center;
    z-index: 1;
    display: flex;
}

.inner-circle > a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.circle-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.left-circle {
    left: 0;
    transform: translateX(-40%);
}

.right-circle {
    right: 0;
    transform: translateX(40%);
}

nav.nav-minimised .navbar-main {
    height: 0px;
    padding: 0 40px;
    overflow: hidden;
}

.nav-minimised {
    pointer-events: none;
}

/* Disable interactions when minimised so underlying content is clickable */
nav.nav-minimised .navbar-container {
    pointer-events: none;
}

nav.nav-minimised .nav-circle {
    pointer-events: auto;
}

nav.nav-minimised #nav-buttons,
nav.nav-minimised #auth-buttons {
    height: 0px;
    opacity: 0;
    overflow: hidden;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    flex-shrink: 0;
}

/* === MOBILE MENU PLACEHOLDER === */
#mobile-menu {
    display: none;
    border-radius: var(--brand-border-primary-radius);
    box-shadow:
        0px -6px 20px rgba(0, 0, 0, 0.3),
        0px -4px 12px rgba(17, 29, 38, 0.4),
        inset 2px 0px 0px rgba(255, 255, 255, 0.15),
        inset -2px 0px 0px rgba(255, 255, 255, 0.15);
}

.mobile-nav {
    display: none;
    flex-direction: column;
    align-items: center;
    background-color: #243f53;
    margin: 55px 82px;
    color: white;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
    border-radius: 0 0 var(--brand-border-primary-radius) var(--brand-border-primary-radius);
    box-shadow:
      inset 2px 0 0 rgba(255, 255, 255, 0.15),   /* Left line */
      inset -2px 0 0 rgba(255, 255, 255, 0.15),  /* Right line */
      inset 0 2px 10px rgba(0, 0, 0, 0.5);        /* Top shadow */
}

.mobile-nav.open {
    display: flex;
    max-height: 80vh;
    overflow-y: auto;
}

.mobile-nav-menu {
    width: 100%;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-menu li {
    text-align: center;
    margin: 5px 0;
}

.mobile-nav-menu a {
    text-decoration: none;
    color: white;
    font-size: 0.99rem;
    padding: 8px 12px;
    display: block;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.mobile-nav-menu a:hover {
    background-color: #36596f;
}


/* === Transparency for nav circles === */
.nav-circle,
.nav-circle .inner-circle {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.nav-circle:hover,
.nav-circle:hover .inner-circle,
.navbar-main:hover ~ .left-circle,
.navbar-main:hover ~ .right-circle,
nav:not(.nav-minimised) .nav-circle,
nav:not(.nav-minimised) .nav-circle .inner-circle {
    opacity: 1;
}


.mobile-nav.open {
    display: flex;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 0 0 var(--brand-border-radius) var(--brand-border-radius);
}

.nav-link-button {
    background: none;
    border: none;
    color: white;
    font-size: 1.08rem;
    padding: 10px 12px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link-button:hover {
    color: #4CAF50;
}

.nav-link-button::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #4CAF50;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link-button:hover::after {
    width: 100%;
}

.nav-button.active-nav-item > .nav-link-button {
    color: #4CAF50 !important;
    font-weight: bold;
}

.nav-button.active-nav-item > .nav-link-button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #4CAF50;
    transform: translateX(-50%);
}
