/* TREJKA Media Folders – Pliki do pobrania (strona) */
.tmf-files {
	--tmf-fa-c: var(--tmf-fa, var(--wp--preset--color--primary, #2271b1));
	--tmf-fl: #e3e5e8;
	--tmf-fm: #646970;
	margin: 2em 0; clear: both; font-size: 15px; line-height: 1.5;
}
.tmf-files *, .tmf-files *::before, .tmf-files *::after { box-sizing: border-box; }
.tmf-files .tmf-files-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 1.15em; }
.tmf-files .tmf-files-count { font-size: 12px; font-weight: 600; line-height: 1.6; background: rgba(0, 0, 0, .06); border-radius: 10px; padding: 0 8px; color: var(--tmf-fm); }
.tmf-files ul { margin: 0; padding: 0; list-style: none; }
.tmf-files li { margin: 0; }
.tmf-files li::before, .tmf-files li::marker { content: none; }

/* ikona typu */
.tmf-fic {
	position: relative; flex: none; display: flex; align-items: flex-end; justify-content: center;
	width: 40px; height: 48px; padding-bottom: 7px; border-radius: 7px; background: #6b6f75; color: #fff;
	font: 800 11px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; letter-spacing: .03em;
}
.tmf-fic::before { content: ""; position: absolute; top: 0; right: 0; width: 12px; height: 12px; background: rgba(255, 255, 255, .35); border-bottom-left-radius: 5px; }
.tmf-fic.is-sm { width: 32px; height: 38px; font-size: 9.5px; padding-bottom: 5px; border-radius: 6px; }
.tmf-fic.is-sm::before { width: 10px; height: 10px; border-bottom-left-radius: 4px; }
.tmf-fic-pdf { background: #d32f2f; }
.tmf-fic-doc { background: #1e63c4; }
.tmf-fic-xls { background: #1b7f3b; }
.tmf-fic-ppt { background: #d35400; }
.tmf-fic-img { background: #8e44ad; }
.tmf-fic-av { background: #00838f; }

.tmf-fbody { flex: 1; min-width: 0; }
.tmf-files a.tmf-ftitle { display: block; font-weight: 600; line-height: 1.35; color: inherit; text-decoration: none; overflow-wrap: anywhere; box-shadow: none; }
.tmf-files a.tmf-ftitle:hover, .tmf-files a.tmf-ftitle:focus { color: var(--tmf-fa-c); text-decoration: underline; }
.tmf-fdesc { margin: 2px 0 0; font-size: .9em; opacity: .85; }
.tmf-fmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 2px; font-size: 12.5px; color: var(--tmf-fm); }
.tmf-fbadge { display: inline-block; font-size: 11px; font-weight: 700; line-height: 1.6; border-radius: 10px; padding: 0 8px; white-space: nowrap; }
.tmf-fbadge-new { background: #2e7d32; color: #fff; }
.tmf-fbadge-until { background: #fff4e5; color: #8a5300; border: 1px solid #f2c98b; font-weight: 600; }

/* przyciski */
.tmf-fi { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tmf-facts { display: flex; gap: 6px; flex: none; align-items: center; }
.tmf-files a.tmf-fbtn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; padding: 8px 14px;
	font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap; box-shadow: none;
	transition: background-color .15s, color .15s, filter .15s;
}
.tmf-files a.tmf-fbtn-dl { background: var(--tmf-fa-c); color: #fff; border: 1px solid var(--tmf-fa-c); }
.tmf-files a.tmf-fbtn-dl:hover, .tmf-files a.tmf-fbtn-dl:focus { filter: brightness(.9); color: #fff; }
.tmf-files a.tmf-fbtn-pv { background: #fff; color: var(--tmf-fa-c); border: 1px solid color-mix(in srgb, var(--tmf-fa-c) 45%, #fff); }
.tmf-files a.tmf-fbtn-pv:hover, .tmf-files a.tmf-fbtn-pv:focus { background: color-mix(in srgb, var(--tmf-fa-c) 8%, #fff); }
.tmf-files a.tmf-fbtn.is-icon {
	width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 0;
	background: color-mix(in srgb, var(--tmf-fa-c) 10%, #fff); color: var(--tmf-fa-c); filter: none;
}
.tmf-files a.tmf-fbtn.is-icon:hover, .tmf-files a.tmf-fbtn.is-icon:focus { background: var(--tmf-fa-c); color: #fff; }
.tmf-files a.tmf-fbtn:focus-visible { outline: 2px solid var(--tmf-fa-c); outline-offset: 2px; }

/* lista (domyślnie) */
.tmf-flist { border: 1px solid var(--tmf-fl); border-radius: 12px; overflow: hidden; background: #fff; }
.tmf-flist .tmf-fitem { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid #eef0f2; }
.tmf-flist .tmf-fitem:first-child { border-top: 0; }
.tmf-flist .tmf-fitem:hover { background: #fafafa; }

/* karty */
.tmf-fcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.tmf-fcards .tmf-fitem {
	display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border: 1px solid var(--tmf-fl); border-radius: 12px;
	transition: border-color .2s, box-shadow .2s, transform .2s;
}
.tmf-fcards .tmf-fitem:hover { border-color: var(--tmf-fa-c); box-shadow: 0 8px 22px rgba(0, 0, 0, .07); transform: translateY(-2px); }
.tmf-fcards .tmf-facts { flex-direction: column; align-items: stretch; }
.tmf-fcards a.tmf-ftitle { font-size: 1.03em; }

/* tabela */
.tmf-ftable-wrap { overflow-x: auto; }
.tmf-files table.tmf-ftable { width: 100%; margin: 0; border-collapse: collapse; border: 0; font-size: 14.5px; }
.tmf-ftable th {
	padding: 9px 10px; border: 0; border-bottom: 2px solid var(--tmf-fl); background: none; text-align: left;
	font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--tmf-fm); white-space: nowrap;
}
.tmf-ftable td { padding: 10px; border: 0; border-bottom: 1px solid #eef0f2; vertical-align: middle; background: none; }
.tmf-ftable tr:hover td { background: #fafafa; }
.tmf-ftable td.tmf-ft-name { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 220px; }
.tmf-ftable td.tmf-ft-name a { color: inherit; text-decoration: none; box-shadow: none; }
.tmf-ftable td.tmf-ft-name a:hover { color: var(--tmf-fa-c); text-decoration: underline; }
.tmf-ftable td.tmf-ft-name .tmf-fbadge { margin-top: 3px; }
.tmf-ftable td.tmf-ft-name > span:last-child { min-width: 0; }
.tmf-ft-until { display: block; }
.tmf-ft-mmeta { display: none; font-size: 12.5px; font-weight: 400; color: var(--tmf-fm); }
.tmf-ftable .tmf-ft-num { white-space: nowrap; color: var(--tmf-fm); }
.tmf-ftable .tmf-ft-act { text-align: right; white-space: nowrap; }
.tmf-ftable .tmf-ft-act .tmf-fbtn + .tmf-fbtn { margin-left: 6px; }

/* ZIP */
.tmf-files p.tmf-files-all { display: flex; justify-content: flex-end; margin: 14px 0 0; }
.tmf-files-all a { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--tmf-fa-c); text-decoration: none; box-shadow: none; }
.tmf-files-all a:hover { text-decoration: underline; }

/* archiwum */
.tmf-files-archive { margin-top: 22px; padding-top: 12px; border-top: 1px dashed #d5d8dc; }
.tmf-files-archive summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--tmf-fm); }
.tmf-files-archive .tmf-flist { margin-top: 10px; }
.tmf-files-archive .tmf-fitem { opacity: .72; }
.tmf-files-archive .tmf-fitem:hover { opacity: 1; }

.tmf-files-empty { padding: 10px 14px; border: 1px dashed #c3c4c7; border-radius: 8px; color: #646970; }

/* telefony */
@media (max-width: 600px) {
	.tmf-fcards .tmf-fitem { flex-wrap: wrap; }
	.tmf-fcards .tmf-facts { flex-direction: row; width: 100%; }
	.tmf-fcards .tmf-facts > * { flex: 1; }
	.tmf-ftable th:nth-child(2), .tmf-ftable td:nth-child(2), .tmf-ftable th:nth-child(3), .tmf-ftable td:nth-child(3), .tmf-ftable th:nth-child(4), .tmf-ftable td:nth-child(4) { display: none; }
	.tmf-ft-mmeta { display: block; }
	.tmf-ftable td { padding: 10px 6px; }
	.tmf-ftable .tmf-ft-act .tmf-fbtn + .tmf-fbtn { margin-left: 4px; }
	.tmf-ftable td.tmf-ft-name { min-width: 0; }
}

/* podgląd PDF */
.tmf-pdf-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(10, 12, 16, .72); }
.tmf-pdf-box.tmf-files { margin: 0; }
.tmf-pdf-box { display: flex; flex-direction: column; width: min(900px, 100%); height: min(88vh, 1000px); overflow: hidden; background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.tmf-pdf-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #e3e5e8; }
.tmf-pdf-head strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; color: #1d2327; }
.tmf-pdf-head a.tmf-fbtn { padding: 6px 12px; font-size: 13.5px; }
.tmf-pdf-close { flex: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: #f1f1f1; color: #1d2327; font-size: 20px; line-height: 34px; cursor: pointer; }
.tmf-pdf-close:hover, .tmf-pdf-close:focus { background: #e2e2e2; }
.tmf-pdf-frame { flex: 1; width: 100%; min-height: 0; border: 0; }
html.tmf-pdf-open { overflow: hidden; }

/* przeglądarka PDF */
.tmf-pdfv-wrap { margin: 2em 0; }
.tmf-pdfv { position: relative; display: flex; flex-direction: column; background: #3b3f44; border-radius: 12px; overflow: hidden; outline: 0; min-height: 300px; }
.tmf-pdfv:focus-visible { box-shadow: 0 0 0 2px var(--tmf-fa-c, #2271b1); }
.tmf-pdfv:not(.is-mounted)::before { content: ""; display: block; height: 420px; }
.tmf-pdfv-stage { position: relative; flex: 1 1 auto; min-height: 240px; }
.tmf-pdfv[data-fixed] .tmf-pdfv-stage { height: var(--tmf-pdfv-h, 700px); flex: none; }
.tmf-pdfv-scroll { position: absolute; inset: 0; display: flex; overflow: hidden; }
.tmf-pdfv-scroll.is-zoomed { overflow: auto; -webkit-overflow-scrolling: touch; }
.tmf-pdfv-canvas { display: block; flex: none; margin: auto; max-width: none; background: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, .45); }
.tmf-pdfv.is-loading .tmf-pdfv-canvas { visibility: hidden; }
.tmf-pdfv-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center; color: #e6e8eb; font-size: 14px; pointer-events: none; }
.tmf-pdfv-msg[hidden] { display: none; }
.tmf-pdfv button.tmf-pdfv-btn, .tmf-pdfv a.tmf-pdfv-btn {
	display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; box-shadow: none; text-decoration: none; transition: background-color .15s;
}
.tmf-pdfv button.tmf-pdfv-btn:hover, .tmf-pdfv a.tmf-pdfv-btn:hover, .tmf-pdfv button.tmf-pdfv-btn:focus-visible, .tmf-pdfv a.tmf-pdfv-btn:focus-visible { background: var(--tmf-fa-c, #2271b1); color: #fff; }
.tmf-pdfv button.tmf-pdfv-btn:disabled { opacity: .3; cursor: default; background: rgba(255, 255, 255, .12); }
.tmf-pdfv button.tmf-pdfv-nav { position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -22px; background: rgba(20, 22, 26, .55); }
.tmf-pdfv button.tmf-pdfv-nav .tmf-fi { width: 24px; height: 24px; }
.tmf-pdfv.is-single .tmf-pdfv-nav, .tmf-pdfv.is-loading .tmf-pdfv-nav, .tmf-pdfv.is-error .tmf-pdfv-nav { display: none; }
.tmf-pdfv-prev { left: 10px; }
.tmf-pdfv-next { right: 10px; }
.tmf-pdfv-bar { display: flex; align-items: center; gap: 6px; flex: none; padding: 8px 12px; background: #24272b; color: #e6e8eb; font-size: 14px; }
.tmf-pdfv-sp { flex: 1; }
.tmf-pdfv-pages { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: inherit; font-size: 14px; white-space: nowrap; }
.tmf-pdfv input.tmf-pdfv-num { width: 54px; height: 32px; margin: 0; padding: 0 6px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 6px; background: rgba(255, 255, 255, .08); color: #fff; font-size: 14px; text-align: center; -moz-appearance: textfield; appearance: textfield; box-shadow: none; }
.tmf-pdfv input.tmf-pdfv-num::-webkit-outer-spin-button, .tmf-pdfv input.tmf-pdfv-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tmf-pdfv .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.tmf-pdfv.is-readonly, .tmf-pdfv.is-readonly canvas { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.tmf-pdfv.is-fill { flex: 1 1 auto; height: auto; border-radius: 0; min-height: 0; }
.tmf-pdfv.is-fill .tmf-pdfv-stage, .tmf-pdfv:fullscreen .tmf-pdfv-stage, .tmf-pdfv.is-full .tmf-pdfv-stage { flex: 1 1 0; min-height: 0; height: auto; }
.tmf-pdfv:-webkit-full-screen .tmf-pdfv-stage { flex: 1 1 0; min-height: 0; height: auto; }
.tmf-pdfv:fullscreen, .tmf-pdfv.is-full { border-radius: 0; width: 100%; height: 100%; }
.tmf-pdfv:-webkit-full-screen { border-radius: 0; width: 100%; height: 100%; }
.tmf-pdfv.is-full { position: fixed; inset: 0; z-index: 100001; }
@media (max-width: 600px) {
	.tmf-pdfv button.tmf-pdfv-nav { width: 36px; height: 36px; margin-top: -18px; }
	.tmf-pdfv-prev { left: 4px; }
	.tmf-pdfv-next { right: 4px; }
}
@media print {
	.tmf-pdfv.is-readonly { display: none !important; }
}

.tmf-pdfv button.tmf-pdfv-btn[hidden] { display: none; }
.tmf-pdfv button.tmf-pdfv-sp2.is-on { background: rgba(255, 255, 255, .3); }
