/* treniraj.si v5 — footer (SPEC §4) + mobile tab bar (SPEC §9).
   Black footer: 5-col grid (2fr 1fr 1fr 1fr 1.4fr) + bottom row. The newsletter band is NOT here (home.css owns it);
   the white page background between the band and this footer is what separates the two black masses.
   Rules: tokens only, every selector once, no important-overrides, breakpoints 480/768/1024/1280. */

/* ══ Footer ══ */
.tr-footer{padding:var(--tr-s8) 0 var(--tr-s5);background:var(--tr-black);color:var(--tr-on-dark);}
.tr-footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr 1.4fr;gap:var(--tr-s6) var(--tr-s7);}
.tr-footer-brand{min-width:0;}
.tr-footer-logo{display:inline-flex;}
.tr-footer-tagline{margin-top:var(--tr-s4);font-size:var(--tr-fs-15);color:var(--tr-on-dark-muted);}
.tr-footer-contact{display:flex;flex-direction:column;gap:var(--tr-s1);margin-top:var(--tr-s5);font-size:var(--tr-fs-14);color:var(--tr-on-dark-muted);}
.tr-footer-contact a{display:inline-flex;align-items:center;gap:var(--tr-s2);min-height:32px;color:var(--tr-on-dark-muted);}
.tr-footer-contact a:hover{color:var(--tr-on-dark);}
.tr-footer-contact span{display:inline-flex;align-items:flex-start;gap:var(--tr-s2);min-height:32px;padding-top:6px;}
.tr-footer-contact svg{flex:none;margin-top:1px;color:var(--tr-on-dark-faint);}
.tr-footer-col{min-width:0;}
.tr-footer-title{margin:0 0 var(--tr-s4);font-family:var(--tr-font);font-size:var(--tr-fs-12);font-weight:700;line-height:1.2;letter-spacing:.1em;text-transform:uppercase;color:var(--tr-on-dark);}
.tr-footer-links{display:flex;flex-direction:column;gap:var(--tr-s2);}
.tr-footer-links a{display:inline-block;padding:2px 0;font-size:var(--tr-fs-14);color:var(--tr-on-dark-muted);}
.tr-footer-links a:hover{color:var(--tr-on-dark);}
.tr-footer-side{min-width:0;justify-self:end;} /* flush with the container edge like the header actions and the bottom row (the 1.4fr column is wider than its content); ≤1024 the stacked block goes back to the left */
.tr-footer-social{display:flex;justify-content:flex-end;gap:var(--tr-s2);}
.tr-social{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;border:1px solid var(--tr-line-dark);background:transparent;color:var(--tr-on-dark);transition:background-color var(--tr-t) var(--tr-ease),color var(--tr-t) var(--tr-ease),border-color var(--tr-t) var(--tr-ease),transform var(--tr-t) var(--tr-ease);}
.tr-dark .tr-social:hover{background:var(--tr-white);border-color:var(--tr-white);color:var(--tr-ink);transform:translateY(-1px);} /* .tr-dark a:hover (base.css) ima višjo specifičnost — zato je tu .tr-dark pred selektorjem, sicer ikona ostane bela na beli */
.tr-footer-pay{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--tr-s2);margin:var(--tr-s5) 0 0;padding:0;list-style:none;}
.tr-footer-pay li{display:block;line-height:0;}
.tr-footer-pay img{display:block;width:46px;height:29px;border-radius:var(--tr-r-sm);}
.tr-footer-bottom{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--tr-s3) var(--tr-s5);margin-top:var(--tr-s8);padding:var(--tr-s5) 0 0;border-top:1px solid var(--tr-line-dark);font-size:var(--tr-fs-13);color:var(--tr-on-dark-faint);}
.tr-footer-copy{margin:0;}
.tr-footer-legal{display:flex;flex-wrap:wrap;align-items:center;gap:var(--tr-s2);}
.tr-footer-legal a{color:var(--tr-on-dark-muted);}
.tr-footer-legal a:hover{color:var(--tr-on-dark);}
.tr-footer-cookie{display:inline-flex;align-items:center;min-height:24px;color:var(--tr-on-dark-muted);font-size:inherit;line-height:inherit;cursor:pointer;transition:color var(--tr-t) var(--tr-ease);}
.tr-footer-cookie:hover{color:var(--tr-on-dark);}
.tr-footer-cookie:hover span{text-decoration:underline;text-underline-offset:2px;} /* underline the label only — a decoration on the button itself would also underline the ::before dot (decorations propagate to in-flow children) */
/* "·" separator drawn on every item after the first (footer.php has no dot spans): it wraps together with its item, so a line can never end in a dangling dot */
.tr-footer-legal > * + *::before{content:"\00B7";margin-right:var(--tr-s2);color:var(--tr-on-dark-faint);}
.tr-footer-credit{color:var(--tr-on-dark-faint);}

