:root {
    --header-border-solid-: linear-gradient(120deg, #44a6ff 0%, #00e1ff 32%, #6dff79 58%, #2c65ff 80%, #44a6ff 100%);
    --header-border-faded-: linear-gradient(90deg,            
        rgba(68, 166, 255, 0) 0%,                        
        rgba(0, 225, 255, 0.95) 25%,            
        rgba(109, 255, 121, 0.95) 50%,           
        rgba(0, 225, 255, 0.95) 75%,            
        rgba(68, 166, 255, 0) 100%)
    }

::placeholder {
    color: #9b9b9b;
    opacity: 1;
}

/* Header */

.header {
    background-color: var(--primary-color-);
    box-shadow: 1px 1px 4px 0 rgba(0, 0, 0, .1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 5;
    display: block;
    height: auto;
    border-bottom: 2px solid transparent;
    border-image-slice: 1;
    border-image-source: var(--header-border-solid-);
}

.header.on-dashboard {
    border: unset;
    border-image: none;
    box-shadow: unset;
    background: unset;
    position: absolute;
}

.nav-left {
    float: left;
    margin-left: 16px;
    align-content: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
}

.logo.on-dashboard {
    border-bottom: 2px solid transparent;
    border-image-slice: 1;
    border-image-source: var(--header-border-faded-);
}

.logo img {
    height: 25px;
}


li a#signup-btn {
    margin: 8px 25px 8px 0;
    display: unset;
    padding: 6px 12px;
    height: 36px;
    color: var(--rich-blue-);
    box-sizing: border-box;
}

.account-icon {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.account-icon img {
    height: 28px;
    width: 28px;
}

.account-icon img:hover,
.user-avatar:hover {
    opacity: .75;
}


.user-account-dropdown {
    position: absolute;
    top: 40px;
    right: 0;
    background: var(--almost-white-);
    border-radius: 6px;
    width: 300px;
    padding: 5px;
    max-height: 500px;
    overflow-y: auto;
    box-shadow: 0 0px 18px rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 1000;
    cursor: auto;
}

.user-account-dropdown {
    top: 48px;
    right: 10px;
    width: fit-content;
    min-width: 200px;
    overflow: visible;
}

.user-account-dropdown::after {
    content: "";
    position: absolute;
    top: -5px;
    right: 10px;
    width: 10px;
    height: 10px;
    background: inherit;
    transform: rotate(45deg);
    border-radius: 2px 0 0 0;
    z-index: -1;
}

.dropdown {
    position: relative;
}

.dropdown:after {
    border: 10px solid;
    border-color: #0000 #0000 #fff;
    border-top: 0;
    content: "";
    height: 0;
    position: absolute;
    top: -20px;
    right: -3px;
    width: 0;
}

.dropdown-item a {
    border-radius: 3px;
    box-sizing: border-box;
}

.dropdown-rail-links {
    display: none;
    margin: 6px 0;
    padding: 6px 0;
    border-top: 1px solid rgba(13, 34, 77, 0.12);
    border-bottom: 1px solid rgba(13, 34, 77, 0.12);
}

header li .user-account-dropdown a, .custom-select-options li:hover {
    color: var(--primary-color-);
}

header li .user-account-dropdown a:hover, .custom-select-options li:hover {
    background: var(--hover-gray-);
    transition: background 300ms ease;
}

.header li a {
    opacity: 1;
    color: var(--almost-white-);
    text-align: center;
    -webkit-text-stroke-width: 0px;
    text-transform: none;
    flex: 0 auto;
    order: 0;
    justify-content: center;
    padding: 10px 20px;
    margin: 0;
    font-style: normal;
    font-weight: 400;
    transition: opacity .2s;
    display: flex;
    text-decoration: none;
}

.header li a:hover {
    /* background: unset; */
    opacity: .75;
}

.header .menu {
    clear: none;
    max-height: none;
    display: flex;
    justify-content: center;
    flex-direction: row;
    align-items: center;
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    width: 35px;
    height: 35px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--almost-white-);
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.14);
}

.menu-toggle:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.menu-toggle-line {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
}

.navigation-wrapper {
    flex-direction: row;
    padding: 0;
    display: flex;
    justify-content: space-between;
    height: 40px;
}

.navigation-wrapper ul {
    border: none;
    display: flex;
}

.user-avatar {
    width: 30px;
    height: 30px;
    background: var(--accent-color-);
    color: white;
    font-size: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    cursor: pointer;
    margin-right: 15px;
}

.user-avatar-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.team-dropdown {
    color: var(--translucent-white-);
}

