body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

nav {
    background-color: #3661B0;
}

h1 {
    color: #3661B0;
}

.heading, .hero {
    padding-top: 1px;
    padding-bottom: 1px;
    margin-bottom: 1em;
}

.heading-right {
    padding-top: 30px;
}

.old-instance-count {
    line-height: 1em;
    font-size:8rem;
}

@media only screen and (max-width: 992px) { /* small and medium screens */
    .old-instance-count {
        font-size:3rem;
    }
}

.total-instance-count {
    font-size:1.5rem;
}

.old-instance-count-chart__container {
    padding: 15px 15px 0 0;
    max-width: 450px;
}

#logo-container img {
    vertical-align: middle;
    margin-top: -5px;
}

.ssa-amis {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
}

.ssa-amis__item {
    width: 100%;
}

.ssa-table {
    max-width: 400px;
}
.ssa-table__heading {
    font-weight: bold;
}

.ssa-table__entry {
    padding: 3px;
    max-width: 400px;
}

.empty-ssaa-card {
    padding: 5px;
}

@media only screen and (min-width: 601px) {
    .ssa-amis {
        display: flex;
        flex-flow: row wrap;
        justify-content: space-between;
    }

    .ssa-amis:after {
        content: "";
        flex: 0 0 49%;
    }

    .ssa-amis__item {
        flex: 0 0 49%;
    }
}

@media only screen and (min-width: 1200px) {
    .ssa-amis__item {
        flex: 0 0 32%;
    }

    .ssa-amis:after {
        content: "";
        flex: 0 0 32%;
    }
}

.amis-list__item {
    width: 100%;
}

@media only screen and (min-width: 601px) {
    .amis-list {
        display: flex;
        flex-flow: row wrap;
        justify-content: space-between;
    }

    .amis-list:after {
        content: "";
        flex: 0 0 49%;
    }

    .amis-list__item {
        flex: 0 0 49%;
    }
}

@media only screen and (min-width: 1200px) {
    .amis-list:after {
        content: "";
        flex: 0 0 32%;
    }

    .amis-list__item {
        flex: 0 0 32%;
    }
}

.ami-badge {
    display: flex;
    position: relative;
    margin: 10px 0;
    border-radius: 20px;
}

.ami-badge__description {
    flex: 1;
}

.ami-badge__link {
    display: block;
    padding: 10px 5px 10px 5px;
}

