@font-face {
    font-family: 'Metric';
    src: url('../fonts/MetricWeb-Regular.woff');
}

:root {
    --min-touch-target: 64px;
    /* rough -- can be tweaked */
    --min-panel-height: 300px;
    /*current max is 1160*/
    --max-content-width: 1024px;
    --nmhcOrange: #d66228;
    --nmhcTop50White: #ffffff;
    --nmhcTop50FootnoteText: #777777;
    --nmhcTop50Blue: #5a7981;
    --nmhcTop50GrayDark: #555555;
    --nmhcTop50GrayBright: rgba(0, 0, 0, 0.18);
    font-size: 10px;
}


details > summary::-webkit-details-marker {
    display: none;
}

summary {
  position: relative;
}

h3 {
    color: var(--nmhcOrange);
    /*no wrap is temporary*/
    white-space: nowrap;
}


h6 {
    font-size: 1.8rem;
}

td > h3.table-cell__headline {
    white-space: normal;
    line-height: 1;
}

tbody#top50tbody tr td {
    line-height: 1;
}

tbody#top50tbody tr[id] {
  scroll-margin-top: 64px;
}

.top50__wrapper--outermost {
    /*max-width: var(--max-content-width);
    margin: 0 auto;*/
}

.top50__wrapper--outermost table {
    width: 100%;
}

.top50table__scrollableContainer {
    position: relative;
}

.width_50 {
    width: 50px;
}

.width_120 {
    width: 120px;
}

.padding_left_5 {
    padding-left: 5px;
}

.padding_left_10 {
    padding-left: 10px;
}

.padding_left_15 {
    padding-left: 15px;
}

.padding_right_10 {
    padding-right: 10px;
}
.padding_right_15 {
    padding-right: 15px;
}


.currentRank {
    font-size: 50px;
}

table {
    font-family: 'Metric', Arial, sans-serif;
    font-size: 1.6rem;
    box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.18);
}

thead {
    background-color: var(--nmhcTop50Blue);
    height: var(--min-touch-target);
    color: #fff
}

tbody#top50tbody > tr {
    position: relative;
    height: var(--min-touch-target);
    vertical-align: middle;
    border-bottom: 1px solid var(--nmhcTop50GrayBright);
    font-size: 18px;
    background-color: var(--nmhcTop50White);
}

tbody#top50tbody > tr.details_wrapper_row {
    height: 0;
    border: 0;
}

th,
td {
    padding: 1.6rem;
}

th {
    vertical-align: middle;
}

/** some th elements lie outside the head **/
thead th {
    line-height: 16px;
    padding: 5px 0 5px 0;
    background-color: var(--nmhcTop50Blue);
    color: #fff;
    z-index: 1;
    font-size: 15px;
}


details {
    position: absolute;
    /* donT specify top because table rows canT contain absolute stuff -- will go all the way to top */
    /* top: 0; */
    left: 0;
    width: 100%;
    border:none;
}

summary:hover {
    cursor: pointer;
}

.top50__col:first-child {
  flex-basis: 50%;
}

.top50__col {
    flex-grow: 1;
    flex-basis: 25%;
    overflow: hidden;
    margin-right: 20px;
}

.table-cell__headline {
    margin: 0;
}

/* logical states*/

[data-historical="hasHistorical"] {}

[data-historical="none"] {}

[data-breakdown="hasBreakdown"] {}


[data-breakdown="none"] .top50__breakdown {
    /* visibility: hidden; */
    margin-right: 0;
}

.white_background {
    background-color: var(--nmhcTop50White);
}

.blue_background {
    background-color: var(--nmhcTop50Blue);
}

.white_text {
    color: var(--nmhcTop50White);
}

.blue_text {
    color: var(--nmhcTop50Blue);
}

.gray_text {
    color: var(--nmhcTop50GrayDark);
}

.orange_text {
    color: var(--nmhcOrange);
}

.top50__col > h6 {
    color: #cccccc;
    font-size: 18px;
    border-top: 1px solid #cccccc;
    padding-top: 5px;
    margin-bottom: 10px;
    line-height: 100%;
    font-weight: inherit;
    letter-spacing: 0;
}

.top50__col > div {
    border-top: 1px solid #cccccc;
    margin-bottom: 22px;
    padding-top: 5px;
}

.top50__info > p {
    font-family: Metric,sans-serif;
    font-size: 1.6rem;
    line-height: 16px;
}

