/*
 * TP Narzędzia online – elementy narzędzi (pola, wyniki, zegary, liczniki, konwertery, tabele narzędzi).
 * Korzysta ze zmiennych kolorów motywu (--primary, --lime, --line…); karty, listy linków,
 * okruszki i przyciski stylizuje motyw. Ładowane tylko na stronach z narzędziami.
 */

.ww-tool, .ww-file, .ww-result--copy, .ww-world__item {
	border: var(--bw) solid var(--line);
	box-shadow: var(--shadow);
}

.ww-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.ww-badges li { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px 10px; font-size: .82rem; font-weight: 800; color: var(--ink); }
.ww-badges li::before { content: "✓"; color: var(--primary); font-weight: 900; }
.ww-sticker { position: absolute; top: 22px; right: 24px; width: 76px; height: 76px; display: grid; place-items: center; background: var(--lime); color: var(--lime-ink); border: var(--bw) solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.ww-sticker .ww-ico { width: 40px; height: 40px; stroke-width: 2; }
@media (max-width: 600px) {
	.ww-sticker { width: 54px; height: 54px; top: 16px; right: 16px; border-radius: 14px; }
	.ww-sticker .ww-ico { width: 28px; height: 28px; }
	
}

.ww-tool { background: var(--surface); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); margin: 0 0 32px; }
.ww-tool--center { text-align: center; }
.ww-tool h2:first-child { margin-top: 0; }

.ww-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-bottom: 14px; }
.ww-row--center { justify-content: center; }
.ww-row--wrap > * { flex: 1 1 120px; }
.ww-field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 200px; min-width: 0; margin-bottom: 12px; }
.ww-row .ww-field { margin-bottom: 0; }
.ww-field--sm { flex: 0 1 130px; }
.ww-field > span { font-size: .78rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ww-field input, .ww-field select, .ww-field textarea, .ww-pcalc input, .ww-ratio input, .ww-table--edit input {
	font: inherit; font-size: 1.05rem; font-weight: 700;
	color: var(--ink);
	background: var(--surface);
	border: var(--bw) solid var(--line);
	border-radius: var(--radius-sm);
	padding: 10px 12px;
	width: 100%;
	min-width: 0;
}
.ww-field textarea { font-family: var(--mono); font-weight: 500; resize: vertical; }
.ww-field input:focus, .ww-field select:focus, .ww-field textarea:focus, .ww-pcalc input:focus, .ww-ratio input:focus, .ww-table--edit input:focus { outline: none; box-shadow: var(--shadow-sm); background: var(--accent-soft); }
.ww-check { display: inline-flex; gap: 8px; align-items: center; margin: 2px 0 12px; cursor: pointer; font-size: .95rem; font-weight: 700; }
.ww-check input { width: 19px; height: 19px; accent-color: var(--primary); }
.ww-eq { font-size: 1.6rem; font-weight: 800; padding-bottom: 8px; color: var(--ink); }

.ww-presets, .ww-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 4px 0 16px; }
.ww-chips a { font-size: .88rem; font-weight: 800; border: 1px solid var(--line); border-radius: 10px; padding: 4px 12px; text-decoration: none; color: var(--ink); background: var(--surface); }
.ww-chips a:hover { background: var(--lime); }

.ww-result { background: var(--lime); color: var(--lime-ink); border: var(--bw) solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin: 8px 0 0; font-weight: 700; }
.ww-result:empty { display: none; }
.ww-result p:last-child { margin-bottom: 0; }
.ww-result .ww-muted { color: var(--lime-ink); opacity: .8; }
.ww-result--big, .ww-result__main { font-size: 1.4rem; font-weight: 800; color: var(--lime-ink); }
.ww-result__main { margin: 0 0 4px; }
.ww-result--copy { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ww-result--copy p { margin: 0; font-size: 1.1rem; font-weight: 800; flex: 1 1 300px; }

.ww-stats { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px 10px; justify-content: inherit; }
.ww-tool--center .ww-stats { justify-content: center; }
.ww-stats li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px 12px; font-size: .9rem; font-weight: 600; }
.ww-result .ww-stats li { background: var(--surface); color: var(--text); }
.ww-stats b { color: var(--ink); font-weight: 800; }
.ww-stats--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ww-stats--grid li { border-radius: var(--radius-sm); padding: 10px 12px; }
.ww-stats--grid b { display: block; font-size: 1.3rem; }