.ami-badge__info {
    flex: 0 0 58px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ami-badge__instances_count {
    background-color: #E6E6E6;
}

.ami-badge__age {
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

.ami-badge__icon-container {
    flex: 0 0 35px;
    align-self: center;
    margin-right: 4px;
}

.ami-badge__icon {
    width: 35px;
    vertical-align: middle;
}

.ami-header {
    background-color: #3661B0 !important;
}

.ami-header--title {
    float: left;
    padding: 12px;
}

.modal.ami-modal {
    border-radius: 0;
    width: 88%;
    max-height: 88%;
}

.modal.ami-modal .modal-footer {
    border-radius: 0;
}

.modal.ami-modal .modal-content {
    padding: 12px;
}

.ami-details__container {
    display: flex;
}

.ami-details--this-ami {
    display: flex;
    flex-basis: 50%;
    padding-right: 5px;
    border-right: solid 1px #ccc;
}
.ami-details--upgrade {
    display: flex;
    flex-basis: 50%;
    padding-left: 5px;
    min-height: 180px;
}
.ami-details__table--container {
    padding: 5px;
}

.ami-details__table td, .ami-details__table th {
    padding: 5px;
    word-wrap: break-word;
}

.ami-details__table--tag-row {
    border-bottom: none !important;
}

.tags__table th {
    padding: 0;
    font-weight: normal;
}
.tags__table td {
    padding: 0;
}

.upgrade-image {
    background-position: center;
    background-repeat: no-repeat;
}

.no-ami-upgrade--message {
    font-weight: bold;
    margin: 20px auto;
}

.ami-usage-title {
    margin-top: 40px;
    font-size: x-large;
}

.ami-usage-title--label {
    color: #3661B0; !important;
}

.ami-usage-title--info {
    color: #9e9e9e !important;
}

.ami-usage--message {
    font-size: large;
    margin-top: 20px;
    margin-bottom: 5px;
}

.ami-usage--table {
    margin-top: 10px;
    margin-bottom: 40px;
}

.instance-details-table__heading {
    padding-top: 0;
    padding-bottom: 10px;
}

.instance-details-table__entry {
    padding-bottom: 5px;
}

.upgrade-image--green {
    background-image: url("/assets/images/upgrade-images/upgrade-ami-green.png");
}
.upgrade-image--amber {
    background-image: url("/assets/images/upgrade-images/upgrade-ami-amber.png");
}
.upgrade-image--red {
    background-image: url("/assets/images/upgrade-images/upgrade-ami-red.png");
}
.upgrade-image--black {
    background-image: url("/assets/images/upgrade-images/upgrade-ami-black.png");
}
.no-upgrade-image--green {
    background-image: url("/assets/images/upgrade-images/no-upgrade-ami-green.png");
}
.no-upgrade-image--amber {
    background-image: url("/assets/images/upgrade-images/no-upgrade-ami-amber.png");
}
.no-upgrade-image--red {
    background-image: url("/assets/images/upgrade-images/no-upgrade-ami-red.png");
}
.no-upgrade-image--black {
    background-image: url("/assets/images/upgrade-images/no-upgrade-ami-black.png");
}
.unkown-upgrade-image {
    background-image: url("/assets/images/upgrade-images/unknown-upgrade-ami.png");
}
.dist-eol {
    background-image: url("/assets/images/upgrade-images/dist-eol.png");
}

@media only screen and (min-width: 1200px) {
    .modal.ami-modal {
        width: 75%;
    }
}
@media only screen and (max-width: 992px) {
    .modal.ami-modal {
        width: 98%;
    }

    .ami-details__container {
        font-size: 0.8rem;
    }
}
@media only screen and (max-width: 670px) {
    .modal.ami-modal {
        width: 98%;
    }

    .ami-details__container {
        flex-direction: column;
        font-size: 1rem;
    }

    .ami-details--this-ami {
        padding: 0;
        margin-bottom: 20px;
        border-right: none;
    }
    .ami-details--upgrade {
        padding: 0;
    }

    .no-ami-upgrade--message {
        margin-top: 0;
    }

    .no-upgrade-image {
        background-position-y: bottom;
    }
}

/* Percentiles */
.percentiles {
    display: flex;
    margin-top: 1.5em;
}

.percentiles-col {
    position: relative;
    text-align: center;
    font-size: 14px;
    background: #e4e4e4;
    flex: 4;
}

.percentiles-col span {
    position: relative;
    display: block;
    left: -50%;
    padding: 6px 0;
}

.percentiles-col:nth-child(1) {
    min-width: 8em;
}

.percentiles-col:nth-child(1) span {
    color: #9e9e9e;
    text-align: left;
    left: 0;
    padding-left: 0.3em;
}

.percentiles-col:before,
.percentiles-col:after {
    font-size: 14px;
    font-weight: normal;
    position: absolute;
    top: -1.5em;
    left: -1em;
}

.percentiles-col:nth-child(1):before {
    content: 'Percentiles:';
    font-size: 14px;
    color: #9e9e9e;
    left: 0;
    padding-left: 0.3em;
}

.percentiles-col:nth-child(2):before {
    content: '25th';
    color: #9e9e9e;
}

.percentiles-col:nth-child(3):before {
    content: '50th';
    color: #9e9e9e;
}

.percentiles-col:nth-child(4):before {
    content: '75th';
    color: #9e9e9e;
}

.percentiles-col:nth-child(4):after {
    content: '';
    color: #9e9e9e;
    left: auto;
    right: 0;
}

/* Index charts */
#charts-container {
    padding-top: 1em;
}

.charts-nav__tabs {
    background-color: transparent;
    font-size: 12px;
}

.charts__chart-container {
    background-color: #e4e4e4;
}

.charts__chart {
    padding: 0.4em;
}

/* overwriting Materialize tabs style */
.charts-nav__tab .active{
    background-color: #e4e4e4;
}

.charts-nav__tabs .indicator {
    display: none;
}
