/* ==========================================================================
   A TERM IN THE DESCRIPTION, EXPLAINED WHERE IT IS (pdp-terms.js): a card beside the term on a wide screen
   (as Wikipedia's page previews), a sheet from the bottom on a phone. One text size; the term's name set
   apart by weight. Over the product sheet (_PdpmSheets, z-index 2000) and the contents button (2010).
   ========================================================================== */
.tc-term-card {
    position: absolute;
    z-index: 2030;
    box-sizing: border-box;
    padding: 14px 16px 12px;
    border-radius: 14px;
    background: #FFF;
    box-shadow: 0 0 0 .5px rgba(0, 0, 0, .08), 0 10px 32px rgba(17, 21, 28, .16);
    color: #3A4250;
    direction: rtl;
    text-align: right;
    font-size: 15px;
    line-height: 1.9;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity .15s, transform .15s, visibility 0s .15s;
}

.tc-term-card.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .15s, transform .15s;
}

.tc-term-card.is-above {
    transform: translateY(-4px);
}

.tc-term-card.is-open.is-above {
    transform: none;
}

/* the arrow, at the term */
.tc-term-card::before {
    content: "";
    position: absolute;
    top: -6px;
    left: calc(var(--tc-term-arrow, 50%) - 6px);
    width: 12px;
    height: 12px;
    background: #FFF;
    box-shadow: -1px -1px 0 rgba(0, 0, 0, .06);
    transform: rotate(45deg);
}

.tc-term-card.is-above::before {
    top: auto;
    bottom: -6px;
    box-shadow: 1px 1px 0 rgba(0, 0, 0, .06);
}

.tc-term-card__title,
.tc-term-sheet__title {
    margin: 0 0 4px;
    color: #141A23;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.7;
}

.tc-term-card__body,
.tc-term-sheet__body {
    color: #3A4250;
    font-size: 15px;
    line-height: 1.9;
}

.tc-term-card__body p,
.tc-term-sheet__body p {
    margin: 0 0 6px;
}

.tc-term-card__body > :last-child,
.tc-term-sheet__body > :last-child {
    margin-bottom: 0;
}

.tc-term-sheet {
    position: fixed;
    inset: 0;
    z-index: 2030;
    visibility: hidden;
    transition: visibility 0s .3s;
}

.tc-term-sheet.is-open {
    visibility: visible;
    transition: none;
}

.tc-term-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 21, 28, .45);
    opacity: 0;
    transition: opacity .25s;
}

.tc-term-sheet.is-open .tc-term-sheet__backdrop {
    opacity: 1;
}

.tc-term-sheet__panel {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    max-height: 70vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
    padding: 6px 20px calc(20px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    background: #FFF;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, .12);
    direction: rtl;
    text-align: right;
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}

.tc-term-sheet.is-open .tc-term-sheet__panel {
    transform: none;
}

.tc-term-sheet__grip {
    display: block;
    width: 36px;
    height: 4px;
    margin: 4px auto 8px;
    border-radius: 2px;
    background: #DCE0E6;
}

.tc-term-sheet__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.tc-term-sheet__title {
    margin: 6px 0 0;
}

.tc-term-sheet__close {
    flex: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #F3F4F6;
    color: #141A23;
    cursor: pointer;
}

.tc-term-sheet__close svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

@media (prefers-reduced-motion: reduce) {
    .tc-term-card,
    .tc-term-sheet__panel,
    .tc-term-sheet__backdrop {
        transition: none;
    }
}

@media print {
    .tc-term-card,
    .tc-term-sheet {
        display: none;
    }
}