.top50__breakdown > div > dl > dt {
    font-family: Metric,sans-serif;
    font-size: 1.6rem;
    line-height: 16px;
    font-weight: normal;
    width: 55%;
    float: left;
}

dd.numField {
    font-family: Metric,sans-serif;
    font-size: 1.6rem;
    line-height: 16px;
    margin-left: 60%;
    text-align: left;
}

.top50__link,
.top50__link:hover,
.top50__link:active,
.top50__link:visited {
    font-family: Metric,sans-serif;
    font-size: 1.6rem;
    color: var(--nmhcTop50White);
    text-decoration: underline;
    display: block;
}

/* end logical states*/

@media (max-width: 420px) {

    .top50table__scrollableContainer {
        width: 300px;
    }

    td > h3.table-cell__headline {
        width: 150px;
    }

}

@media (min-width: 421px) and (max-width: 736px) {

    .top50table__scrollableContainer {
        width: 400px;
    }

    td > h3.table-cell__headline {
        width: 200px;
    }

}

@media (max-width: 736px) {

    .desktop-and-tablet-only {
        display: none;
    }

    tbody#top50tbody,
    tbody#top50tbody tr,
    tbody#top50tbody td {
        display: block;
    }

    tbody#top50tbody tr:not(.details_wrapper_row) {
        border: 1px solid #ccc;
        border-bottom: 0;
        height: 100%;
        padding: 5px 0 15px;
        background-color: var(--nmhcTop50White);
    }

    tbody#top50tbody tr:not(:first-of-type):not(.details_wrapper_row) {
        margin-top: 15px;
    }

    .top50table__scrollableContainer {
        align-items: center;
        position: relative;
        margin: 0 auto;
        padding: 0;
        overflow: inherit;
    }

    /* Label the data */
    tbody#top50tbody tr:not(.details_wrapper_row) td:nth-of-type(1):not(:empty):before {
        content: "Current Rank";
    }

    tbody#top50tbody tr:not(.details_wrapper_row) td:nth-of-type(2):not(:empty):before {
        content: "Previous Rank";
    }

    tbody#top50tbody tr:not(.details_wrapper_row) td:nth-of-type(3):not(:empty):before {
        content: "Company Name";
    }

    tbody#top50tbody tr:not(.details_wrapper_row) td:nth-of-type(4):not(:empty):before {
        content: "Current Units";
    }

    tbody#top50tbody tr:not(.details_wrapper_row) td:nth-of-type(5):not(:empty):before {
        content: "Previous Units";
    }

    tbody#top50tbody tr:not(.details_wrapper_row) td:nth-of-type(6):not(:empty):before {
        content: "Corporate Officer";
    }

    tbody#top50tbody tr:not(.details_wrapper_row) td:nth-of-type(7):not(:empty):before {
        content: "HQ City";
    }

    tbody#top50tbody tr:not(.details_wrapper_row) td:nth-of-type(8):not(:empty):before {
        content: "HQ State";
    }

    tbody#top50tbody tr td {
        font-size: 18px;
        padding-left: 50%;
        text-align: left;
    }

    tbody#top50tbody tr {
        border-top: 1px solid rgba(0, 0, 0, 0.3);
    }

    tbody#top50tbody tr td:before {
        position: absolute;
        left: 6px;
        padding-right: 10px;
        white-space: nowrap;
    }

    td.numField {
        text-align: center;
    }

    tbody#top50tbody tr td h3 {
        font-size: 18px;
        text-align: left;
    }

    summary {
        height: 175px;
        width: 100%;
        background: transparent;
        outline: none;
        margin-top: -175px;
    }
    details[open] summary {
        position: relative;
        top: -800px;
    }

    details[open] {
        position: absolute;
        top: 0px;
    }

    details[open] + .EXPANDO {
        margin-bottom: 800px;
    }

    .company-details-panel {
        display: flex;
        min-height: var(--min-panel-height);
        background-color: var(--nmhcTop50GrayDark);
        color: #fff;
        padding: 1.6rem;
        position: relative;
        top: -800px;
    }

    .top50__row {
        flex-wrap: wrap;
    }

    details .top50__marker {
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      bottom: -1.2rem;
      width: 0;
      height: 0;
      border-right: 1.2rem solid transparent;
      border-left: 1.2rem solid transparent;
      border-top: 1.2rem solid  var(--nmhcTop50GrayDark);
    }
}

