/* Cookie consent banner, settings dialog and blocked third-party embed notices.
   Site palette: navy #2c2c86 on white, body text #333, muted #6d6d6d. */

.nub-consent-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Site-wide p/h2 rules (za_izdavace.css, static-pages.css) must not change
   the banner's text metrics. */
.nub-consent-text,
.nub-consent-links,
.nub-consent-cat__desc,
.nub-consent-embed__text {
  font-size: inherit;
  line-height: inherit;
}

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

.nub-consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9990;
  background: #fff;
  color: #333;
  border-top: 4px solid #2c2c86;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
  font-family: 'Roboto', sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
}

.nub-consent-banner[hidden] {
  display: none !important;
}

.nub-consent-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem 2rem;
}

.nub-consent-banner__body {
  flex: 1 1 auto;
  min-width: 0;
}

.nub-consent-title {
  margin: 0 0 0.35rem;
  padding: 0;
  border: 0;
  font-family: 'Roboto', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #2c2c86;
  text-align: left;
}

.nub-consent-text {
  margin: 0;
  color: #333;
}

.nub-consent-links {
  margin: 0.35rem 0 0;
  color: #6d6d6d;
}

.nub-consent-links a,
.nub-consent-cat__desc a {
  color: #2c2c86;
  text-decoration: underline;
}

.nub-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 0 0 auto;
}

/* Every choice uses the same style: accepting is never more prominent
   than rejecting. */
.nub-consent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  border: 2px solid #2c2c86;
  border-radius: 4px;
  background: #2c2c86;
  color: #fff;
  font-family: 'Roboto', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}

.nub-consent-btn:hover {
  background: #1f1f63;
  border-color: #1f1f63;
}

.nub-consent-btn:focus-visible,
.nub-consent-close:focus-visible,
.nub-consent-links a:focus-visible,
.nub-consent-cat input:focus-visible {
  outline: 3px solid #2c2c86;
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .nub-consent-banner__inner {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Phones: one row of three equal-width buttons keeps the banner low while
   every choice stays equally prominent. */
@media (max-width: 600px) {
  .nub-consent-banner {
    font-size: 0.85rem;
    line-height: 1.4;
  }
  .nub-consent-banner__inner {
    padding: 0.7rem 0.85rem;
    gap: 0.6rem;
  }
  .nub-consent-banner .nub-consent-title {
    font-size: 1rem;
    margin-bottom: 0.2rem;
  }
  .nub-consent-links {
    margin-top: 0.2rem;
  }
  .nub-consent-banner .nub-consent-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
  }
  .nub-consent-banner .nub-consent-btn {
    padding: 0.4rem 0.35rem;
    font-size: 0.85rem;
    hyphens: auto;
  }
}

/* ---- settings dialog ---- */

.nub-consent-dialog {
  width: min(36rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.25rem 1.5rem 1.5rem;
  border: 0;
  border-top: 4px solid #2c2c86;
  border-radius: 6px;
  background: #fff;
  color: #333;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  font-family: 'Roboto', sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
}

.nub-consent-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

/* Fallback for browsers without <dialog> support */
.nub-consent-dialog:not([open]) {
  display: none;
}

.nub-consent-dialog--fallback[open] {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9995;
}

.nub-consent-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.nub-consent-close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin: -0.5rem -0.75rem 0 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #333;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.nub-consent-close:hover {
  background: #f1f1f1;
}

.nub-consent-cats {
  margin: 1rem 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.nub-consent-cat {
  padding: 0.85rem 0;
  border-top: 1px solid #e0e0e0;
}

.nub-consent-cat:last-child {
  border-bottom: 1px solid #e0e0e0;
}

.nub-consent-cat__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nub-consent-cat__name {
  font-weight: 700;
  color: #2c2c86;
  cursor: default;
}

.nub-consent-cat label.nub-consent-cat__name {
  cursor: pointer;
}

.nub-consent-cat input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: #2c2c86;
  cursor: pointer;
}

.nub-consent-cat__always {
  margin-left: auto;
  font-size: 0.85rem;
  font-weight: 700;
  color: #2c2c86;
}

.nub-consent-cat__desc {
  margin: 0.35rem 0 0;
  color: #444;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .nub-consent-dialog {
    padding: 1rem;
  }
  .nub-consent-dialog .nub-consent-actions {
    flex-direction: column;
  }
  .nub-consent-dialog .nub-consent-btn {
    width: 100%;
  }
}

/* ---- blocked third-party iframes (notice instead of the iframe) ---- */

/* Blocked iframes stay hidden; the selector matches the specificity of the
   hero slider rule in base.css and comes later. */
iframe[data-consent-blocked-src],
.slider-box .slide.active iframe[data-consent-blocked-src] {
  display: none !important;
}

.nub-consent-embed {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 200px;
  padding: 1.25rem;
  border-radius: 8px;
  background: #1c1c2e;
  color: #fff;
  font-family: 'Roboto', sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

.nub-consent-embed--fill {
  position: absolute;
  inset: 0;
  z-index: 3;
  min-height: 0;
  border-radius: 0;
  overflow: auto;
}

.nub-consent-embed__text {
  max-width: 34rem;
  margin: 0;
  color: #fff;
}

.nub-consent-embed__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
}

.nub-consent-embed__link {
  color: #fff;
  text-decoration: underline;
}

.nub-consent-embed__link:hover {
  color: #fff;
}

.nub-consent-embed .nub-consent-btn:focus-visible,
.nub-consent-embed__link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .nub-consent-embed {
    font-size: 0.85rem;
    padding: 0.75rem;
  }
}

@media (forced-colors: active) {
  .nub-consent-btn,
  .nub-consent-banner,
  .nub-consent-dialog {
    border: 2px solid CanvasText;
  }
}
