/*!
 * Zdravo budi – banner i postavke kolačića.
 * Boje, font i gumbi prema temi (assets/scss/settings/_settings.colors.scss, _components.button.scss).
 */
.zb-cc,
.cc-placeholder {
  --zb-red: #d51f26;
  --zb-red-dark: #8b1418;
  --zb-orange: #f5a623;
  --zb-orange-dark: #a86d07;
  --zb-text: #4a4444;
  --zb-gray: #f8f8f8;
  --zb-gray-light: #f1f1f1;
  --zb-line: #e4e1e1;
  font-family: "Inter", sans-serif;
  color: var(--zb-text);
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

.zb-cc *,
.zb-cc *::before,
.zb-cc *::after,
.cc-placeholder *,
.cc-placeholder *::before,
.cc-placeholder *::after {
  box-sizing: inherit;
}

.zb-cc [hidden] {
  display: none !important;
}

.zb-cc .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.zb-cc p {
  margin: 0;
}

.zb-cc button {
  font-family: inherit;
  margin: 0;
}

.zb-cc :focus-visible,
.cc-placeholder :focus-visible {
  outline: 2px solid var(--zb-orange);
  outline-offset: 2px;
}

/* ---------- zajedničko ---------- */

.zb-cc__text {
  font-size: 15px;
  line-height: 1.6;
}

.zb-cc__link {
  color: var(--zb-red);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.zb-cc__link:hover {
  color: var(--zb-red-dark);
}

.zb-cc__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--zb-text);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.zb-cc__close svg {
  width: 16px;
  height: 16px;
}

.zb-cc__close:hover {
  background-color: var(--zb-gray-light);
}

/* gumbi kao .c-button u temi: pill, crveni, velika slova */
.zb-cc__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 2px solid var(--zb-red);
  border-radius: 100px;
  background: var(--zb-red);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.zb-cc__btn:hover {
  background-color: var(--zb-red-dark);
  border-color: var(--zb-red-dark);
  color: #fff;
}

.zb-cc__btn--outline {
  background: #fff;
  color: var(--zb-text);
}

.zb-cc__btn--outline:hover {
  background: #fff;
  border-color: var(--zb-red-dark);
  color: var(--zb-red-dark);
}

.zb-cc__btn--orange {
  background: var(--zb-orange);
  border-color: var(--zb-orange);
}

.zb-cc__btn--orange:hover {
  background: var(--zb-orange-dark);
  border-color: var(--zb-orange-dark);
}

/* ---------- banner ---------- */

#zb-cc-banner {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 100000;
  width: 460px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 28px 28px 20px;
  background: #fff;
  border-top: 6px solid var(--zb-orange);
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
  outline: none;
  animation: zb-cc-in 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes zb-cc-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  #zb-cc-banner { animation: none; }
}

#zb-cc-banner .zb-cc__close {
  top: 10px;
  right: 10px;
}

.zb-cc-banner__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding-right: 32px;
}

.zb-cc-banner__icon {
  flex: 0 0 auto;
  display: inline-flex;
  color: var(--zb-red);
}

.zb-cc-banner__icon svg {
  width: 48px;
  height: auto;
}

.zb-cc-banner__title {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.3;
  text-transform: uppercase;
}

#zb-cc-banner .zb-cc__text {
  font-size: 14px;
}

#zb-cc-banner .zb-cc__buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.zb-cc__more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px !important;
  padding: 10px;
  border: 0;
  background: transparent;
  color: var(--zb-orange-dark);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.zb-cc__more svg {
  transform: rotate(-90deg);
  transition: transform 0.2s ease;
}

.zb-cc__more:hover {
  color: var(--zb-red);
}

.zb-cc__more:hover svg {
  transform: rotate(-90deg) translateY(3px);
}

@media (max-width: 600px) {
  #zb-cc-banner {
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-width: none;
    max-height: 85vh;
    padding: 22px 20px 12px;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
  }

  .zb-cc-banner__icon svg {
    width: 40px;
  }

  .zb-cc-banner__title {
    font-size: 16px;
  }

  #zb-cc-banner .zb-cc__btn {
    padding: 0 12px;
  }
}

/* ---------- postavke (modal) ---------- */

html.zb-cc-lock,
html.zb-cc-lock body {
  overflow: hidden;
}

#zb-cc-settings {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.zb-cc-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(74, 68, 68, 0.6);
}

.zb-cc-modal__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 860px;
  max-height: calc(100vh - 48px);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  outline: none;
  overflow: hidden;
}

.zb-cc-modal__header {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-height: 80px;
  padding: 20px 80px 20px 40px;
  border-bottom: 1px solid var(--zb-line);
}

.zb-cc-modal__header .zb-cc__close {
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
}

.zb-cc-modal__logo {
  display: inline-flex;
  color: var(--zb-red);
}

