$banner-vertical-padding: 6px; $banner-text-max-width: 70%; $banner-unassigned-bg-color: #d4edf7; $banner-background-gradient: linear-gradient(to left, mix($color-black, $color-forever_valet, 10%), mix($color-black, $color-forever_services, 10%)); $banner-background-visible: 0.1; $banner-text-color: transparentize($color-white, 0.2); $ambassador-avatar-size: 130px; $banner-hover-effect-speed: 0.15s; $chevron-rotate-effect-speed: 0.25s; $dropdown-entrance-and-exit-effect-speed: 0.22s; a.ambassador_banner { display: block; &:hover, &:focus, &:active, &:active:focus { text-decoration: none; } } .ambassador_banner-text { position: static; height: $ambassador-banner-text-height; padding-top: $banner-vertical-padding; padding-bottom: $banner-vertical-padding; color: $banner-text-color; background-image: $banner-background-gradient; cursor: pointer; z-index: $in-front-of-primary-nav; &.is-behind_fixed-nav { z-index: $behind-primary-nav; } &::after { position: absolute; height: $ambassador-banner-text-height; top: 0; left: 0; width: 100%; background-color: $color-black; opacity: 0; @include transition(opacity $banner-hover-effect-speed ease-in-out); z-index: $zindex-navbar - 1; content: ""; pointer-events: none; } &:hover { &::after { opacity: $banner-background-visible; } } &.open { .fa-chevron-down { @include transform(rotate(180deg)); } &::after { opacity: $banner-background-visible; } } .fa-chevron-down { @include transition(all $chevron-rotate-effect-speed linear); } &.ambassador_banner-text-no_ambassador { background-image: none; background-color: $banner-unassigned-bg-color; } } .ambassador_banner-text-content { display: inline-block; vertical-align: middle; } .ambassador_banner-text-name { max-width: $banner-text-max-width; vertical-align: middle; } .ambassador_banner-dropdown_container { position: absolute; top: $ambassador-banner-text-height; left: 0; visibility: hidden; width: 100%; transform: translateY(-100%); @include transition(all $dropdown-entrance-and-exit-effect-speed ease-in); z-index: $in-front-of-primary-nav-but-behind-banner; pointer-events: none; &.open { opacity: 1; transform: translateY(0%); pointer-events: auto; visibility: visible; } } .ambassador_banner-dropdown { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; align-items: center; justify-content: center; background-image: $banner-background-gradient; border-top: 2px solid transparentize($color-white, 0.9); } .ambassador_banner-dropdown-avatar { width: $ambassador-avatar-size; height: $ambassador-avatar-size; align-self: flex-start; margin: 0; margin-right: $padding-large-horizontal * 2; padding: 0; border-radius: 50%; border: 4px solid $color-gray-100; box-shadow: 1px 1px 1px rgba(0,0,0,0.2); } .ambassador_banner-dropdown-info { max-width: 100%; overflow: hidden; } .ambassador_banner-dropdown-info-secondary { margin-top: $padding-large-vertical; } .ambassador_banner-dropdown-info-main-rank { color: transparentize($color-white, 0.3); } .ambassador_banner-dropdown-info-main-location { color: transparentize($color-white, 0.2); } .ambassador_banner-dropdown-info .ambassador_banner-dropdown-info-link { // specificity needed to override style guide link styles display: inline-block; max-width: 100%; color: $color-white; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; } .ambassador_banner-dropdown-info-link_icon { padding-right: $padding-xs-horizontal; } .ambassador_banner-dropdown-info .ambassador_banner-dropdown-info-action_link { // specificity needed to override style guide link styles overflow: visible; // keeps links aligned with the pipe in between them @media screen and (max-width: $screen-xs) { display: block; } } .ambassador_banner-dropdown-info-action_link-hide { @media screen and (max-width: $screen-xs) { display: none; } }