/**
 * Globalus išdėstymas: sticky footer, fiksuotas headeris, WP admin juosta.
 * Kraunama po Next CSS, kad perrašytų konfliktus.
 */

html {
  height: 100%;
  /* WP admin dažnai prideda margin-top — dubliuoja su mūsų fiksuotu headeriu */
  margin-top: 0 !important;
}

body.ga-theme-layout {
  min-height: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
}

/* Vieta WP admin juostai — turinys neina po ja */
body.ga-theme-layout.admin-bar {
  padding-top: 32px;
}

@media screen and (max-width: 782px) {
  body.ga-theme-layout.admin-bar {
    padding-top: 46px;
  }
}

/* Headeris po admin juosta (WP admin bar z-index ~99999) */
body.ga-theme-layout .ga-site-header {
  top: 0;
  z-index: 10050;
}

body.ga-theme-layout.admin-bar .ga-site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.ga-theme-layout.admin-bar .ga-site-header {
    top: 46px;
  }
}

/* Turinys ne po fiksuotu headeriu: 4rem = h-16 */
body.ga-theme-layout .ga-site-main {
  padding-top: 4rem;
  width: 100%;
  box-sizing: border-box;
}

/* Shell ištempia footerį žemyn, kai puslapis trumpas */
body.ga-theme-layout .ga-page-shell {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}

body.ga-theme-layout .ga-page-shell > .ga-site-main {
  flex: 1 1 auto;
}

/* Slapukų baneris: virš puslapio, po WP admin juosta */
#ga-cookie-banner {
  z-index: 10060;
}

body.admin-bar #ga-cookie-banner {
  bottom: 1.5rem;
}

@media screen and (max-width: 782px) {
  body.admin-bar #ga-cookie-banner {
    bottom: 3.25rem;
  }
}