@media (min-width: 737px) {

    td.numField {
        text-align: right;
    }

    td.wide_responsive {
        padding-right: 10px;
    }

    tbody#top50tbody tr td {
        height: 80px;
        z-index: 999;
    }

    tbody#top50tbody tr td.details_wrapper {
        height: 0;
        margin: 0;
        padding: 0;
    }

    tbody#top50tbody > tr.details_wrapper_row:hover {
        background-color: var(--nmhcTop50White);
    }

    summary {
        height: 80px;
        width: 100%;
        background: transparent;
        margin-top: -80px;
        outline: none;
    }

    details[open] {
        min-height: 380px;
    }

    details[open] + .EXPANDO {
        margin-bottom: 330px;
    }

    details .top50__marker {
      position: absolute;
      top: 50%;
      left: 0;
      transform: translateY(-50%);
      width: 0;
      height: 0;
      border-top: 1.2rem solid transparent;
      border-bottom: 1.2rem solid transparent;
      border-left: 1.2rem solid var(--nmhcTop50GrayDark);
    }

    .company-details-panel {
        display: flex;
        min-height: var(--min-panel-height);
        background-color: var(--nmhcTop50GrayDark);
        color: #fff;
        padding: 1.6rem;
    }

    /* comment following two blocks when summary is still blocking hovering on tr */
    /*tbody#top50tbody > tr:hover {
        background-color: var(--nmhcTop50Blue);
        color: var(--nmhcTop50White);
    }

    tr:hover .table-cell__headline,
    tr:active .table-cell__headline,
    tr:focus .table-cell__headline,
    tr:hover .currentRank,
    tr:active .currentRank,
    tr:focus .currentRank {
        color: var(--nmhcTop50White);
    }*/
}

@media (max-width: 767px) {

    .desktop-only {
        display: none;
    }

    th,
    td {
        padding: 0 .8rem;
    }

    th.min-cell-size--mobile,
    td.min-cell-size--mobile {
        width: 1px;
        padding: 0;
    }

    .top50__col {
        width: 50%;
        flex-basis: 50%;
    }

    th.mobile-only {
        vertical-align: top;
    }

    th.wider_responsive {
        width: 100px;
        padding-left: 0px;
    }

    th.thinner_responsive {
        width: 30px;
    }

    td.wide_responsive,
    th.wide_responsive {
        padding-left: 15px;
    }
}

@media (min-width: 768px) {
    .mobile-only {
        display: none;
    }

    th.normal_responsive {
        width: 100px;
    }

    th.wider_responsive {
        width: 120px;
        padding-left: 15px;
    }

    td.wide_responsive,
    th.wide_responsive {
        padding-left: 15px;
    }

    th.thinner_responsive {
        width: 50px;
    }

}

@media (min-width: 737px) and (max-width: 980px) {
    th.wider_responsive {
        width: 50px;
        padding-left: 0px;
    }

    td.wide_responsive,
    th.wide_responsive {
        width: 70px;
    }

    th.normal_responsive {
        width: 50px;
    }

    th.thinner_responsive {
        width: 30px;
    }
}

details[open] .top50__marker {
  position: absolute;
  left: 25%;
  top: auto;
  bottom: 0;
  width: 0;
  height: 0;
  border-right: 1.6rem solid transparent;
  border-left: 1.6rem solid transparent;
  border-bottom: 1.6rem solid  var(--nmhcTop50GrayDark);
  border-top: 0;
  transform: translateY(0%);
}

/* styles from sortable BEGIN */
th[role=columnheader]:not(.no-sort) {
    cursor: pointer;
    position: sticky;
    top: 0;
}

th[role=columnheader]:not(.no-sort):after {
    content: '';
    position: absolute;
    border-width: 0 4px 4px;
    border-style: solid;
    border-color: #fff transparent;
    transform: translate(8px, 8px);

}

th[aria-sort=ascending]:not(.no-sort):after {
    border-bottom: none;
    border-width: 4px 4px 0;
}

th[aria-sort]:not(.no-sort):after {
    visibility: visible;
    opacity: 0.4;
}

th[role=columnheader]:not(.no-sort):hover:after {
    visibility: visible;
    opacity: 1;
}
/* styles from sortable END */

.main-content {
    overflow: visible;
}

.footNoteBox {
    font-family: Metric, sans-serif;
    color: var(--nmhcTop50FootnoteText);
    background-color: var(--nmhcTop50White);
    padding: 10px 15px;
    -webkit-box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.18);
    -moz-box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.18);
    box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.18);
    margin-bottom: 20px;
    margin-top: 20px;
}
