/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: var(--header-height);
    width: 100%;
    font-size: 1.4rem;
    background-color: var(--primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.header .avatarFood {
    height: 55px;
    width: 55px;
}

.header .link-avatarFood {
    padding-top: 4px;
}

.header-navigate nav {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6rem;
    position: relative;
}

.header-navigate a {
    position: relative;
    display: inline-block;
    width: 120px;
    height: var(--header-height);
    text-align: center;
    color: #551A8B;
    line-height: var(--header-height);
    transition: background 0.35s, color 0.35s ease;
}

.header-navigate a:hover {
    color: var(--white-color);
    background: #b253e1;
}

.nav-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 120px;
    background-color: #fe2389;
    border-radius: 10px;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.header-navigate a:hover::after,
.header-navigate a:focus::after {
    transform: scaleX(1);
}

.header-navigate a.active::after {
    transform: scaleX(1);
}

.header-right {
    display: flex;
}

.header-right-user-menu {
    display: flex;
}

.header-right-search {
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-right-search input {
    width: 200px;
    padding: 8px 8px;
    outline: none;
    border: none;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    font-size: 1.5rem;
}

.header-right-search i {
    background-color: #fe2389;
    padding: 10px;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    transition: background 0.35s, color 0.35s ease;
}

.header-right-search i:hover {
    background: #ef2483;
    color: var(--white-color);
    cursor: pointer;
}

.user-avatar img,
.language-btn img {
    width: 20px;
    height: 20px;
}

.header .header-right .language-btn {
    width: 50px;
    height: 50px;
}

.header-right-user-menu {
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-right-user-menu .login-btn {
    font-size: 1.6rem;
    transition: color 0.35s ease;
    padding: 10px;
    margin: 0 5px 0 20px;
    color: #551A8B;
}

.header-right-user-menu .login-btn:hover {
    color: var(--white-color);
}

.notification-btn {
    background: var(--white-color);
    padding: 8px 10px;
    border-radius: 50%;
    cursor: pointer;
    margin: 0 5px;
    transition: background 0.3s ease;
}

.notification-btn i {
    font-size: 1.4rem;
    color: var(--text-color);
}

.notification-btn:hover {
    background: #ededed;
}

.user-avatar-wrapper, .notification-wrapper {
    position: relative;
    width: 33px;
    height: 33px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 5px;
}

.user-avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Styles for user avatar dropdown */
.user-dropdown-menu, .notification-dropdown-menu {
    position: absolute;
    z-index: 1000;
    padding-left: 0;
    top: calc(100% + 14px);
    right: -10px;
    width: 180px;
    border-radius: 5px;
    background-color: var(--white-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    transform-origin: top;
    opacity: 0;
    transform: scaleY(0);
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
    display: flex;
}

.user-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -28px;
    right: 0;
    z-index: -1;
    border-style: solid;
    border-color: transparent transparent var(--white-color) transparent;
    border-width: 20px 26px;
}

/* Show dropdown when parent has 'active' class */
.user-avatar-wrapper.active .user-dropdown-menu,
.notification-wrapper.active .notification-dropdown-menu {
    opacity: 1;
    transform: scaleY(1);
    pointer-events: auto;
}

.user-dropdown-menu a {
    padding: 12px 16px;
    margin: 0;
    color: var(--text-color);
    display: block;
    font-size: 1.4rem;
    /* white-space: nowrap; */
    transition: background-color 0.3s, color 0.3s;
}

.user-dropdown-menu a:hover {
    background-color: #ededed;
    color: #fe2389;
}

.user-dropdown-menu a:first-child {
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.user-dropdown-menu a:last-child {
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    border-top: 1px solid var(--border-color);
}

.guest .user-dropdown-menu p {
    line-height: 1.4;
    margin: 0;
    padding: 12px 16px;
    transition: none;
    font-size: 1.5;
    color: var(--text-color);
    cursor: default;
    background: var(--white-color);
}

.guest .user-dropdown-menu a:last-child {
    border-top: none;
}

/* --- Specific styles for Notification dropdown --- */
.notification-wrapper {
    width: auto;
    height: auto;
}

.notification-dropdown-menu {
    width: 400px;
    right: -15px;
    top: calc(100% + 14px);
    animation: fadeIn ease-in .2s;
}

.notification-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -28px;
    right: 0;
    z-index: -1;
    border-style: solid;
    border-color: transparent transparent var(--white-color) transparent;
    border-width: 20px 26px;
}

.notification-dropdown-menu::before {
    right: 10px;
}

.notification-header {
    font-size: 1.8rem;
    color: #551A8B;
    margin: 0;
    padding: 12px 16px;
    font-weight: 600;
    line-height: 1;
    border-bottom: 1px solid var(--border-color);
    cursor: default;
}

.guest .notification-dropdown-menu .user-dropdown-menu-guest-link {
    margin: 0;
    padding: 12px 16px;
    transition: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: default;
}

.notification-list {
    padding-left: 0;
    max-height: 300px;
    width: 400px;
    overflow-y: auto;
}

.notification-item a {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    margin: 0;
    font-size: 1.4rem;
    color: var(--text-color);
    line-height: 1.2;
    transition: background-color 0.3s;
}

.notification-item a:hover {
    background-color: #ededed;
}

.notification-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    margin-right: 12px;
    border-radius: 3px;
}

.notification-time {
    font-size: 1.4rem;
    color: #7c7c7c;
    text-align: right;
    margin-right: -40px;
}

.notification-footer {
    border-top: 1px solid var(--border-color);
    padding: 12px 16px;
    font-size: 1.5rem;
    text-align: center;
    line-height: 1;
}