/**
 * Styling for the pricing page features table inner table row module.
 */

section.features-table .row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

section.features-table .row:nth-of-type(odd) {
    background-color: var(--color-bg-surface-1);
}

section.features-table .row .row-name {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-3);
    font: var(--font-copy-md-bold);
    text-align: unset;
}

section.features-table .row > * {
    text-align: center;
    padding: var(--spacing-6) var(--spacing-5);
}

section.features-table .row .row-name,
section.features-table .row .plan-offering:not(:last-child) {
    border-right: 1px solid var(--color-grey-150);
}
section.features-table .row .row-name .icon-box {
    --icon-size: 16px;
}

section.features-table .row .row-name .icon-box .icon.info {
    width: var(--spacing-5);
    padding: var(--spacing-2) 0;
}

section.features-table .row .plan-offering .plan-type {
    display: none;
}

section.features-table .row.icons .plan-offering .icon-box {
    margin: 0 auto;
}

/* region Tooltip overrides */

section.features-table .row .row-name .icon-box.tooltip.top:before {
    margin-bottom: var(--spacing-3);
    transform: translateX(calc(-50% * var(--dir-math)));
}

section.features-table .row .row-name .icon-box.tooltip.long.top:before {
    width: 250px;
    white-space: unset;
}

section.features-table .row .row-name .icon-box.tooltip.top:after {
    bottom: 60%;
}

/* endregion */


/* Breakpoint M */
@media screen and (min-width: 768px) and (max-width: 1080px) {
    section.features-table .row .row-name {
        width: 130px;
    }
}

/* Breakpoint S */
@media screen and (min-width: 0) and (max-width: 768px) {
    section.features-table .row {
        display: flex;
        flex-direction: column;
        border: 1px solid var(--color-grey-150);
    }

    section.features-table .row:nth-of-type(odd) {
        background-color: unset;
    }

    section.features-table .row .row-name {
        background-color: var(--color-grey-50);
        padding-top: var(--spacing-7);
        padding-bottom: var(--spacing-7);
    }

    section.features-table .row > * {
        background-color: unset;
        text-align: unset;
    }

    section.features-table .row > *:not(:last-child) {
        border-bottom: 1px solid var(--color-grey-150);
    }

    section.features-table .row .row-name,
    section.features-table .row .plan-offering:not(:last-child) {
        border-right: unset;
    }

    section.features-table .row .plan-offering {
        display: flex;
        flex-direction: row;
        gap: var(--spacing-3);
        padding: var(--spacing-5);
    }

    section.features-table .row .plan-offering .plan-type {
        display: inherit;
        font: var(--font-copy-md-bold);
    }

    section.features-table .row .plan-offering > * {
        flex-basis: 0;
        flex-grow: 1;
    }

    section.features-table .row .row-name .icon-box.tooltip.top:before {
        transform: translateX(-86%);
    }
}