.ww-tabs { display: inline-flex; gap: 4px; background: var(--surface-2); padding: 4px; border: 1px solid var(--line); border-radius: 13px; margin: 0 0 18px; flex-wrap: wrap; }
.ww-tabs button { font: inherit; font-size: .9rem; font-weight: 800; border: 1px solid transparent; background: none; color: var(--muted); padding: 7px 14px; border-radius: 9px; cursor: pointer; }
.ww-tabs button[aria-selected="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--line); }

.ww-bignum { text-align: center; margin-bottom: 18px; }
.ww-bignum__n { display: inline-block; font-size: clamp(4rem, 3rem + 6vw, 7rem); font-weight: 800; line-height: 1; margin: 0; color: var(--lime-ink); background: var(--lime); border: var(--bw) solid var(--line); border-radius: 22px; padding: 6px 28px 10px; box-shadow: var(--shadow); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.ww-bignum__label { font-size: 1.1rem; font-weight: 700; margin: 18px 0 4px; }
.ww-progress { height: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; max-width: 420px; margin: 12px auto 6px; }
.ww-progress span { display: block; height: 100%; background: var(--primary); }

.ww-clock { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: clamp(2.8rem, 2rem + 6vw, 5.2rem); font-weight: 700; margin: 0; color: var(--ink); letter-spacing: -.03em; }
.ww-clock--xl { font-size: clamp(3.4rem, 2rem + 9vw, 8rem); }
.ww-clock__date { font-size: 1.1rem; font-weight: 700; color: var(--muted); margin: 4px 0 0; }

.ww-laps { font-family: var(--mono); max-width: 380px; margin: 16px auto 0; padding-left: 2.5em; text-align: left; }
.ww-laps li { padding: 5px 0; border-bottom: 1px dashed var(--line-soft); }
.ww-laps span { color: var(--muted); float: right; }

.ww-count__big { margin: 0 0 18px; }
.ww-count__days { display: inline-block; font-size: clamp(4.5rem, 3rem + 8vw, 8rem); font-weight: 800; line-height: 1; color: var(--lime-ink); background: var(--lime); border: var(--bw) solid var(--line); border-radius: 24px; padding: 4px 30px 10px; box-shadow: var(--shadow); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.ww-count__unit { display: block; font-size: 1.3rem; color: var(--ink); font-weight: 800; margin-top: 12px; }
.ww-count__today { font-size: 2.6rem; font-weight: 800; color: var(--primary); }
.ww-count__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 480px; margin: 0 auto; }
.ww-count__grid div { background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--radius-sm); padding: 10px 4px; box-shadow: var(--shadow-sm); }
.ww-count__grid b { display: block; font: 700 1.7rem/1.1 var(--mono); color: var(--ink); }
.ww-count__grid span { font-size: .78rem; font-weight: 800; color: var(--muted); text-transform: uppercase; }

.ww-convert { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: end; }
.ww-convert .ww-field { margin: 0; }
.ww-convert__swap { font-size: 1.3rem; font-weight: 800; width: 48px; height: 48px; border-radius: 12px; border: var(--bw) solid var(--line); background: var(--lime); color: var(--lime-ink); cursor: pointer; box-shadow: var(--shadow-sm); }
.ww-convert__swap:active { box-shadow: none; }
.ww-convert + .ww-result { margin-top: 16px; }
@media (max-width: 560px) {
	.ww-convert { grid-template-columns: 1fr; }
	.ww-convert__swap { justify-self: center; }
}

.ww-pcalc__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 14px 0; border-bottom: 1px dashed var(--line-soft); font-weight: 700; }
.ww-pcalc__row:last-child { border-bottom: 0; }
.ww-pcalc input { width: 110px; padding: 8px 10px; }
.ww-pcalc output { margin-left: auto; font-weight: 800; font-size: 1.2rem; color: var(--lime-ink); background: var(--lime); border: 1px solid var(--line); padding: 5px 14px; border-radius: 10px; min-width: 96px; text-align: right; }
.ww-ratio { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 1.4rem; font-weight: 800; margin-bottom: 12px; }
.ww-ratio input { width: 110px; }
.ww-ratio output { font-weight: 800; color: var(--lime-ink); background: var(--lime); border: var(--bw) solid var(--line); padding: 7px 16px; border-radius: 11px; }

