/* Općina Cerna — rezultati pretrage. Nadopunjuje cerna-arhiva.css (paginacija). */

.cr-omot {
  --cr-accent: #0f6c99;
  /* Sirina filtara i razmak prate razinu, kao u prototipu:
     300/280/250 px i 56/52/40 px. Kontrola u panelu ih pregazi. */
  --cr-filtri-w: 280px;
  --cr-gap: 52px;
  font-family: "Barlow", system-ui, sans-serif;
  color: #586f7c;
}

.cr {
  display: grid;
  grid-template-columns: var(--cr-filtri-w) minmax(0, 1fr);
  gap: var(--cr-gap);
  align-items: start;
}

/* --- Bočni filtri --- */
.cr-filtri { display: flex; flex-direction: column; gap: 30px; }
.cr-faceta { display: flex; flex-direction: column; gap: 4px; }

.cr-faceta-n {
  padding-bottom: 10px;
  margin-bottom: 6px;
  border-bottom: 2px solid #1f2c33;
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1f2c33;
}

.cr-omot .cr-radio,
.cr-omot button.cr-radio {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 42px;
  margin: 0 !important;
  padding: 4px 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
  text-align: left;
  text-transform: none !important;
  letter-spacing: normal;
  font-family: "Barlow", system-ui, sans-serif;
  font-size: 16px;
  color: #37474f !important;
}

.cr-omot .cr-radio:hover { color: var(--cr-accent) !important; background: transparent !important; }
.cr-radio:focus-visible { outline: 3px solid rgba(128, 216, 255, 0.75); outline-offset: -2px; }

.cr-omot .cr-radio.is-active {
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--cr-accent) !important;
  background: transparent !important;
}

.cr-tocka {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 1px solid #cfdae0;
  background: #fff;
}

.cr-radio.is-active .cr-tocka { border: 4px solid var(--cr-accent); }
.cr-radio-t { flex: 1; min-width: 0; }
.cr-broj { flex: 0 0 auto; font-family: "Barlow", system-ui, sans-serif; font-weight: 400; font-size: 14px; color: #586f7c; }

.cr-savjet {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  background: #f4f9fc;
  border: 1px solid #dceaf2;
}

.cr-savjet-n {
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cr-accent);
}

