/* public/css/pages/public/store/legal.css — the legal pages in the DEFAULT storefront theme (guest::legal inside guest::layouts.base,
   task 540): Terms & Conditions, Privacy Policy, Refund Policy. KTUI tokens only, so light and dark both work. The other themes use
   public/themes/_shared/legal.css (same markup). */

.nx-sf-legal { padding-block: 2rem 3.5rem; }
@media (min-width: 64rem) { .nx-sf-legal { padding-block: 2.75rem 4.5rem; } }
.nx-sf-legal .th-legal-wrap { flex-grow: 0; }

.nx-sf-legal .th-legal-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; font-size: .8125rem; color: var(--muted-foreground); }
.nx-sf-legal .th-legal-crumbs a { color: var(--secondary-foreground); text-decoration: none; }
.nx-sf-legal .th-legal-crumbs a:hover { color: var(--mono); text-decoration: underline; text-underline-offset: 2px; }
.nx-sf-legal .th-legal-crumbs [aria-current] { color: var(--mono); font-weight: 500; }

.nx-sf-legal .th-legal-head { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.nx-sf-legal .th-legal-title { font-size: 1.875rem; line-height: 1.15; font-weight: 650; letter-spacing: -.025em; color: var(--mono); text-wrap: balance; }
@media (min-width: 64rem) { .nx-sf-legal .th-legal-title { font-size: 2.375rem; } }
.nx-sf-legal .th-legal-updated { font-size: .875rem; color: var(--secondary-foreground); }

/* layout: the table of contents beside the text from 1024 px, above it on smaller screens */
.nx-sf-legal .th-legal-grid { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 64rem) { .nx-sf-legal .th-legal-grid { grid-template-columns: 15rem minmax(0, 1fr); gap: 3rem; } .nx-sf-legal .th-legal-grid.is-single { grid-template-columns: minmax(0, 1fr); } }

.nx-sf-legal .th-legal-toc { padding: 1rem 1.125rem; border: 1px solid var(--nx-line-strong, var(--border)); border-radius: 12px; background: var(--card); }
@media (min-width: 64rem) { .nx-sf-legal .th-legal-toc { position: sticky; top: 5.5rem; max-height: calc(100vh - 7rem); overflow-y: auto; } }
.nx-sf-legal .th-legal-toc-title { margin-bottom: .5rem; font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-foreground); }
.nx-sf-legal .th-legal-toc ol { display: flex; flex-direction: column; gap: .125rem; }
.nx-sf-legal .th-legal-toc a { display: block; padding: .375rem .5rem; margin-inline: -.5rem; border-radius: 6px; font-size: .8125rem; line-height: 1.4; color: var(--secondary-foreground); text-decoration: none; }
.nx-sf-legal .th-legal-toc a:hover { background: var(--muted); color: var(--mono); }

/* the text (nx-prose, made bigger for reading) */
.nx-sf-legal .th-legal-body { max-width: 46rem; font-size: 1rem; line-height: 1.7; color: var(--foreground); }
.nx-sf-legal .th-legal-body > * + * { margin-top: .875em; }
.nx-sf-legal .th-legal-body h2 { margin-top: 2.25em; font-size: 1.3125rem; font-weight: 650; letter-spacing: -.015em; color: var(--mono); scroll-margin-top: 5.5rem; }
.nx-sf-legal .th-legal-body h3 { margin-top: 1.5em; font-size: 1.0625rem; font-weight: 600; color: var(--mono); }
.nx-sf-legal .th-legal-body li + li { margin-top: .4em; }
.nx-sf-legal .th-legal-body li::marker { color: color-mix(in oklab, var(--primary) 70%, var(--muted-foreground)); }
.nx-sf-legal .th-legal-body ol > li::marker { font-weight: 600; }

