/* ---------- Product card additions (t91_card in includes/demo.php), proposal B ---------- */

/* Play style: the label speaks, the style itself is hand-lettered like the line roles in home. */
.pc__style {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: .8125rem;
    font-weight: 700;
}

.pc__style .hand {
    display: inline-block;
    font-size: 1.0625rem;
    line-height: 1;
    color: var(--accent);
    /* Permanent Marker sits high on its line box: nudge it onto the label's optical centre. */
    transform: translateY(2px) rotate(-4deg);
}

/* ---------- Members badge (t91_member_badge): T91 disc + "Membri", then the price ----------
   Colours follow the context: chalk pill on the black page, black pill on chalk plates. */

.mb {
    position: relative;
    z-index: 2;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}

.mb__badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 12px 0 3px;
    border: 0;
    border-radius: 999px;
    /* The membership is the orange's commercial job: the badge carries it on every card. */
    background: var(--orange);
    color: #0c0c0c;
    font: inherit;
    font-size: .8125rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: transform .2s var(--ease);
}

.mb__badge:hover {
    transform: translateY(-1px);
}

.mb__badge[aria-expanded="true"] {
    box-shadow: 0 0 0 3px var(--on-ink), 0 0 0 5px var(--orange);
}

.mb__badge:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
}

.mb__disc {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #f2f0ec;
    color: #0c0c0c;
}

.mb__disc svg {
    width: 70%;
    height: auto;
    fill: currentColor;
}

.mb__price {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
}

.mb__tip {
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    z-index: 30;
    display: grid;
    gap: 8px;
    width: min(280px, calc(100vw - 32px));
    padding: 16px 18px;
    /* Inverts with its context: chalk on the black page, black on chalk plates. */
    background: var(--ink);
    color: var(--on-ink);
    /* The ring keeps the edge readable where the explainer spills off a plate onto the page. */
    box-shadow: 0 0 0 2px var(--on-ink), 0 18px 40px -14px rgba(0, 0, 0, .6);
    font-size: .875rem;
    line-height: 1.4;
    font-weight: 500;
    text-align: left;
    animation: mb-in .25s var(--ease);
}

.mb__tip.is-flip {
    left: auto;
    right: 0;
}

.mb__tip b {
    font-size: 1rem;
    font-weight: 800;
}

.mb__tip a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    font-weight: 800;
}

@keyframes mb-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
}

.pc__member {
    margin: 4px 0 2px;
}

/* ---------- On-court ratings (t91_rating_bars): ten marker dashes, the score filled ---------- */

.rate-bars {
    display: grid;
    gap: 18px;
    margin: 0;
}

.rate-bars div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    align-items: baseline;
}

.rate-bars dt {
    font-size: .9375rem;
    font-weight: 700;
}

.rate-bars dd {
    display: contents;
}

.rate-bars b {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--fd);
    font-variation-settings: var(--fd-var);
    line-height: 1;
    letter-spacing: 0;
}

.rate-bars small {
    font-size: .6em;
    opacity: .6;
}

.rate-bars__ticks {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 5px;
}

.rate-bars__ticks i {
    height: 8px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 2px var(--ink-line);
}

/* Filled ticks are marker marks, so they take the accent. */
.rate-bars__ticks i.is-on {
    background: var(--accent);
    box-shadow: none;
}

/* ---------- Review stars (product page, home voices) ---------- */

.stars {
    display: inline-flex;
    gap: 2px;
    color: var(--accent);
}

.stars .ico {
    width: 1em;
    height: 1em;
    fill: currentColor;
    stroke-width: 1.5;
}

.stars--4 .ico:nth-child(5) {
    fill: none;
}

/* ---------- Chalk bands: the page alternates black and chalk sections ----------
   Plates on a chalk band step one shade darker so the product still sits on something. */

.on-ink .pc__media,
.on-ink .pc[data-line]:not([data-line=""]) .pc__media {
    background: var(--paper-2);
}

.on-ink .mark-t91--bg {
    color: rgba(12, 12, 12, .07);
}

.on-ink .chip:hover,
.on-ink .chip:hover span {
    background: rgba(12, 12, 12, .07);
}

/* ---------- Club T91 member card: a chalk card with the mark printed big, fanned over a black one.
   Shared by the home hero and the membership page; each page places it. ---------- */

.mcard {
    position: relative;
    aspect-ratio: 1.586;
    container-type: inline-size;
    filter: drop-shadow(0 36px 32px rgba(0, 0, 0, .55));
}

.mcard__back,
.mcard__front {
    position: absolute;
    inset: 0;
    border-radius: 4cqi;
}

/* A black card fanned out behind: the club has more than one member. */
.mcard__back {
    background: #1a1a1a;
    box-shadow: inset 0 0 0 1px rgba(242, 240, 236, .16);
    transform: translate(9%, -16%) rotate(9deg);
}

.mcard__back svg {
    position: absolute;
    right: 7cqi;
    top: 6cqi;
    width: 18cqi;
    fill: #f2f0ec;
}

/* The chalk card carries the brush mark itself, printed big and bleeding off the edge. */
.mcard__front {
    overflow: hidden;
    background: #f2f0ec;
    color: #0c0c0c;
    transform: rotate(-8deg);
}

.mcard__mark {
    position: absolute;
    right: -22cqi;
    bottom: -16cqi;
    width: 82cqi;
    fill: #0c0c0c;
    transform: rotate(-6deg);
}

.mcard__club {
    position: absolute;
    left: 7cqi;
    top: 6cqi;
    font-family: var(--fd);
    font-variation-settings: var(--fd-var);
    font-weight: 800;
    font-size: 9cqi;
    line-height: 1;
}

.mcard__no {
    position: absolute;
    left: 7cqi;
    top: 17cqi;
    font-size: 3.6cqi;
    font-weight: 700;
    color: #5c5955;
}

.mcard__name {
    position: absolute;
    left: 7cqi;
    bottom: 8cqi;
    font-size: 7cqi;
    color: var(--orange-deep);
    transform: rotate(-6deg);
    transform-origin: left;
}