.ww-today { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.ww-today h2 { margin-top: 0; font-size: 1.3rem; }
.ww-today h2 small { display: block; font-size: .85rem; font-weight: 700; color: var(--muted); margin-top: 2px; }
@media (max-width: 640px) { .ww-today { grid-template-columns: 1fr; } }
.ww-holidays { list-style: none; padding: 0; margin: 0 0 10px; }
.ww-holidays__item { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line-soft); }
.ww-holidays__item span { font-weight: 800; color: var(--ink); }
.ww-holidays__item em { font-style: normal; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; border: 1px solid var(--line-soft); border-radius: 8px; padding: 0 7px; }
.ww-holidays__item--ustawowe em { color: var(--surface); background: var(--free); border-color: var(--line); }
.ww-more { font-size: .92rem; font-weight: 800; }
.ww-calendar { margin-top: 20px; border-top: var(--bw) solid var(--line); padding-top: 14px; }
.ww-calendar summary { cursor: pointer; font-weight: 800; }
.ww-calendar__months { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 20px; }
.ww-calendar__months h3 { font-size: .95rem; margin: 14px 0 4px; }
.ww-calendar__months p { display: flex; flex-wrap: wrap; gap: 3px; margin: 0; }
.ww-calendar__months a { display: inline-grid; place-items: center; width: 28px; height: 28px; font-size: .8rem; font-weight: 700; border-radius: 7px; text-decoration: none; color: var(--text); border: 1px solid transparent; }
.ww-calendar__months a:hover { background: var(--lime); border-color: var(--line); color: var(--lime-ink); }
.ww-daynav { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; font-weight: 800; }

.ww-mirror { display: inline-block; font: 800 clamp(4rem, 3rem + 7vw, 7.5rem)/1 var(--mono); margin: 4px 0 20px; color: var(--on-primary); background: var(--primary); border: var(--bw) solid var(--line); border-radius: 24px; padding: 10px 28px; box-shadow: var(--shadow); letter-spacing: -.04em; }

.ww-world { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 12px; }
.ww-world__item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 11px 14px; border-radius: var(--radius-sm); background: var(--surface); text-decoration: none; color: var(--text); font-weight: 700; box-shadow: var(--shadow-sm); }
.ww-world__item b { font-family: var(--mono); font-size: 1.15rem; color: var(--ink); }
.ww-world__item--home { background: var(--lime); color: var(--lime-ink); }
.ww-world__item--home b { color: var(--lime-ink); }
a.ww-world__item:hover { background: var(--accent-soft); }

.ww-fileopts { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: flex-end; margin-bottom: 14px; }
.ww-fileopts > div { flex: 1 1 100%; }
.ww-fileopts .ww-field { margin-bottom: 8px; }
.ww-fileopts .ww-field--sm { flex: 0 1 210px; }
.ww-field--range input[type="range"] { padding: 0; accent-color: var(--primary); border: 0; background: none; height: 28px; }
.ww-field input[type="color"] { height: 46px; padding: 4px; }
.ww-sizes { border: 0; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ww-sizes legend { font-size: .78rem; font-weight: 800; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ww-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 36px 16px; border: 1.5px dashed var(--line); border-radius: var(--radius); background: var(--accent-soft); cursor: pointer; transition: background .15s; }
.ww-drop:hover, .ww-drop.is-over { background: var(--panel); }
.ww-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ww-drop:focus-within { outline: 3px solid var(--primary); outline-offset: 3px; }
.ww-drop .ww-ico { width: 54px; height: 54px; padding: 10px; color: var(--on-primary); background: var(--primary); border: var(--bw) solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); }
.ww-drop strong { font-size: 1.2rem; font-weight: 800; color: var(--ink); margin-top: 6px; }
.ww-drop span { color: var(--muted); font-size: .92rem; font-weight: 600; }
.ww-drop small { color: var(--ok); font-size: .82rem; font-weight: 800; margin-top: 4px; }
.ww-filestatus { margin: 12px 0 0; font-weight: 800; }
.ww-filestatus:empty { display: none; }
.ww-filestatus.is-error { color: var(--free); }
.ww-filelist { list-style: none; padding: 0; margin: 14px 0; }
.ww-file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); margin-bottom: 10px; background: var(--surface); box-shadow: var(--shadow-sm); }
.ww-file img, .ww-file__ico { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); flex-shrink: 0; background: var(--surface-2); }
.ww-file__ico { display: grid; place-items: center; font: 700 .75rem var(--mono); color: var(--accent-ink); }
.ww-file__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.ww-file__name small { display: block; font-weight: 600; color: var(--muted); font-size: .82rem; }
.ww-file__size { color: var(--muted); font-size: .88rem; font-weight: 700; white-space: nowrap; }
.ww-x { border: 0; background: none; color: var(--muted); font-size: 1.4rem; font-weight: 800; cursor: pointer; line-height: 1; }
.ww-x:hover { color: var(--free); }
.ww-x:disabled { opacity: .3; cursor: default; }