.custom-select-wrapper {
    position: relative;
    display: inline-block;
    max-width: 300px;
}

.custom-select-wrapper button:hover {
    background: unset;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background-color: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--translucent-white-);

}

.customer-select-trigger:active {
    transform: scale(1);
}

.trigger-label {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chevron-down {
    flex-shrink: 0;
    margin-left: 8px;
    stroke: currentColor;
    transition: transform 0.3s ease;
}

.custom-select-trigger.open .chevron-down {
    transform: rotate(180deg);
}

.custom-select-trigger:active {
    transform: scale(1) !important;
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 50%;
    z-index: 10;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-top: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    padding: 0;
    list-style: none;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    color: var(--primary-color-);
    display: flex;
    flex-direction: column;
    transform: translateX(-50%);
    min-width: 200px;
}

.custom-select-options.visible {
    visibility: visible;
    padding: 5px;
    opacity: 1;
    transform: translateY(0) translateX(-50%);
}

.custom-select-options.visible::after {
    border: 10px solid;
    border-color: #0000 #0000 #fff;
    border-top: 0;
    content: "";
    height: 0;
    position: absolute;
    top: -20px;
    right: -3px;
    width: 0;
}


.custom-select-options li {
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 3px;
}


/*****************************/
/*MOBILE MOBILE MOBILE MOBILE*/
/*****************************/

@media (max-width: 900px) {

  .header {
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .navigation-wrapper {
        position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 10px;          /* keeps content off edges */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  /* floats are risky on mobile, neutralize */
  .nav-left {
    float: none;
    flex: 0 0 auto;
    margin-left: 0;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  /* make the menu area shrink instead of pushing width */
  .header .menu {
        position: absolute;
        top: calc(100% + 10px);
        right: 10px;
        left: auto;
        z-index: 30;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        width: min(320px, calc(100vw - 20px));
        max-width: calc(100vw - 20px);
    min-width: 0;
        margin: 0;
        padding: 10px;
        border-radius: 16px;
        background: var(--almost-white-);
        box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
        backdrop-filter: blur(14px);
  }

    .header.is-mobile-menu-open .menu {
        display: flex;
    }

  /* critical: allow flex children to shrink */
  .navigation-wrapper > * {
    min-width: 0;
  }

    .menu-toggle {
        display: inline-flex;
        flex: 0 0 auto;
    }

    .header.is-mobile-menu-open .menu-toggle-line:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .header.is-mobile-menu-open .menu-toggle-line:nth-child(2) {
        opacity: 0;
    }

    .header.is-mobile-menu-open .menu-toggle-line:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

  .team-dropdown,
  .custom-select-wrapper {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    display:none;
  }

  /*.custom-select-trigger {*/
  /*  width: 100%;*/
  /*  padding: 8px 10px;*/
  /*}*/
  
  /*.custom-select-options {*/
  /*    min-width: 0;*/
  /*}*/

  /*.trigger-label {*/
  /*  text-align: center;*/
  /*  min-width: 0;*/
  /*  overflow: hidden;*/
  /*  text-overflow: ellipsis;*/
  /*  white-space: nowrap;*/
  /*}*/
  
  /*.chevron-down {*/
  /*  flex: 0 0 auto;*/
  /*  margin-left: 6px;*/
  /*}*/

  /* reduce link padding so they fit */
  .header li a {
        width: 100%;
        box-sizing: border-box;
        justify-content: flex-start;
        padding: 12px 14px;
        text-align: left;
        color: var(--primary-color-);
    }

    .header .menu li {
        width: 100%;
        list-style: none;
    }

    .header .menu > li + li {
        margin-top: 2px;
    }

    .account-wrapper {
        position: relative;
    }

    .account-icon {
        width: 100%;
        justify-content: flex-start;
    }

    .header.is-mobile-menu-open .account-icon {
        display: none;
    }

    .user-avatar {
        margin-right: 0;
    }

    .user-account-dropdown {
        position: static;
        top: auto;
        right: auto;
        width: 100%;
        min-width: 0;
        margin-top: 8px;
        box-shadow: none;
        border-radius: 12px;
    }

    .header.is-mobile-menu-open .user-account-dropdown {
        display: block;
    }

    .dropdown-rail-links {
        display: block;
    }

    .user-account-dropdown::after {
        display: none;
  }

    .dropdown-item a {
        justify-content: flex-start;
  }

    .header li a#signup-btn {
        display: flex;
        width: 100%;
        margin: 8px 0 0;
        align-items: center;
        justify-content: center;
        color: var(--rich-blue-);
    }
}
