/* Extracted from ui/templates/components/table/table.html. Linked via sekizai so a page loads it once,
   however many instances it renders. */

.manual-table,
.manual-table * {
    box-sizing: border-box;
    font-family: "NYU Perstare", sans-serif;
}

.manual-table {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-bottom: 40px;
    overflow: hidden;
}

.manual-table code {
    padding: 0.08em 0.3em;
    border: 1px solid #D8C7E8;
    border-radius: 3px;
    background: #F6F1FA;
    color: #3B1A5A;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
        "Liberation Mono", monospace;
    font-size: 0.9em;
}

.manual-table__title {
    margin: 0 0 12px;
    color: #161616;
    font-size: 32px;
    line-height: 41px;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.manual-table--header-purple .manual-table__title {
    color: #57068C;
}

/* "Override" header style: the title keeps the component's type scale --
   size, weight, letter-spacing and the phone breakpoint below -- so it
   still sits in the page like every other table title. What it stops
   imposing is the two things the editor cannot otherwise win: the fixed
   color, and the uppercasing that overrode whatever case was typed.
   (Header style is a single field, so --header-override and
   --header-purple are mutually exclusive; no specificity fight.) */
.manual-table--header-override .manual-table__title {
    color: inherit;
    text-transform: none;
}

/* The title is rich text, so the editor wraps it in block tags
   (<p>, sometimes a heading). Flatten those into the h2 rather than
   letting them add their own margins or type scale. */
.manual-table__title p,
.manual-table__title div,
.manual-table__title h1,
.manual-table__title h2,
.manual-table__title h3,
.manual-table__title h4,
.manual-table__title h5,
.manual-table__title h6 {
    display: inline;
    margin: 0;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

.manual-table__title a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.manual-table__description {
    max-width: 780px;
    margin: 0 0 24px;
    color: #4B4B4B;
    font-size: 15px;
    line-height: 22px;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.manual-table__wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
    padding: 6px 18px 6px 3px;
}

.manual-table__table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.manual-table__table thead {
    position: relative;
    z-index: 5;
}

.manual-table__table th {
    position: relative;
    z-index: 5;
    height: 36px;
    padding: 0 12px 8px;
    border-bottom: 2px solid #161616;
    background: #FFFFFF;
    color: #4B4B4B;
    font-size: 14px;
    line-height: 18px;
    font-weight: 400;
    text-align: left;
    letter-spacing: -0.04em;
    vertical-align: bottom;
}

.manual-table--header-purple .manual-table__table th {
    padding: 14px 16px;
    border-bottom: 0;
    background: #57068C;
    color: #FFFFFF;
    font-weight: 800;
    letter-spacing: 0;
    vertical-align: middle;
}

.manual-table--header-purple .manual-table__table th + th {
    border-left: 1px solid rgba(22, 22, 22, 0.24);
}

.manual-table__table tbody tr {
    position: relative;
    min-height: 54px;
    transform-origin: center;
    transition:
        background-color 180ms ease,
        transform 180ms ease,
        box-shadow 180ms ease;
}

.manual-table__table tbody tr:nth-child(even) {
    background: #F4F4F4;
}

.manual-table__table tbody tr:nth-child(odd) {
    background: #FFFFFF;
}

.manual-table__table tbody tr:hover {
    background: #FAF5FF;
    transform: translateX(3px);
    box-shadow:
        -3px 0 0 #57068C,
        0 8px 18px rgba(0, 0, 0, 0.10);
    z-index: 2;
}

.manual-table__table tbody tr:hover td {
    background: #FAF5FF;
}

.manual-table__table td {
    min-height: 54px;
    padding: 12px;
    color: #000000;
    font-size: 14px;
    line-height: 18px;
    font-weight: 400;
    letter-spacing: -0.04em;
    vertical-align: top;
    min-width: 0;
    overflow-wrap: anywhere;
    transition: background-color 180ms ease;
}

.manual-table__table td + td {
    border-left: 1px solid #DDE3EC;
}

.manual-table__table td.manual-table__cell--bold,
.manual-table__cell--bold .manual-table__cell-main {
    font-weight: 800;
}

.manual-table__cell--align-left {
    text-align: left;
}

.manual-table__cell--align-center {
    text-align: center;
}

.manual-table__cell--align-right {
    text-align: right;
}

.manual-table__cell-main {
    display: block;
}

.manual-table__cell-description {
    display: block;
    margin-top: 4px;
    color: #64748B;
    font-size: 12px;
    line-height: 17px;
    font-weight: 400;
    letter-spacing: 0;
}

.manual-table__link {
    color: #57068C;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.manual-table__link:hover,
.manual-table__link:focus-visible {
    color: #3a0066;
}

.manual-table__empty {
    padding: 22px 24px;
    background: #F7F7F7;
    color: #4B4B4B;
    font-size: 14px;
    line-height: 20px;
}

@media (max-width: 700px) {
    .manual-table {
        overflow: visible;
    }

    .manual-table__title {
        font-size: 32px;
        line-height: 38px;
    }

    .manual-table__wrap {
        overflow-x: visible;
        padding: 0;
    }

    .manual-table__table,
    .manual-table__table tbody,
    .manual-table__table tr,
    .manual-table__table td {
        display: block;
        width: 100% !important;
        min-width: 0;
    }

    .manual-table__table {
        min-width: 0;
    }

    .manual-table__table thead {
        display: none;
    }

    .manual-table__table tbody tr {
        min-height: 0;
        border-bottom: 1px solid #DBDBDB;
    }

    .manual-table__table tbody tr:hover {
        transform: none;
        box-shadow: none;
    }

    .manual-table__table td {
        min-height: 0;
        padding: 14px 18px;
        font-size: 15px;
        line-height: 21px;
    }

    .manual-table__table td + td {
        border-left: 0;
    }

    .manual-table__cell--align-center,
    .manual-table__cell--align-right {
        text-align: left;
    }

    .manual-table__table td + td {
        padding-top: 0;
    }

    .manual-table__table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 6px;
        color: #4B4B4B;
        font-size: 12px;
        line-height: 16px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0;
    }

    .manual-table__table td[data-label=""]::before {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .manual-table__table tbody tr,
    .manual-table__table td {
        transition: none !important;
    }

    .manual-table__table tbody tr:hover {
        transform: none !important;
    }
}