@media (min-width: 700px) {
	.ww-table--hours tbody, .ww-table--cols tbody { display: grid; grid-template-columns: 1fr 1fr; }
	.ww-table--hours thead, .ww-table--cols thead { display: none; }
	.ww-table--hours tr, .ww-table--cols tr { display: grid; grid-template-columns: 1fr 1fr; }
	.ww-table--hours tr:nth-child(odd), .ww-table--cols tr:nth-child(odd) { border-right: 1px solid var(--line-soft); }
	.ww-table--hours td, .ww-table--cols td { border-bottom: 1px solid var(--line-soft) !important; }
}
.ww-table--grades tr.is-current { background: var(--lime); font-weight: 800; }
.ww-table--grades tr.g1 td:last-child { color: var(--free); font-weight: 800; }
.ww-table--edit input { padding: 7px 10px; }
.ww-scale { margin: 12px 0; }
.ww-scale summary { cursor: pointer; font-weight: 800; margin-bottom: 10px; }

.ww-hubsec h2 { font-size: 1.25rem; }

.ww-card__time { font: 700 1.4rem var(--mono) !important; color: var(--ink) !important; }

.ww-bignum__n, .ww-count__days, .ww-mirror { border: 0; box-shadow: none; }
.ww-sticker { border: 0; box-shadow: none; border-radius: 18px; }

.ww-drop .ww-ico { border: 0; box-shadow: none; }

.ww-badges li { border: 1px solid var(--line); background: var(--surface); font-weight: 700; }
.ww-result, .ww-pcalc output, .ww-ratio output, .ww-convert__swap { border: 0; }
.ww-convert__swap { box-shadow: none; }

.ww-tabs { border-width: 1px; }
.ww-tabs button[aria-selected="true"] { border-color: transparent; }
.ww-drop { border-width: 2px; border-color: var(--line); }
.ww-holidays__item--ustawowe em { border-color: transparent; }
.ww-holidays__item em { border-width: 1px; }
.ww-field input, .ww-field select, .ww-field textarea, .ww-pcalc input, .ww-ratio input, .ww-table--edit input { border-width: 1px; }
.ww-field input:focus, .ww-field select:focus, .ww-field textarea:focus, .ww-pcalc input:focus, .ww-ratio input:focus, .ww-table--edit input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }

.ww-count__grid div, .ww-stats li, .ww-chips a, .ww-file img, .ww-file__ico, .ww-progress { border-width: 1px; }
.ww-chips a:hover { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--primary); }

.ww-drop { border-width: 1.5px; }

.ww-bmibar { position: relative; display: flex; margin: 18px 0 6px; border-radius: 10px; overflow: hidden; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.ww-bmibar span { padding: 7px 8px; text-align: center; color: var(--lime-ink); }
.ww-bmibar span:nth-child(1) { background: #cfe3ff; }
.ww-bmibar span:nth-child(2) { background: var(--lime); }
.ww-bmibar span:nth-child(3) { background: #ffe08a; }
.ww-bmibar span:nth-child(4) { background: #ffb4a8; }
.ww-bmibar i { position: absolute; top: -4px; bottom: -4px; width: 4px; margin-left: -2px; background: var(--ink); border-radius: 2px; left: 0; transition: left .2s; }
.ww-warn { background: #fff1ef; border: 1px solid #f3b6ad; border-radius: var(--radius-sm); padding: 12px 14px; color: #6b1d14; }
:root[data-theme="dark"] .ww-warn { background: #3a1a17; border-color: #6b2b24; color: #ffd5cf; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ww-warn { background: #3a1a17; border-color: #6b2b24; color: #ffd5cf; } }