.cr-savjet-t { font-size: 15px; line-height: 1.65; color: #37474f; }
.cr-savjet-t a { color: var(--cr-accent); text-decoration: underline; text-underline-offset: 2px; }

/* --- Polje pretrage --- */
.cr-glavno { display: flex; flex-direction: column; min-width: 0; }

.cr-polje-omot {
  display: flex;
  align-items: center;
  height: 58px;
  margin-bottom: 30px;
  border: 1px solid #dfe7eb;
  background: #fff;
  overflow: hidden;
}

/* Tražilica postavljena zasebno, u zaglavlju: nema razmaka ispod, a sirinu
   zadaje widget kroz --cr-trazilica-w (prototip: 560 / 520 / 460 px). */
.cr-polje-omot--sama {
  /* Kao dijete flex retka mora nositi vlastitu sirinu, inace je zaglavlje
     stisne na sadrzaj. `max-width: 100%` cuva je od prelijevanja kad se
     zaglavlje slozi u stupac. */
  flex: 0 0 auto;
  margin-bottom: 0;
  width: var(--cr-trazilica-w, 520px);
  max-width: 100%;
}

.cr-polje-ikona { display: flex; align-items: center; padding: 0 16px; color: #586f7c; }

.cr-polje-omot .cr-polje,
.cr-polje-omot input[type="search"].cr-polje {
  flex: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0 12px 0 0;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none;
  background: transparent !important;
  font-family: "Barlow", system-ui, sans-serif;
  font-size: 16.5px;
  color: #37474f;
  -webkit-appearance: none;
  appearance: none;
}

.cr-polje::-webkit-search-decoration,
.cr-polje::-webkit-search-cancel-button { -webkit-appearance: none; }
.cr-polje-omot:focus-within { border-color: #0f6c99; box-shadow: 0 0 0 3px rgba(128, 216, 255, 0.45); }

.cr-polje-omot .cr-trazi {
  flex: 0 0 auto;
  height: 100%;
  padding: 0 26px;
  border: none !important;
  border-radius: 0 !important;
  background: #37474f !important;
  color: #fff !important;
  cursor: pointer;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cr-polje-omot .cr-trazi:hover { background: var(--cr-accent) !important; }

/* --- Rezultati --- */
.cr-sadrzaj { transition: opacity 140ms; }
.cr-sadrzaj[aria-busy="true"] { opacity: 0.45; }
.cr-brojevi { display: none; }

/* Redak iznad rezultata: broj lijevo, sortiranje i ciscenje desno. */
.cr-traka {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 2px solid #1f2c33;
}

.cr-broj-rez { font-size: 16px; color: #586f7c; }

.cr-traka-akcije { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* Klasa stoji dvaput: Elementorov kit stilizira `button` globalno. */
.cr-omot .cr-sort.cr-sort,
.cr-omot .cr-ocisti.cr-ocisti {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid #dfe7eb;
  border-radius: 0;
  background: #fff;
  cursor: pointer;
}

.cr-omot .cr-sort.cr-sort {
  color: #37474f;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cr-omot .cr-ocisti.cr-ocisti {
  color: #586f7c;
  font-family: "Barlow", system-ui, sans-serif;
  font-size: 15px;
  text-transform: none;
}

.cr-omot .cr-sort.cr-sort:hover,
.cr-omot .cr-ocisti.cr-ocisti:hover {
  border-color: #80d8ff;
  background: #fff;
  color: var(--cr-accent);
}

.cr-sort:focus-visible,
.cr-ocisti:focus-visible { outline: 3px solid rgba(128, 216, 255, 0.75); outline-offset: -2px; }

.cr-lista { display: flex; flex-direction: column; }

.cr-stavka {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  padding: 26px 0;
  border-bottom: 1px solid #eef2f4;
}

.cr-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.cr-omot .cr-meta .cn-oznaka {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px !important;
  border-radius: 0 !important;
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cr-datum, .cr-put { font-size: 14.5px; color: #586f7c; }

.cr-omot a.cr-naslov,
.cr-omot a.cr-naslov:visited {
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 700;
  font-size: 21px;
  line-height: 1.3;
  color: #1f2c33 !important;
  text-decoration: none !important;
  text-wrap: pretty;
}

.cr-omot a.cr-naslov:hover { color: var(--cr-accent) !important; }
.cr-omot a.cr-naslov:focus-visible { outline: 3px solid rgba(128, 216, 255, 0.75); outline-offset: 2px; }

.cr-izvadak { font-size: 16.5px; line-height: 1.7; color: #586f7c; max-width: 760px; text-wrap: pretty; }
.cr-izvadak mark { background: #d8f1fd; color: #1f2c33; }

.cr-omot a.cr-otvori,
.cr-omot a.cr-otvori:visited {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid #dfe7eb;
  color: #37474f !important;
  text-decoration: none !important;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cr-omot a.cr-otvori:hover { border-color: #80d8ff; color: var(--cr-accent) !important; }

/* --- Prazno stanje --- */
.cr-prij-n {
  padding-top: 6px;
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #586f7c;
}

.cr-prij { display: flex; flex-wrap: wrap; gap: 9px; }

.cr-omot .cr-prij-b,
.cr-omot button.cr-prij-b {
  height: 38px;
  margin: 0 !important;
  padding: 0 15px !important;
  border: 1px solid #dfe7eb !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  color: #37474f !important;
  cursor: pointer;
  text-transform: none !important;
  letter-spacing: normal;
  font-family: "Barlow", system-ui, sans-serif;
  font-size: 15.5px;
  white-space: nowrap;
}

.cr-omot .cr-prij-b:hover { border-color: #80d8ff !important; color: var(--cr-accent) !important; background: #fff !important; }
.cr-prij-b:focus-visible { outline: 3px solid rgba(128, 216, 255, 0.75); outline-offset: -2px; }

/* Prazno stanje je kartica, kako trazi dizajn. Dotad je nosila klasu iz
   stilske datoteke novosti, koja se na ovoj stranici ne ucitava, pa je
   sve stajalo kao goli tekst jedan do drugoga. */
.cr-prazno {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 32px;
  padding: 40px 44px;
  background: #f4f9fc;
  border: 1px solid #dceaf2;
}

.cr-prazno-n {
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 700;
  font-size: 21px;
  color: #1f2c33;
}

.cr-prazno-t {
  max-width: 560px;
  font-size: 16.5px;
  line-height: 1.7;
  color: #586f7c;
}

.cr-prazno-akcije {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 10px;
}

.cr-omot a.cr-prazno-veza {
  font-size: 16px;
  color: var(--cr-accent) !important;
  text-decoration: none !important;
  border-bottom: 1px solid #b9dcee;
  padding-bottom: 2px;
}

.cr-omot a.cr-prazno-veza:hover { border-color: var(--cr-accent); }

.cr-omot a.cr-prazno-btn {
  display: inline-flex;
  align-items: center;
  height: 50px;
  padding: 0 26px;
  background: #37474f;
  color: #fff !important;
  text-decoration: none !important;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cr-omot a.cr-prazno-btn:hover { background: var(--cr-accent); }

/* --- Razine --- */
@media (min-width: 1920px) {
  .cr-omot { --cr-filtri-w: 300px; --cr-gap: 56px; }
}

@media (max-width: 1440px) {
  .cr-omot { --cr-filtri-w: 250px; --cr-gap: 40px; }
}

@media (max-width: 1024px) {
  /* Ispod 1025 px zaglavlje ide u stupac, pa polje uzima punu sirinu. */
  .cr-polje-omot--sama { width: 100%; }
  .cr { grid-template-columns: 1fr !important; gap: 32px; }
  .cr-filtri { order: 2; }
  .cr-glavno { order: 1; }
}

@media (max-width: 768px) {
  .cr-polje-omot { height: 54px; margin-bottom: 24px; }
  .cr-polje-omot--sama { margin-bottom: 0; max-width: none; }
  .cr-polje-omot .cr-trazi { padding: 0 18px; }
  .cr-put { display: none; }
  .cr-omot a.cr-naslov { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) { .cr-sadrzaj { transition: none; } }

/* Teme boje <button> elemente vlastitim stilovima — poništavamo ih za sve
   kontrole u ovom pluginu (filtri, pilule, paginacija, prijedlozi). */
.cn-chip, .ca-pg, .cr-radio, .cr-prij-b, .cbl-celija, .cb-btn, .cc-dg,
.co-zatvori, .cm-toggle, .cm-d-btn, .cd-zatvori, .cr-trazi {
  -webkit-appearance: none !important;
  appearance: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  text-transform: uppercase;
}

/* Radio i prijedlozi nisu verzalni — vraćamo im normalno pisanje. */
.cr-radio, .cr-prij-b { text-transform: none !important; }

@media (max-width: 768px) {
  .cr-prazno { margin-top: 24px; padding: 26px 22px; }
  .cr-traka { align-items: flex-start; flex-direction: column; gap: 18px; }
}
