/* ===== Ljubljana smo vsi · Pobude ===== */

:root {
  /* Ljubljana smo vsi palette (variable names kept from the shared template) */
  --navy: #0B369A; --navy-deep: #0A2A6E; --navy-soft: #E8EDF8;
  --sun: #E35200; --sun-light: #FF7D1F;
  --beige: #F1E7DF; --paper: #FAF7F5;
  --text: #2C2C2C; --muted: rgba(44,44,44,.62); --line: rgba(11,54,154,.14);
  --danger: #B42318; --radius: 1rem; --shadow: 0 10px 30px rgba(11,54,154,.12);
  --topbar-h: 76px;
  --font: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --font-narrow: "Arial Narrow", "Roboto Condensed", "Helvetica Neue Condensed", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--text); background: var(--paper); line-height: 1.5; display: flex; flex-direction: column; min-height: 100vh; }
a { color: var(--navy); }
h1, h2, h3 { font-family: var(--font-narrow); font-weight: 700; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.005em; color: var(--navy); }
h1 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
.muted { color: var(--muted); }
.hl { color: var(--sun); }
.hidden { display: none !important; }

/* ---- top bar ---- */
.topbar { background: var(--paper); color: var(--navy); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1000; }
.topbar-inner { max-width: 1400px; margin: 0 auto; height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 1.25rem; }
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--navy); }
.brand img { height: 52px; width: auto; }
.brand-tag { font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; background: var(--sun); color: #fff; padding: .15rem .55rem; border-radius: 999px; }
.nav { display: flex; align-items: center; gap: 1.25rem; font-weight: 600; font-size: .95rem; }
.nav a { color: var(--navy); text-decoration: none; opacity: .9; text-transform: uppercase; font-size: .85rem; }
.nav a:hover, .nav a.active { opacity: 1; text-decoration: underline; text-decoration-color: var(--sun); text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav a.btn { opacity: 1; text-decoration: none; }
@media (max-width: 640px) {
  .brand img { height: 40px; } .brand-tag { display: none; }
  .nav { gap: .8rem; font-size: .88rem; } .nav .btn { padding: .5rem .8rem; }
}

/* ---- buttons / fields ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 0; border-radius: 999px; padding: .7rem 1.25rem; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .15s, background .15s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--navy); color: #fff; } .btn-primary:hover { background: #082a78; }
.btn-sun { background: var(--sun); color: #fff; text-transform: uppercase; letter-spacing: .02em; } .btn-sun:hover { background: #c94800; }
.btn-ghost { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); } .btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--navy); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: .45rem .9rem; font-size: .9rem; }

.field { display: flex; flex-direction: column; gap: .35rem; }
.field label, .label { font-weight: 600; font-size: .95rem; }
.field .hint { font-size: .85rem; color: var(--muted); }
.polje { display: block; width: 100%; border-radius: var(--radius); border: 1px solid rgba(11,54,154,.18); background: #fff; padding: .85rem 1.05rem; font: inherit; font-size: 1.02rem; color: var(--text); transition: border-color .2s, box-shadow .2s; }
.polje::placeholder { color: rgba(44,44,44,.42); }
.polje:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11,54,154,.18); }
.polje.invalid { border-color: var(--danger); }
textarea.polje { min-height: 140px; resize: vertical; }
select.polje { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230B369A' d='M0 0h12L6 8z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1.05rem center; padding-right: 2.6rem; }
.counter { font-size: .8rem; color: var(--muted); text-align: right; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; }
.check input { margin-top: .2rem; width: 1.15rem; height: 1.15rem; accent-color: var(--navy); flex-shrink: 0; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---- layout ---- */
.main { flex: 1; }
.container { max-width: 1100px; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.card { background: #fff; border-radius: 1.5rem; box-shadow: var(--shadow); padding: clamp(1.25rem, 3vw, 2.25rem); }
.grid-2 { display: grid; gap: 1.25rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }
.footer { background: var(--navy); color: rgba(255,255,255,.8); font-size: .88rem; }
.footer-inner { max-width: 1400px; margin: 0 auto; padding: 1.1rem 1.25rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.footer a { color: #fff; } .footer .muted { color: rgba(255,255,255,.5); margin-left: auto; }

/* pins */
.pin { width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.pin-new { background: var(--sun); width: 32px; height: 32px; }
/* ---- submit page: full-screen map behind, floating cards ---- */
.map-stage { position: relative; height: calc(100vh - var(--topbar-h)); height: calc(100dvh - var(--topbar-h)); overflow: hidden; }
#pickMap { position: absolute; inset: 0; z-index: 0; background: #e9eef5; }
.map-overlay { position: absolute; inset: 0; z-index: 500; pointer-events: none; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1rem; }
.map-overlay > .card { pointer-events: auto; box-shadow: 0 12px 40px rgba(11,54,154,.22); }
.map-card { width: clamp(320px, 27vw, 410px); display: grid; gap: .9rem; padding: 1.25rem; }
.form-card { width: clamp(380px, 34vw, 520px); max-height: 100%; overflow-y: auto; display: grid; gap: 1.1rem; padding: 1.5rem; overscroll-behavior: contain; }
.form-h1 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); text-transform: uppercase; margin-bottom: .35rem; }
.lead { margin: 0; font-size: .95rem; }
.card-title { font-family: var(--font-narrow); font-size: 1.25rem; font-weight: 700; text-transform: uppercase; color: var(--sun); letter-spacing: .01em; }
body.page-map .footer { display: none; }
@media (max-width: 900px) {
  .map-stage { height: auto; overflow: visible; }
  #pickMap { position: relative; height: 55vh; height: 55dvh; min-height: 340px; }
  .map-overlay { position: static; display: grid; padding: 1rem; pointer-events: auto; }
  .map-card, .form-card { width: auto; max-height: none; overflow: visible; }
  body.page-map .footer { display: block; }
}
.step-actions { display: flex; justify-content: space-between; gap: 1rem; margin-top: .5rem; flex-wrap: wrap; }
.combo { position: relative; }
/* list spans the whole street + number row (wider on phones) */
.addr-row .combo { position: static; }
.combo-field { position: relative; }
.combo-input { padding-right: 2.6rem; }
.combo-toggle { position: absolute; top: 0; right: 0; bottom: 0; width: 2.6rem; border: 0; background: transparent; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230B369A' d='M0 0h12L6 8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; transition: transform .15s; }
.combo.open .combo-toggle { transform: rotate(180deg); }
.combo-list { position: absolute; z-index: 1500; left: 0; right: 0; top: calc(100% + .35rem); max-height: 300px; overflow-y: auto; margin: 0; padding: .35rem;
  list-style: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.combo-list li { padding: .55rem .75rem; border-radius: .6rem; cursor: pointer; display: flex; justify-content: space-between; gap: .75rem; }
.combo-list li small { color: var(--muted); white-space: nowrap; }
.combo-list li.active, .combo-list li:hover { background: var(--navy-soft); }
.combo-list li.selected { font-weight: 700; }
.combo-list li.empty { color: var(--muted); cursor: default; background: none; }
.auto-hint { font-weight: 600; font-size: .8rem; color: var(--sun); margin-left: .35rem; }
select.polje.auto { border-color: rgba(227,82,0,.5); background-color: #FFF6F0; }
.addr-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem; align-items: end; margin-top: -.45rem; gap: .75rem; }
.pick-status.bad { color: var(--danger); font-weight: 600; }
.pick-bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; }
.pick-status { font-size: .92rem; color: var(--muted); } .pick-status.ok { color: var(--navy); font-weight: 700; }
.drop { position: relative; border: 2px dashed rgba(11,54,154,.2); border-radius: var(--radius); padding: 1.25rem; text-align: center; color: var(--muted); background: #fff; transition: border-color .2s, background .2s; }
.drop.over { border-color: var(--navy); background: var(--navy-soft); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-preview { display: flex; gap: 1rem; align-items: center; justify-content: center; }
.drop-preview img { max-height: 120px; max-width: 100%; min-width: 0; height: auto; object-fit: contain; border-radius: .6rem; }
.drop, .drop-preview { min-width: 0; max-width: 100%; overflow: hidden; }
.form-card > *, .map-card > *, .field > * { min-width: 0; }
.form-error { background: #fff4ed; color: var(--danger); border-radius: var(--radius); padding: .8rem 1rem; font-weight: 600; }
.notice { background: var(--navy-soft); border-radius: var(--radius); padding: .8rem 1rem; font-size: .9rem; }

/* ---- dialog ---- */
.dlg-backdrop { position: fixed; inset: 0; background: rgba(11,54,154,.45); display: grid; place-items: center; z-index: 5000; padding: 1rem; animation: dlgFade .15s ease-out; }
.dlg { background: #fff; border-radius: 1.25rem; box-shadow: 0 20px 60px rgba(11,54,154,.3); max-width: 440px; width: 100%; padding: 1.5rem; }
.dlg h3 { margin: 0 0 .5rem; } .dlg p { margin: 0 0 1.25rem; white-space: pre-wrap; }
.dlg-actions { display: flex; justify-content: flex-end; gap: .6rem; }
@keyframes dlgFade { from { opacity: 0; } }

/* ---- overflow guards ---- */
.grid-2 > *, .map-overlay > * { min-width: 0; }
select.polje { text-overflow: ellipsis; }
@media (max-width: 640px) { .topbar-inner { padding: 0 .9rem; } }
