/* The Plans block (lib/layouts/plans.ts). Colours come from the layout's accent unless a plan has its own. */
.ms-plans { --plan-accent: var(--ms-accent, var(--bs-primary, #28abe3)); }
.ms-plans .ms-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ms-plans .ms-offer.ms-featured { border: 2px solid var(--plan-accent) !important; } /* some layouts draw cards with .border-0 */
.ms-plans .ms-badge { align-self: center; display: inline-block; background: var(--plan-accent); color: #fff; border-radius: 999px; padding: .15rem .8rem; font-size: .8rem; font-weight: 600; }
.ms-plans .ms-name { font-size: 1.25rem; }
.ms-plans .ms-amount { font-size: 2.25rem; font-weight: 700; }
.ms-plans :is(.ms-per, .ms-normal, .ms-note) { opacity: .75; font-size: .9rem; }
.ms-plans .ms-deal { color: var(--plan-accent); font-weight: 600; }
.ms-plans .ms-blurb { white-space: pre-line; }
.ms-plans .ms-offer-img { max-width: 100%; height: 140px; object-fit: contain; margin-bottom: 1rem; }
.ms-plans .ms-features-list { list-style: none; padding: 0; margin: 0 0 1.5rem; text-align: left; }
.ms-plans .ms-features-list li { display: flex; gap: .5rem; padding: .3rem 0; }
.ms-plans .ms-features-list .ms-off { opacity: .6; }
.ms-plans .ms-mark { display: inline-flex; flex: none; margin-right: .25rem; position: relative; }
.ms-plans .ms-yes { color: #1a7f4b; }
.ms-plans .ms-no { color: #b42318; }
.ms-plans .ms-cta-row { margin-top: auto; }
.ms-plans .ms-passes-title { margin: 3rem 0 1.5rem; }

.ms-plans--compact .ms-offer .card-body { padding: 1.25rem !important; }
.ms-plans--compact .ms-features-list { text-align: center; }
.ms-plans--compact .ms-features-list li { justify-content: center; }
.ms-plans--compact .ms-lead { display: block; font-size: 1.75rem; line-height: 1.1; }
.ms-plans--compact .ms-offer.ms-featured { transform: translateY(-.75rem); }
.ms-plans--compact .ms-featured .ms-badge { margin-top: -2rem; border-radius: 6px 6px 0 0; }

.ms-plans--checklist .ms-features-list li { border-top: 1px solid rgba(127, 127, 127, .25); }

.ms-plans .ms-matrix { width: 100%; border-collapse: collapse; text-align: center; }
.ms-plans .ms-matrix :is(th, td) { padding: .75rem; border-bottom: 1px solid rgba(127, 127, 127, .25); vertical-align: top; }
.ms-plans .ms-matrix tbody th { text-align: left; font-weight: 500; }
.ms-plans .ms-matrix .ms-featured { background: rgba(127, 127, 127, .1); border-inline: 2px solid var(--plan-accent); }
.ms-plans .ms-matrix-narrow { display: none; }
@media (max-width: 699.98px) { .ms-plans .ms-matrix-wide { display: none; } .ms-plans .ms-matrix-narrow { display: block; } }

/* Monthly / yearly: the radios come before the plans. */
.ms-plans .ms-term { margin: 0 .35rem 0 0; }
.ms-plans > div > label { margin: 0 1.25rem 1.5rem 0; }
.ms-plans .ms-annual, .ms-plans .ms-term-year:checked ~ .ms-plans-body .ms-monthly { display: none; }
.ms-plans .ms-term-year:checked ~ .ms-plans-body .ms-annual { display: inline; }

.ms-passcallout { padding: 1.25rem 0; text-align: center; border-block: 2px solid var(--plan-accent); }
.ms-passcallout p { margin: 0; }
.ms-passcallout .btn, .ms-passcallout .btn-main { margin-left: .75rem; }

/* strip: one bordered row of cells */
.ms-plans--strip .row { margin: 0; border: 1px solid rgba(127, 127, 127, .35); border-radius: .5rem; overflow: hidden; }
.ms-plans--strip .row > div { flex: 1 1 220px; width: auto; max-width: none; padding: 0; }
.ms-plans--strip .ms-offer { border: 0 !important; border-radius: 0 !important; box-shadow: 0 0 0 1px rgba(127, 127, 127, .35) !important; }
.ms-plans--strip .ms-offer.ms-featured { box-shadow: inset 0 .35rem 0 var(--plan-accent), 0 0 0 1px rgba(127, 127, 127, .35) !important; }
@media (prefers-reduced-motion: no-preference) {
  .ms-plans--strip .ms-term-month:checked ~ .ms-plans-body .ms-monthly, .ms-plans--strip .ms-term-year:checked ~ .ms-plans-body .ms-annual { display: inline-block; animation: ms-slide .3s ease-out; }
}
@keyframes ms-slide { from { opacity: 0; transform: translateY(.6rem); } }

/* dark and the raised illustrated card: light text on a dark ground, whatever the layout */
.ms-plans--dark .ms-offer, .ms-plans--illustrated .ms-offer.ms-hot { color: #fff; }
.ms-plans--dark .ms-offer { background: #16181d !important; border-top: .35rem solid var(--plan-accent) !important; }
.ms-plans--illustrated .ms-offer.ms-hot { background: var(--plan-accent) !important; background: color-mix(in srgb, var(--plan-accent) 65%, #000) !important; }
.ms-plans--dark .ms-offer :is(h3, p, li, span, strong), .ms-plans--illustrated .ms-offer.ms-hot :is(h3, p, li, span, strong) { color: #fff; }
.ms-plans--dark .ms-offer .ms-yes, .ms-plans--illustrated .ms-hot .ms-yes { color: #5ee0a0; }
.ms-plans--dark .ms-offer .ms-no, .ms-plans--illustrated .ms-hot .ms-no { color: #ff9d94; }
.ms-plans--dark .ms-offer .ms-cta-row a, .ms-plans--illustrated .ms-hot .ms-cta-row a { background: #fff; border-color: #fff; color: #16181d; }

/* ribbon: the badge across the top right corner, the note as a closing line */
.ms-plans--ribbon .ms-offer { position: relative; overflow: hidden; }
.ms-plans--ribbon .ms-offer .ms-badge { position: absolute; top: 1.6rem; right: -3.6rem; width: 13rem; padding: .2rem 3rem; border-radius: 0; transform: rotate(45deg); font-size: .7rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-plans--ribbon .ms-badge + .ms-name { padding: 0 2.5rem; }
.ms-plans--ribbon .ms-note { border-top: 1px dashed rgba(127, 127, 127, .5); padding-top: .75rem; }

/* stagger: cards step down in threes, the name runs up a tab on the side */
.ms-plans--stagger .ms-offer .card-body { position: relative; min-height: 22rem; padding-left: 4rem !important; }
.ms-plans--stagger .ms-offer .ms-name { position: absolute; top: 0; bottom: 0; left: 0; width: 2.75rem; margin: 0; display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; transform: rotate(180deg); overflow: hidden; background: var(--plan-accent); background: color-mix(in srgb, var(--plan-accent) 75%, #000); color: #fff; }
@media (min-width: 992px) {
  .ms-plans--stagger .row > div:nth-child(3n+2) { margin-top: 2.5rem; }
  .ms-plans--stagger .row > div:nth-child(3n) { margin-top: 5rem; }
}

/* illustrated: picture on top, one card raised */
.ms-plans--illustrated .ms-offer-img { width: 100%; height: 170px; }
@media (min-width: 992px) { .ms-plans--illustrated .ms-offer.ms-hot { transform: scale(1.06); } }
