/* subscriptions and packages (sections/plans.liquid), styled after Rekaz's own storefront; colours follow --brand */
.pl {
  --pl-ink: var(--brand, #171717);
  --pl-bg: var(--background, #fff);
  --pl-line: color-mix(in srgb, currentColor 12%, transparent);
  --pl-soft: color-mix(in srgb, currentColor 5%, transparent);
  --pl-muted: color-mix(in srgb, currentColor 62%, transparent);
  max-inline-size: 72rem;
  margin-inline: auto;
  padding: 1.5rem 1rem 2rem;
  font-family: var(--font-family, system-ui, sans-serif);
}
.pl [hidden] { display: none !important; }
.pl button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pl button:disabled { cursor: default; }
.pl :focus-visible { outline: 2px solid var(--pl-ink); outline-offset: 2px; }
.pl h1, .pl h2, .pl h3, .pl p { margin: 0; }
.pl-i { inline-size: 1.25rem; block-size: 1.25rem; flex: none; }
.pl-i--sm { inline-size: 1rem; block-size: 1rem; }
.pl-riyal { inline-size: 0.85em; block-size: 0.85em; margin-inline-start: 0.15em; vertical-align: -0.08em; }
[dir="rtl"] .pl-flip { transform: scaleX(-1); }

.pl-stack { display: grid; gap: 1.25rem; align-content: start; }
.pl-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.pl-grow { flex: 1; min-inline-size: 0; display: grid; gap: 0.125rem; }
.pl-muted { color: var(--pl-muted); }
.pl-small { font-size: 0.875rem; line-height: 1.5; }
.pl-strong { font-weight: 600; }
.pl-normal { font-weight: 400; }
.pl-center { text-align: center; }
.pl-error { color: #dc2626; font-size: 0.8125rem; font-weight: 500; }
.pl-title { font-size: 1.5rem; font-weight: 700; line-height: 1.25; }
.pl-h2 { font-size: 1.125rem; font-weight: 600; }
.pl-h3 { display: block; font-size: 0.875rem; font-weight: 600; }
.pl-titlebar { display: flex; align-items: center; gap: 0.5rem; }
.pl-icon-btn { display: grid; place-items: center; inline-size: 2.75rem; block-size: 2.75rem; margin-inline-start: -0.5rem; border-radius: 999px; color: inherit; }
.pl-icon-btn:hover { background: var(--pl-soft); }

.pl-card { display: grid; gap: 0.75rem; padding: 1.25rem; border: 1px solid var(--pl-line); border-radius: 0.75rem; background: var(--pl-bg); color: inherit; text-decoration: none; }
@media (min-width: 40rem) { .pl-card { padding: 1.5rem; } }

.pl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-block-size: 2.75rem; padding: 0 1.25rem; border: 1px solid transparent; border-radius: 999px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.pl-btn--primary { background: var(--pl-ink); color: #fff !important; }
.pl-btn--primary:disabled { opacity: 0.45; }
.pl-btn--outline { border-color: var(--pl-line); background: var(--pl-bg); color: inherit; }
.pl-btn--outline:hover { background: var(--pl-soft); }
.pl-link { justify-self: start; padding: 0; border: 0; background: none; color: var(--pl-ink) !important; font-size: 0.875rem; font-weight: 600; }

.pl-skeleton { block-size: 9rem; border-radius: 0.75rem; background: linear-gradient(90deg, var(--pl-soft), transparent, var(--pl-soft)); background-size: 200% 100%; animation: pl-shimmer 1.2s linear infinite; }
@keyframes pl-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .pl-skeleton { animation: none; } }

.pl-state { display: grid; gap: 0.75rem; justify-items: center; max-inline-size: 28rem; margin: 4rem auto; text-align: center; }
.pl-state h1 { font-size: 1.5rem; }

/* prices: the offer badge, the price and the one it replaces, a subscription's recurring note */
.pl-offer { display: inline-flex; align-items: center; gap: 0.25rem; margin-block-end: 0.375rem; padding: 0.25rem 0.625rem; border-radius: 999px; background: color-mix(in srgb, var(--pl-ink) 10%, transparent); color: var(--pl-ink); font-size: 0.75rem; font-weight: 600; }
.pl-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; }
.pl-price strong { font-size: 1.25rem; }
.pl-price s { color: var(--pl-muted); font-size: 0.875rem; }
.pl-price + .pl-muted { display: block; margin-block-start: 0.25rem; font-size: 0.75rem; }

/* the list */
.pl-search { position: relative; }
.pl-search__icon { position: absolute; inset-block-start: 50%; inset-inline-start: 1rem; translate: 0 -50%; color: var(--pl-muted); }
.pl-search__input { box-sizing: border-box; inline-size: 100%; min-block-size: 3rem; padding-inline: 2.75rem; border: 1px solid var(--pl-line); border-radius: 999px; background: var(--pl-bg); color: inherit; font: inherit; font-size: 16px; }
.pl-search__input::-webkit-search-cancel-button { display: none; }
.pl-search__clear { position: absolute; inset-block-start: 50%; inset-inline-end: 0.5rem; translate: 0 -50%; display: grid; place-items: center; inline-size: 2.25rem; block-size: 2.25rem; border: 0; border-radius: 999px; background: none; }
.pl-list { display: flex; flex-direction: column; gap: 1rem; }
.pl-plan__name { font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.pl-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.pl-plan__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-block-start: 0.5rem; }
.pl-entry { display: flex; align-items: center; gap: 1rem; margin-block-start: 1rem; transition: border-color 150ms ease; }
.pl-entry:hover { border-color: color-mix(in srgb, currentColor 25%, transparent); }
.pl-entry__icon { display: grid; place-items: center; inline-size: 2.75rem; block-size: 2.75rem; flex: none; border-radius: 999px; background: var(--pl-soft); }

/* what a package includes */
.pl-items { display: grid; gap: 0; margin: 0.75rem 0 0; padding: 0; list-style: none; }
.pl-item { display: flex; align-items: center; gap: 0.75rem; padding-block: 0.75rem; border-block-end: 1px solid var(--pl-line); font-size: 0.875rem; font-weight: 500; }
.pl-item:last-child { border-block-end: 0; }
.pl-item__check { color: var(--pl-ink); }
.pl-item__branch { color: var(--pl-muted); font-size: 0.75rem; font-weight: 400; }
.pl-item__quantity { color: var(--pl-muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.pl-items[data-compact] { gap: 0.5rem; margin-block-start: 0.5rem; }
.pl-items[data-compact] .pl-item { gap: 0.5rem; padding: 0; border: 0; color: var(--pl-muted); font-weight: 400; }
.pl-items[data-compact] .pl-grow { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-item--more { padding-inline-start: 1.75rem !important; font-weight: 500 !important; }
.pl-savings { display: grid; gap: 0.5rem; padding: 1rem; border-radius: 0.5rem; background: color-mix(in srgb, var(--pl-ink) 5%, transparent); font-size: 0.875rem; }
.pl-savings__row { display: flex; justify-content: space-between; gap: 1rem; font-variant-numeric: tabular-nums; }
.pl-savings__total { padding-block-start: 0.625rem; border-block-start: 1px solid color-mix(in srgb, var(--pl-ink) 15%, transparent); color: var(--pl-ink); font-size: 1rem; font-weight: 600; }
.pl-validity { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }

/* a plan's page: the options, the description, the start date */
.pl-options { display: grid; gap: 0.75rem; }
.pl-option { display: flex; align-items: flex-start; gap: 0.75rem; padding: 1rem; border: 1px solid var(--pl-line); border-radius: 0.75rem; cursor: pointer; }
.pl-option:has(:checked) { border-color: var(--pl-ink); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pl-ink) 15%, transparent); }
.pl-option[data-disabled] { cursor: not-allowed; opacity: 0.55; }
.pl-option__radio { inline-size: 1.125rem; block-size: 1.125rem; margin: 0.125rem 0 0; accent-color: var(--pl-ink); }
.pl-option__price { margin-block-start: 0.5rem; }
.pl-about { font-size: 0.875rem; line-height: 1.6; }
.pl-about:not([data-open]) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden; }

/* the summary: a card beside the page from 1024px, a bar at the bottom of the screen on phones */
.pl-detail { display: grid; gap: 1.25rem; }
.pl-summary { position: sticky; inset-block-end: 0; z-index: 10; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0.5rem 1rem; margin-inline: -1rem; padding: 0.75rem 1rem max(0.75rem, env(safe-area-inset-bottom)); border-block-start: 1px solid var(--pl-line); background: var(--pl-bg); }
.pl-summary__lines, .pl-summary__total { display: none; }
.pl-summary .pl-error { grid-column: 1 / -1; }
.pl-summary__action { inline-size: 100%; min-block-size: 3.25rem; }
.pl-summary__price .pl-offer, .pl-summary__price .pl-muted { display: none; }
@media (min-width: 64rem) {
  .pl-detail { grid-template-columns: minmax(0, 1fr) 22rem; align-items: start; gap: 2rem; }
  .pl-summary { inset-block: 1.5rem auto; grid-template-columns: 1fr; gap: 1rem; margin: 0; padding: 1.5rem; border: 1px solid var(--pl-line); border-radius: 0.75rem; }
  .pl-summary__lines { display: grid; gap: 0.25rem; }
  .pl-summary__price .pl-offer { display: inline-flex; }
  .pl-summary__price .pl-muted { display: block; }
  .pl-summary__total { display: flex; justify-content: space-between; padding-block-start: 1rem; border-block-start: 1px solid var(--pl-line); font-size: 0.875rem; font-weight: 600; }
}

/* items already in the cart: a bottom sheet on phones, a centred dialog from 768px (the skill's reference/sheets.md) */
.pl-sheet { position: fixed; inset: auto 0 0 0; margin: 0 auto; box-sizing: border-box; inline-size: 100%; max-inline-size: 100%; max-block-size: calc(100vh - 1.5rem); max-block-size: calc(100dvh - 1.5rem); padding: 0; display: none; flex-direction: column; overflow: hidden; border: 1px solid #e5e5e5; border-block-end: 0; border-radius: 2rem 2rem 0 0; background: var(--background, #fff); color: inherit; font-family: var(--font-family, system-ui, sans-serif); translate: 0 100%; transition: translate 500ms cubic-bezier(0.32, 0.72, 0, 1), overlay 500ms allow-discrete, display 500ms allow-discrete; }
.pl-sheet[open] { display: flex; translate: 0 0; }
@starting-style { .pl-sheet[open] { translate: 0 100%; } }
.pl-sheet::backdrop { background: rgb(0 0 0 / 0.2); }
.pl-sheet__header { flex-shrink: 0; display: grid; gap: 0.5rem; padding: 28px 20px 16px; text-align: center; }
.pl-sheet__header h2 { margin: 0; font-size: 1.25rem; }
.pl-sheet__header p { margin: 0; }
.pl-sheet__body { flex: 1 1 auto; min-block-size: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 0 20px 20px; }
.pl-sheet__footer { flex-shrink: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; padding: 16px 20px max(1rem, env(safe-area-inset-bottom)); border-block-start: 1px solid #e5e5e5; }
.pl-cart-items { display: grid; gap: 0.5rem; list-style: none; }
.pl-cart-items li { padding: 0.75rem 1rem; border-radius: 0.75rem; background: rgb(0 0 0 / 0.04); font-weight: 500; }
@media (min-width: 48rem) {
  .pl-sheet { inset: 0; margin: auto; inline-size: calc(100% - 3rem); max-inline-size: 30rem; max-block-size: calc(100dvh - 3rem); border-block-end: 1px solid #e5e5e5; border-radius: 2rem; translate: none; opacity: 1; scale: 1; transition: opacity 150ms ease, scale 150ms ease, overlay 150ms allow-discrete, display 150ms allow-discrete; }
  .pl-sheet:not([open]) { opacity: 0; scale: 0.95; }
  @starting-style { .pl-sheet[open] { opacity: 0; scale: 0.95; } }
}
html:has(.pl-sheet[open]) { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .pl-sheet { transition-duration: 0.01ms; } }
