/**
 * "Ogólne warunki" page — collapsible OWU/OWG documents for both companies.
 * Only loaded on page-templates/ogolne-warunki.php (see functions.php).
 *
 * Built on native <details>/<summary> rather than the FAQ accordion's JS
 * (assets/js/faq-accordion.js): that component animates to a fixed
 * max-height tuned for a couple of sentences, which would clip these much
 * longer legal documents. <details> has no such ceiling, needs no JS at
 * all, and is keyboard/screen-reader accessible by default.
 */

.terms-groups { display: flex; flex-direction: column; gap: 48px; }
.terms-group-title { font-family: 'IBM Plex Sans', sans-serif; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 20px 0; color: var(--fg-on-light); }
.terms-list { display: flex; flex-direction: column; gap: 12px; }

.terms-item { background: var(--bg-light); border: 1px solid var(--border-light); border-radius: var(--radius); padding: 4px 24px; transition: border-color 0.25s ease, box-shadow 0.25s ease; }
.terms-item:hover { border-color: var(--sage); }
.terms-item[open] { border-color: var(--accent-strong); box-shadow: 0 10px 26px rgba(51, 81, 80, 0.08); }

/* Suppress the default disclosure triangle so .terms-chevron is the only
   affordance — matches .faq-chevron's rotate-on-open behavior. */
.terms-item-summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; margin: 0; cursor: pointer; font-family: 'IBM Plex Sans', sans-serif; font-size: 1rem; font-weight: 600; color: var(--fg-on-light); }
.terms-item-summary::-webkit-details-marker { display: none; }
.terms-item-summary::marker { content: ""; }

.terms-chevron { width: 20px; height: 20px; color: var(--accent-strong); transition: transform 0.3s ease; flex-shrink: 0; }
.terms-item[open] .terms-chevron { transform: rotate(180deg); }

.terms-item-body { padding: 4px 0 26px 0; }
.terms-subtitle { color: var(--fg-on-light-muted); font-size: 0.92rem; font-style: italic; margin: 0 0 24px 0; }

.terms-item-body h4 { font-family: 'IBM Plex Sans', sans-serif; font-size: 1.02rem; font-weight: 700; letter-spacing: -0.005em; color: var(--fg-on-light); margin: 28px 0 12px 0; }
.terms-item-body h4:first-of-type { margin-top: 0; }
.terms-item-body p { color: var(--fg-on-light-muted); font-size: 0.94rem; line-height: 1.6; max-width: 68ch; margin: 0 0 14px 0; }

.terms-item-body ol { color: var(--fg-on-light-muted); font-size: 0.94rem; line-height: 1.6; max-width: 68ch; margin: 0 0 8px 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 10px; }
.terms-item-body ol li::marker { color: var(--accent-strong); font-weight: 600; }
.terms-item-body ol.terms-sublist { list-style-type: lower-alpha; margin: 10px 0 0 0; gap: 8px; }
.terms-item-body ol.terms-sublist li::marker { font-weight: 400; }

@media (max-width: 560px) {
	.terms-item { padding: 4px 16px; }
}