.zb-cc-modal__logo svg {
  width: 200px;
  height: auto;
}

.zb-cc-modal__body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 32px 40px;
}

.zb-cc-modal__intro {
  margin-bottom: 28px;
}

/* naslov kao naslovi sekcija na stranici ("TEME DANA") */
.zb-cc-modal__title {
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--zb-text);
  color: var(--zb-text);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.zb-cc-tabs {
  display: flex;
  gap: 32px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--zb-line);
}

.zb-cc-tabs__tab {
  position: relative;
  padding: 0 0 14px;
  border: 0;
  background: transparent;
  color: var(--zb-text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.65;
  cursor: pointer;
}

.zb-cc-tabs__tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
}

.zb-cc-tabs__tab:hover {
  opacity: 1;
}

.zb-cc-tabs__tab.is-active {
  color: var(--zb-red);
  opacity: 1;
}

.zb-cc-tabs__tab.is-active::after {
  background: var(--zb-red);
}

/* kategorije */
.zb-cc-cat {
  padding: 22px 24px;
  border-radius: 8px;
  background: var(--zb-gray);
}

.zb-cc-cat + .zb-cc-cat {
  margin-top: 12px;
}

.zb-cc-cat__main {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.zb-cc-cat__info {
  flex: 1 1 auto;
}

.zb-cc-cat__name {
  margin: 0 0 6px;
  color: var(--zb-text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.zb-cc-cat__desc {
  font-size: 14px;
  line-height: 1.6;
}

.zb-cc-cat__control {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 2px;
}

.zb-cc-cat__always {
  color: var(--zb-text);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.7;
  white-space: nowrap;
}

.zb-cc-switch {
  position: relative;
  width: 52px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 30px;
  background: #c9c4c4;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.zb-cc-switch__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.zb-cc-switch[aria-checked="true"] {
  background: var(--zb-red);
}

.zb-cc-switch[aria-checked="true"] .zb-cc-switch__knob {
  transform: translateX(22px);
}

.zb-cc-switch:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.zb-cc-cat__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px !important;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--zb-orange-dark);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.zb-cc-cat__toggle svg {
  transition: transform 0.2s ease;
}

.zb-cc-cat__toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.zb-cc-cat__toggle:hover {
  color: var(--zb-red);
}

/* tablica kolačića */
.zb-cc-cookies {
  margin-top: 12px;
  overflow-x: auto;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--zb-line);
}

.zb-cc-cookies__table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

.zb-cc-cookies__table th,
.zb-cc-cookies__table td {
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--zb-line);
  vertical-align: top;
  color: var(--zb-text);
}

.zb-cc-cookies__table th {
  background: var(--zb-gray-light);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.zb-cc-cookies__table tr:last-child td {
  border-bottom: 0;
}

.zb-cc-cookies__table td:first-child {
  word-break: break-all;
  min-width: 120px;
}

.zb-cc-cookies__table td:nth-child(3) {
  white-space: nowrap;
}

.zb-cc-cookies__vendor {
  display: block;
  font-weight: 700;
}

.zb-cc-cookies__vendor a {
  color: var(--zb-red);
  text-decoration: none;
}

.zb-cc-cookies__vendor a:hover {
  text-decoration: underline;
}

.zb-cc-panel--about p {
  font-size: 15px;
  line-height: 1.6;
}

.zb-cc-panel--about p + p {
  margin-top: 14px;
}

.zb-cc-panel__key {
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--zb-gray);
  font-size: 13px !important;
  word-break: break-all;
}

.zb-cc-modal__footer {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 20px 40px;
  border-top: 1px solid var(--zb-line);
  background: #fff;
}

