/*Everything*/
:root {

    --accent-color: #ff5500;
    --accent-color-light: #ff8800;
    --plyr-color-main: #ff5500;
    --card-color: #686868;

    /* light mode colors */
    --bg-color: #f2f2f2;
    --card-bg-color: #ffffff;
    --text-color: #333333;

    /* dark mode colors */
    --darkmode-bg-color: #333333;
    --darkmode-card-bg-color: #444444;
    --darkmode-text-color: #ffffff;
}



/* ===== MOBILE FIRST (338px) ===== */

/* Header Styles */
.main-header {
    background-color: #333;
    color: white;
    padding: 0 0px;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    justify-content: space-between;
}

.logo-icon-div {
    width: 44px;
    height: 44px;
    pointer-events: auto;
    display: block;
    margin-left: 10px;
    cursor: pointer; 
}
.logo-img {
    width: 44px;
    height: 44px;
    pointer-events: none;
}

.logo {
    font-weight: bold;
    background: var(--accent-color);
    padding: 2px 5px;
    cursor: pointer;
    font-size: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    display: none;
    margin-left: 10px;
}

.logo:hover {
    background: linear-gradient(var(--accent-color), var(--accent-color-light));
}

.menuIcons {
    width: 30px;
    height: 30px;
    pointer-events: none;
    display: block;
}


.nav-links {
    display: flex;
    align-items: center;
    transition: max-height 0.3s ease;
}

.nav-links a {
    color: #ccc;
    text-decoration: none;
    padding: 0 8px;
    font-size: 11px;
    display: none;
    align-items: center;  /* ADD THIS */
    gap: 8px;  /* ADD THIS */
}

.nav-links a.active {
    color: white;
    background-color: #111;
    height: 100%;
    display: inline-flex;
    align-items: center;
}

.nav-links a:hover {
    background-color: var(--accent-color);
    cursor: pointer;
}



.search-bar input {
    background: #e5e5e5;
    border: none;
    padding: 3px 5px;
    border-radius: 4px;
    width: 160px;
    font-size: 14px;
    display: block;
}

.account-menu {
    margin-left: auto;
    display: flex;
    align-items: center;
    padding-right: 5px;
    position: relative;
    flex-shrink: 0;
}

#accountMenuDropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    z-index: 1001;
}

/* Avatar Menu Styles */
sl-menu-item::part(base) {
  background-color: var(--card-bg-color);
  color: var(--text-color);
}
sl-menu-item:hover::part(base), sl-menu-item:focus-visible::part(base) {
    background-color: var(--accent-color);
    color: var(--card-bg-color);
}

/* dark mode overrides */
body.dark-mode sl-menu-item::part(base), body.dark-mode sl-menu-item:focus-visible::part(base) {
  background-color: var(--darkmode-card-bg-color);
  color: var(--darkmode-text-color);
}   
body.dark-mode sl-menu-item:hover::part(base), body.dark-mode sl-menu-item:focus-visible::part(base) {
    background-color: var(--accent-color);
    color: var(--card-bg-color);
}
body.dark-mode {
  --sl-panel-background-color: var(--darkmode-card-bg-color);
}
body.dark-mode sl-alert::part(message) {
  color: var(--darkmode-text-color);
}


/* Hamburger Button (visible on mobile) */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    flex-shrink: 0;
}

.hamburger span {
    width: 24px;
    height: 3px;
    background: white;
    transition: 0.3s;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Mobile menu */
.nav-links {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: #333;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px 0;
    max-height: 0;
    overflow: hidden;
}

.nav-links.open {
    max-height: 300px;
}

.nav-links.open a {
    display: block;
    padding: 10px 15px;
    width: 100%;
    font-size: 16px;
}


sl-avatar::part(base) {
    width: 30px;
    height: 30px;
    background-color: white;
    color: black;
    cursor: pointer;
}

sl-avatar::part(initials) {
    color: black;
    font-size: 9px;
}

/* ===== TABLET (min-width: 600px) ===== */
@media (min-width: 600px) {
    .main-header {
        padding: 0 0px;
        height: 50px;
    }

    .header-container {
        gap: 5px;
        justify-content: flex-start;
    }

    .logo-icon-div {
        display: none;
    }

    .logo {
        font-size: 12px;
        padding: 4px 8px;
        margin-right: 10px;
        display: block;
    }

    .menuIcons {
        width: 24px;
        height: 24px;
    }

    .nav-links a {
        font-size: 12px;
        padding: 0 10px;
        display: flex;
    }

    .search-bar input {
        width: 200px;
        padding: 4px 8px;
        font-size: 12px;
        margin-left: 10px;
        display: block;
    }

    .hamburger {
        display: none;
    }

    .nav-links {
        position: static;
        flex-direction: row;
        width: auto;
        background: none;
        max-height: unset;
        overflow: visible;
    }
    .nav-links-text {
        display: none;
    }
    sl-avatar::part(base) {
        width: 24px;
        height: 24px;
        margin-right: 15px;
    }

    sl-avatar::part(initials) {
        font-size: 10px;
    }
}

/* ===== DESKTOP (min-width: 1024px) ===== */
@media (min-width: 1024px) {
    .main-header {
        padding: 0 0px;
        height: 50px;
    }

    .header-container {
        max-width: 1240px;
        margin: 0 auto;
        gap: 10px;
        justify-content: flex-start;
    }

    .logo {
        font-size: 14px;
        padding: 5px 10px;
        margin-right: 20px;
        display: block;

    }

    .logo-icon-div {
        display: none;
    }

    .menuIcons {
        width: 30px;
        height: 30px;
    }

    .nav-links a {
        font-size: 14px;
        padding: 0 15px;
    }


    .search-bar input {
        width: 250px;
        padding: 5px 10px;
        font-size: 14px;
        margin-left: 20px;
    }

    sl-avatar {
        margin-left: 15px;
    }

    sl-avatar::part(base) {
        width: 25px;
        height: 25px;
    }

    sl-avatar::part(initials) {
        color: black;
    }
}