.am-container {
    height: 100%;
}

.am-button {
    position: relative;
}

.am-button .am-monitor__indicator-mobile {
    display: none;
    position: absolute;
    top: .25rem;
    right: .25rem;
    border-radius: 50%;
    width: .65rem;
    height: .65rem;
    background-color: #ff9800;
}
.security-am .am-monitor__indicator-mobile {
    background-color: #dc3545;
}

.am-button .am-monitor__count {
    display: inline-block;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 20px;
    min-width: 20px;

    color:#fff;
    background-color: #ff9800;
    font-weight: bold;

    border-radius: 4px;
}
.am-button.security-am .am-monitor__count {
    color:#fff;
    background-color: #dc3545;
}
.am-container div.am-list {
    position: absolute;
    top: 48px;
    right: 2%;
    height: auto;
    z-index: 0;
    padding: 2em;
    text-align: left;
    display: block;
    background-color: #fff;
    background-color: var(--background);
    border-radius: 5px;

    /* Darken the box shadow to make the popup visible over the search box  */
    box-shadow: 0 1px 7px 0 rgba(0,0,0,0.3);

    transition: all .15s cubic-bezier(.84,.03,.21,.96);
    opacity: 0;
    transform: scale(0);
}
.am-container.visible div.am-list {
    opacity: 1;
    transform: scale(1);
    z-index: 1000;
}
.am-container.visible .am-button {
    background-color: #404040;
    background-color: var(--header-link-bg-classic-active);
    text-decoration: none;
}
.am-container .am-button:after {
    content: '';
    display: inline-block;
    position: absolute;
    bottom: 0;
    left: 32%;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid #fff;
    opacity: 0;
    transition: all .05s;
    z-index: 1001;
}
.am-container.visible .am-button:after {
    opacity: 1;
    transition: all .25s;
}
.am-container .am-message {
    display: block;
    line-height: 1.4em;
    margin-bottom: 1.4em;
}

.am-message-list {
    padding: 0;
}

.am-container .am-message .alert form {
    position: relative;
    float: right;
    margin: -6px 0 0 0 !important;

}

.am-container .am-message .alert form span {
    margin: 0 0 0 4px !important;
}

.am-container .am-message .alert {
    margin-bottom: 0 !important;
}

.am-container .am-message dl dt::after {
    content: ": ";
}

/* Restore hyperlink style overriden by the page header */
.am-container .am-list a:link {
    display: inline-block;
    color: #204A87;
    color: var(--link-color);
    text-decoration: underline;
    margin-right: 0;
    padding: 0;
    font-weight: 600;
    font-weight: var(--link-font-weight);
}
.am-container .am-list a:visited {
    color: #5c3566;
    color: var(--link-color);
}
.am-container .am-list a:hover,
.am-container .am-list a:focus,
.am-container .am-list a:active {
    color: #5c3566;
    color: var(--link-color);
    background-color: transparent;
    text-decoration: underline;
    text-decoration: var(--link-text-decoration--hover);
}

.am-container .am-list .alert-success a {
    color: #155724;
    color: var(--alert-success-text-color);
}


.am-container .am-list .alert-info a {
    color: #31708f;
    color: var(--alert-info-text-color);
}

.am-container .am-list .alert-warning a {
    color: #8a6d3b;
    color: var(--alert-warning-text-color);
}

.am-container .am-list .alert-danger a {
    color: #a94442;
    color: var(--alert-danger-text-color);
}

@media screen and (max-width: 576px) {
    /* Hide non-security monitors on mobile view to avoid messing up the heading */
    #visible-am-container {
       display: none;
    }
}

@media screen and (max-width: 768px) {
    .am-button .am-monitor__indicator-mobile {
        display: block;
    }
    .am-button .am-monitor__count {
        display: none;
    }
}