@media (max-width: 760px) {
  #zb-cc-settings {
    padding: 0;
    align-items: flex-end;
  }

  .zb-cc-modal__dialog {
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
  }

  .zb-cc-modal__header {
    min-height: 64px;
    padding: 14px 64px 14px 20px;
  }

  .zb-cc-modal__header .zb-cc__close {
    right: 12px;
  }

  .zb-cc-modal__logo svg {
    width: 150px;
  }

  .zb-cc-modal__body {
    padding: 22px 20px;
  }

  .zb-cc-modal__title {
    font-size: 20px;
  }

  .zb-cc-tabs {
    gap: 20px;
  }

  .zb-cc-cat {
    padding: 18px 16px;
  }

  /* naziv + prekidač u prvom redu, opis preko cijele širine */
  .zb-cc-cat__main {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px 12px;
  }

  .zb-cc-cat__info {
    display: contents;
  }

  .zb-cc-cat__name {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    font-size: 16px;
  }

  .zb-cc-cat__control {
    grid-column: 2;
    grid-row: 1;
    gap: 8px;
    padding-top: 0;
  }

  .zb-cc-cat__desc {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .zb-cc-cat__always {
    font-size: 10px;
    white-space: normal;
    max-width: 64px;
    text-align: right;
    line-height: 1.2;
  }

  /* tablica kao kartice */
  .zb-cc-cookies {
    overflow: visible;
    background: transparent;
    border: 0;
  }

  .zb-cc-cookies__table thead {
    display: none;
  }

  .zb-cc-cookies__table,
  .zb-cc-cookies__table tbody,
  .zb-cc-cookies__table tr,
  .zb-cc-cookies__table td {
    display: block;
    width: 100%;
  }

  .zb-cc-cookies__table tr {
    padding: 12px 14px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--zb-line);
  }

  .zb-cc-cookies__table tr + tr {
    margin-top: 8px;
  }

  .zb-cc-cookies__table td {
    padding: 3px 0;
    border: 0;
    white-space: normal !important;
  }

  .zb-cc-cookies__table td::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.6;
  }

  .zb-cc-cookies__table td:first-child::before {
    display: none;
  }

  .zb-cc-cookies__table td:first-child {
    font-size: 15px;
  }

  .zb-cc-modal__footer {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  }

  .zb-cc-modal__footer .zb-cc__btn {
    min-height: 44px;
    padding: 0 12px;
    font-size: 13px;
  }

  .zb-cc-modal__footer .zb-cc__btn--orange {
    grid-column: 1 / -1;
  }
}

@media print {
  #zb-cc-banner,
  #zb-cc-settings {
    display: none !important;
  }
}

/* ---------- blokirani sadržaj ---------- */

[data-cc-blocked] {
  display: none !important;
}

.cc-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 220px;
  margin: 0 auto 1em;
  padding: 28px 24px;
  border-radius: 8px;
  background: var(--zb-gray);
  border-top: 6px solid var(--zb-orange);
  text-align: center;
}

.cc-placeholder__inner {
  max-width: 420px;
}

.cc-placeholder__title {
  margin: 0 0 8px !important;
  color: var(--zb-text);
  font-size: 18px !important;
  font-weight: 900;
  line-height: 1.3 !important;
  text-transform: uppercase;
}

.cc-placeholder__text {
  margin: 0 0 18px !important;
  color: var(--zb-text);
  font-size: 15px !important;
  line-height: 1.55 !important;
}

.cc-placeholder__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.cc-placeholder__accept,
.cc-placeholder__settings {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 0 22px;
  border: 2px solid var(--zb-red);
  border-radius: 100px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cc-placeholder__accept {
  background: var(--zb-red);
  color: #fff;
}

.cc-placeholder__accept:hover {
  background: var(--zb-red-dark);
  border-color: var(--zb-red-dark);
}

.cc-placeholder__settings {
  background: #fff;
  color: var(--zb-text);
}

.cc-placeholder__settings:hover {
  border-color: var(--zb-red-dark);
  color: var(--zb-red-dark);
}

/* preko naslovne slike videa (partials/video.php) */
.video-content.cc-video-blocked .video-cover {
  z-index: 1;
}

.video-content.cc-video-blocked .video-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.cc-placeholder--video {
  position: absolute;
  inset: 0;
  z-index: 2;
  min-height: 0;
  margin: 0;
  border-top: 0;
  background: rgba(46, 41, 41, 0.78);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.cc-placeholder--video .cc-placeholder__title,
.cc-placeholder--video .cc-placeholder__text {
  color: #fff;
}

.cc-placeholder--video .cc-placeholder__settings {
  background: transparent;
  border-color: #fff;
  color: #fff;
}

.cc-placeholder--video .cc-placeholder__settings:hover {
  background: #fff;
  border-color: #fff;
  color: var(--zb-text);
}

/* već dopušteno (klasa na <html> iz cookie-consent.js) – okvir se ne prikazuje ni na trenutak */
.zb-cc-has-performance [data-cc-placeholder="performance"],
.zb-cc-has-targeting [data-cc-placeholder="targeting"],
.zb-cc-has-functionality [data-cc-placeholder="functionality"] {
  display: none !important;
}

/* gumb za pokretanje videa (gradi ga cookie-consent.js nakon pristanka) */
.video-content .cc-play-button {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
}

/* Facebook dodatak na naslovnici (300 × 640) */
.c-widget-card .cc-placeholder {
  max-width: 300px;
  min-height: 640px;
}

@media (max-width: 600px) {
  .cc-placeholder {
    padding: 22px 16px;
  }

  .cc-placeholder--video {
    padding: 12px;
  }

  .cc-placeholder--video .cc-placeholder__title {
    margin-bottom: 4px !important;
    font-size: 14px !important;
  }

  .cc-placeholder--video .cc-placeholder__text {
    margin-bottom: 10px !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
  }

  .cc-placeholder--video .cc-placeholder__accept,
  .cc-placeholder--video .cc-placeholder__settings {
    min-height: 36px;
    padding: 0 14px;
    font-size: 11px;
  }
}
