/*
Theme Name:   E-gotówka
Theme URI:    https://e-gotowka.pl/
Author:       E-gotówka
Description:  Motyw portalu finansowo-ekonomicznego E-gotówka. Tailwind CSS (CDN), mega-menu, newsroom grid, sticky TOC, JSON-LD. Wymaga wtyczki „E-gotówka Core” dla kalkulatorów i danych rynkowych.
Version:      1.1.0
Requires at least: 6.3
Requires PHP: 7.4
License:      GPL-2.0-or-later
Text Domain:  egotowka
*/

/* Style, których nie da się wyrazić klasami Tailwind w treści z edytora. */

html { scroll-behavior: smooth; }
[hidden] { display: none !important; }

.eg-placeholder { background: repeating-linear-gradient(135deg, #E2E8F0 0 8px, #F1F5F9 8px 16px); }

/* Prose: tabele z edytora (granatowy nagłówek, zebra) */
.eg-prose h2[id] { scroll-margin-top: 140px; }
.eg-table-wrap { overflow-x: auto; border: 1px solid #E2E8F0; border-radius: 2px; margin: 1.75em 0; }
.eg-prose .eg-table-wrap table, .eg-prose table { width: 100%; min-width: 520px; margin: 0; border-collapse: collapse; font-size: .9375rem; }
.eg-prose thead { background: #1E3A8A; border: 0; }
.eg-prose thead th { color: #fff; font-weight: 700; padding: .75rem .875rem; text-align: left; }
.eg-prose tbody tr { border-top: 1px solid #E2E8F0; border-bottom: 0; }
.eg-prose tbody tr:nth-child(even) { background: #F8FAFC; }
.eg-prose tbody td, .eg-prose tbody th { padding: .75rem .875rem; font-variant-numeric: tabular-nums; }
.eg-prose figure.wp-block-table { margin: 1.75em 0; }
.eg-prose figure.wp-block-table .eg-table-wrap { margin: 0; }
.eg-prose figcaption, .eg-prose table caption { font-size: .75rem; color: #64748B; text-align: left; padding: .625rem .875rem; }

/* Strona z widżetem + tekstem SEO: tekst w czytelnej szerokości */
.eg-prose-page > :not(.not-prose) { max-width: 68ch; }

/* Mega-menu: aktywny przycisk */
[data-mega-item].is-open > [data-mega-btn] { border-bottom-color: #1E3A8A; color: #1E3A8A; }

/* Szuflada mobilna */
[data-drawer] .eg-drawer-overlay { opacity: 0; transition: opacity .25s; }
[data-drawer] .eg-drawer-panel { transform: translateX(105%); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
[data-drawer].is-open .eg-drawer-overlay { opacity: 1; }
[data-drawer].is-open .eg-drawer-panel { transform: none; }

/* Zakładki i spis treści */
[role="tab"][aria-selected="true"] { border-bottom-color: #1E3A8A; color: #1E3A8A; }
[data-toc-link].is-active { border-left-color: #1E3A8A; color: #1E3A8A; font-weight: 700; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* Paginacja */
.nav-links { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.nav-links .page-numbers { min-width: 44px; height: 44px; padding: 0 .875rem; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #CBD5E1; border-radius: 2px; font-weight: 700; font-size: .9375rem; color: #0F172A; background: #fff; }
.nav-links .page-numbers.current { background: #0F172A; border-color: #0F172A; color: #fff; }
.nav-links a.page-numbers:hover { border-color: #1E3A8A; color: #1E3A8A; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