/* boxes: the "in short" summary at the top, notes in the text */
.nx-sf-legal .th-legal-body blockquote { margin-inline: 0; padding: 1.25rem 1.375rem; border: 1px solid var(--nx-line-strong, var(--border)); border-inline-start: 0; border-radius: 14px; color: var(--foreground); background: var(--card); box-shadow: var(--nx-shadow); position: relative; overflow: hidden; }
.nx-sf-legal .th-legal-body blockquote::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: linear-gradient(180deg, var(--nx-store-from, var(--primary)), var(--nx-store-to, var(--primary))); }
.nx-sf-legal .th-legal-body blockquote > * + * { margin-top: .75em; }
.nx-sf-legal .th-legal-body blockquote h2 { margin-top: 0; font-size: 1.125rem; }
.nx-sf-legal .th-legal-body .th-legal-summary { padding: 1.5rem 1.625rem; background: color-mix(in oklab, var(--primary) 4%, var(--card)); }
.nx-sf-legal .th-legal-body .th-legal-summary > h2 + p { color: var(--secondary-foreground); font-size: .9375rem; }
.nx-sf-legal .th-legal-body .th-legal-summary ul { display: grid; gap: .75rem 1.5rem; padding: 0; list-style: none; }
@media (min-width: 48rem) { .nx-sf-legal .th-legal-body .th-legal-summary ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nx-sf-legal .th-legal-body .th-legal-summary li { margin: 0; padding-inline-start: 1.625rem; position: relative; font-size: .9375rem; line-height: 1.55; color: var(--secondary-foreground); }
.nx-sf-legal .th-legal-body .th-legal-summary li::before { content: ""; position: absolute; inset-inline-start: 0; top: .2em; width: 1.0625rem; height: 1.0625rem; border-radius: 999px; background: color-mix(in oklab, var(--primary) 14%, transparent) no-repeat center / .6875rem url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%234f46e5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E"); }
.nx-sf-legal .th-legal-body .th-legal-summary li strong { display: block; color: var(--mono); }
.nx-sf-legal .th-legal-body .th-legal-note { padding: 1rem 1.25rem; background: color-mix(in oklab, var(--primary) 5%, var(--card)); box-shadow: none; }

/* the store's contact links ({support_channels}) */
.nx-sf-legal .th-legal-channels { display: flex; flex-wrap: wrap; gap: .625rem; padding: 0; list-style: none; }
.nx-sf-legal .th-legal-body .th-legal-channels li { margin: 0; }
.nx-sf-legal .th-legal-channels a { display: inline-flex; flex-direction: column; min-height: 2.75rem; justify-content: center; padding: .5rem 1rem; border: 1px solid var(--nx-line-strong, var(--border)); border-radius: 10px; background: var(--card); box-shadow: var(--nx-shadow); color: var(--mono); text-decoration: none; line-height: 1.3; transition: border-color .15s, box-shadow .15s; }
.nx-sf-legal .th-legal-channels a::after { content: none; }
.nx-sf-legal .th-legal-channels a:hover { border-color: color-mix(in oklab, var(--primary) 35%, var(--nx-line-strong, var(--border))); box-shadow: var(--nx-shadow-lg, var(--nx-shadow)); }
.nx-sf-legal .th-legal-ch-label { font-size: .875rem; font-weight: 600; }
.nx-sf-legal .th-legal-ch-handle { font-size: .75rem; color: var(--secondary-foreground); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.nx-sf-legal .th-legal-channels .is-whatsapp .th-legal-ch-label { color: #15803d; }
.nx-sf-legal .th-legal-channels .is-telegram .th-legal-ch-label { color: #0369a1; }
.dark .nx-sf-legal .th-legal-channels .is-whatsapp .th-legal-ch-label { color: #4ade80; }
.dark .nx-sf-legal .th-legal-channels .is-telegram .th-legal-ch-label { color: #38bdf8; }

/* the other two pages */
.nx-sf-legal .th-legal-more { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.nx-sf-legal .th-legal-more-title { margin-bottom: 1rem; font-size: 1.125rem; font-weight: 600; letter-spacing: -.015em; color: var(--mono); }
.nx-sf-legal .th-legal-more ul { display: grid; gap: .75rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) { .nx-sf-legal .th-legal-more ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nx-sf-legal .th-legal-more a { display: flex; flex-direction: column; gap: .25rem; height: 100%; padding: 1rem 1.125rem; border: 1px solid var(--nx-line-strong, var(--border)); border-radius: 12px; background: var(--card); box-shadow: var(--nx-shadow); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.nx-sf-legal .th-legal-more a:hover { border-color: color-mix(in oklab, var(--primary) 30%, var(--nx-line-strong, var(--border))); box-shadow: var(--nx-shadow-lg, var(--nx-shadow)); }
.nx-sf-legal .th-legal-more b { font-size: .9375rem; font-weight: 600; color: var(--mono); }
.nx-sf-legal .th-legal-more span { font-size: .8125rem; line-height: 1.5; color: var(--secondary-foreground); }
@media (prefers-reduced-motion: reduce) { .nx-sf-legal .th-legal-channels a, .nx-sf-legal .th-legal-more a { transition: none; } }
.nx-sf-legal .th-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