/* ══ Mobile tab bar (≤ 768px only) ══ */
.tr-tabbar{display:none;}

/* ══ Responsive ══ */
@media (max-width:1024px){
  .tr-footer-grid{grid-template-columns:1fr 1fr 1fr;gap:var(--tr-s6) var(--tr-s5);}
  .tr-footer-brand{grid-column:1 / -1;}
  .tr-footer-side{grid-column:1 / -1;justify-self:start;}
  .tr-footer-social{justify-content:flex-start;}
  .tr-footer-pay{justify-content:flex-start;}
}
@media (max-width:768px){
  /* tab bar owns the bottom --tr-tabbar-h: body padding + the FAB/cookie lift contract (components.css --tr-fab-lift) */
  body{padding-bottom:calc(var(--tr-tabbar-h) + env(safe-area-inset-bottom,0px));--tr-fab-lift:var(--tr-tabbar-h);}
  .tr-footer{padding-top:var(--tr-s7);}
  .tr-footer-grid{grid-template-columns:1fr 1fr;}
  .tr-footer-side{grid-column:auto;} /* 2-col: Trgovina | Pomoč, Podjetje | social+cards — no orphaned third column with an empty cell */
  /* checkout (not the thank-you page): no tab bar and no scroll-to-top FAB (main.js) — nothing floats over the payment text; body/FAB lift contract reset with it */
  body.woocommerce-checkout:not(.woocommerce-order-received){padding-bottom:0;--tr-fab-lift:0px;}
  body.woocommerce-checkout:not(.woocommerce-order-received) .tr-tabbar{display:none;}
  /* SPEC §9 tap targets ≥ 44px: link rows grow, list gap collapses so the rhythm stays */
  .tr-footer-links{gap:0;}
  .tr-footer-links a{display:inline-flex;align-items:center;min-height:44px;padding:0;}
  .tr-footer-contact{gap:0;}
  .tr-footer-contact a{min-height:44px;}
  .tr-footer-contact span{min-height:44px;}
  /* ≤768 the row would wrap (481–590 too) and a "·" then leads or trails a line either way → dot-less 2×2 grid of 44px rows (auto tracks: max-content while it fits, shrink at 360) */
  .tr-footer-legal{display:grid;grid-template-columns:repeat(2,auto);justify-content:start;gap:0 var(--tr-s5);}
  .tr-footer-legal > * + *::before{content:none;}
  .tr-footer-legal a{display:inline-flex;align-items:center;min-height:44px;}
  .tr-footer-cookie{min-height:44px;}
  .tr-footer-bottom{margin-top:var(--tr-s7);padding-bottom:0;} /* no FAB reserve here: ≤768 both FABs are hidden (components.css, tab bar era) — the 56px would be dead black above the tab bar */
  /* z-scale + height from tokens.css (tabbar 850 < fab 900 < sticky-add 940 — no overlap thanks to --tr-fab-lift); label 11px/600 (SPEC §9) */
  .tr-tabbar{position:fixed;left:0;right:0;bottom:0;z-index:var(--tr-z-tabbar);display:grid;grid-template-columns:repeat(4,1fr);height:calc(var(--tr-tabbar-h) + env(safe-area-inset-bottom,0px));padding-bottom:env(safe-area-inset-bottom,0px);background:var(--tr-white);border-top:var(--tr-border);}
  .tr-tabbar-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:44px;color:var(--tr-grey-700);font-size:var(--tr-fs-12);font-weight:600;line-height:1.2;-webkit-tap-highlight-color:transparent;}
  .tr-tabbar-item:hover{color:var(--tr-ink);}
  /* [aria-current] — "page" on the exact tab URL, "location" for the section (inc/chrome.php treniraj_tabbar_current_attr) */
  .tr-tabbar-item[aria-current]{color:var(--tr-red-ink);}
  .tr-tabbar-item svg{width:24px;height:24px;}
}
@media (max-width:480px){
  .tr-footer-grid{grid-template-columns:1fr;}
  .tr-footer-bottom{flex-direction:column;align-items:flex-start;}
}
