/* ====== Osnovno ====== */
.problemi-form .pf-group{margin-bottom:22px}
.problemi-form h3{margin:0 0 12px;font-size:18px}
.problemi-form label{display:block;margin-bottom:10px;font-weight:600}
.problemi-form input[type=text],
.problemi-form input[type=email],
.problemi-form textarea,
.problemi-form select{
  width:100%;padding:10px 12px;border:1px solid #dcdcdc;border-radius:10px;
  background:#fff;outline:none;transition:border-color .15s, box-shadow .15s
}
.problemi-form input[type=text]:focus,
.problemi-form input[type=email]:focus,
.problemi-form textarea:focus,
.problemi-form select:focus{
  border-color:#7aa7ff;box-shadow:0 0 0 3px rgba(122,167,255,.15)
}
.problemi-form textarea{min-height:140px;resize:vertical}

/* ====== Previews ====== */
.pf-previews{display:flex;flex-wrap:wrap;gap:12px}
.pf-thumb{position:relative;width:130px;height:130px;border:1px solid #e8e8e8;border-radius:12px;overflow:hidden;background:#fafafa}
.pf-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .2s}
.pf-thumb:hover img{transform:scale(1.02)}
.pf-thumb .pf-thumb-actions{position:absolute;right:6px;top:6px;display:flex;gap:6px}
.pf-thumb button{background:#fff;border:1px solid #ccc;border-radius:8px;padding:4px 7px;cursor:pointer}

/* ====== Custom file input ====== */
.pf-file{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.pf-file-input{position:absolute;left:-9999px;visibility:hidden}
.pf-file-btn{
  display:inline-block;cursor:pointer;padding:10px 14px;border-radius:10px;border:1px solid #d0d7ff;
  background:#eef3ff;font-weight:700;user-select:none;transition:.15s;
}
.pf-file-btn:hover{background:#e5ecff;border-color:#b8c6ff}
.pf-file-hint{font-size:13px;color:#666}

/* ====== Submit dugme ====== */
.pf-actions{margin-top:14px}
.button.button-primary.pf-submit{
  background:#2b63ff;border:none;border-radius:12px;padding:12px 18px;font-weight:800;
  letter-spacing:.4px;color:#fff;cursor:pointer;transition:transform .06s, box-shadow .15s
}
.button.button-primary.pf-submit:hover{box-shadow:0 8px 20px rgba(43,99,255,.25);transform:translateY(-1px)}
.button.button-primary.pf-submit:active{transform:translateY(0)}

/* ====== Status badge ====== */
.problem-status-badge { display:inline-block; padding:4px 8px; border-radius:999px; font-size:12px; font-weight:600; }
.problem-status-prijavljeno { background:#fff3cd; color:#665200; border:1px solid #ffe69c; }
.problem-status-reseno      { background:#d1e7dd; color:#0f5132; border:1px solid #badbcc; }
.problem-status-nije-reseno { background:#f8d7da; color:#842029; border:1px solid #f5c2c7; }

/* ====== Tabela ====== */
.pf-table{width:100%;border-collapse:collapse}
.pf-table th,.pf-table td{border:1px solid #eee;padding:10px;text-align:left}

/* ====== Modal ====== */
.pf-modal{position:fixed;left:0;top:0;right:0;bottom:0;background:rgba(0,0,0,.4);display:flex;align-items:center;justify-content:center;z-index:9999}
.pf-modal-content{background:#fff;padding:16px;border-radius:12px;max-width:420px;width:90%}

/* ====== Mapa ====== */
.pf-map{width:100%;height:260px;border:1px solid #ddd;border-radius:10px;margin-top:8px}

/* ====== Komentari (ostaje kako smo već sredili) ====== */
.problem-komentari { margin-top: 24px; }
.problem-komentari h3 { margin-bottom: 12px; }
.problem-komentari .comment-list { list-style: none; margin: 0; padding: 0; }
.problem-komentari .comment-item { border:1px solid #eee; border-radius:10px; padding:12px; margin-bottom:10px; background:#fff; }
.problem-komentari .comment-item.comment-child { margin-left:24px; }
.problem-komentari .comment-meta { font-size:13px; color:#666; margin-bottom:6px; }
.problem-komentari .comment-author { font-weight:600; color:#222; }
.problem-komentari .comment-date { margin-left:8px; }
.problem-komentari .comment-actions a { font-size:13px; text-decoration: none; }
.problem-komentari .comment-actions a:hover { text-decoration: underline; }
.problem-komentari .problem-comment-form { margin-top: 18px; position:relative; }
.problem-komentari .pfc-cancel-wrap{ display:flex; justify-content:flex-end; margin-bottom:8px; }
.problem-komentari .pfc-cancel-btn{
  display:inline-block;background:#fff;border:1px solid #e1e1e1;border-radius:8px;padding:6px 10px;font-size:13px;cursor:pointer
}
.problem-komentari .pfc-row { margin-bottom: 10px; }
.problem-komentari .pfc-row label { display:block; margin-bottom:6px; }
.problem-komentari .pfc-row input[type=text],
.problem-komentari .pfc-row textarea { width:100%; padding:8px; border:1px solid #ddd; border-radius:8px; }
#pfc-message { margin-top: 8px; }
#pfc-message.pf-success { color: #0f5132; }
#pfc-message.pf-error   { color: #842029; }


/* Ulepšan upload */
.pf-file { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.pf-file-input { 
  position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden;
}
.pf-file-btn {
  display:inline-block; padding:10px 14px; border:1px dashed #bbb; border-radius:10px;
  cursor:pointer; font-weight:600; background:#fafafa;
}
.pf-file-btn:hover { background:#f5f5f5; }
.pf-file-hint { font-size:12px; color:#666; }

/* Previews zona kao drop target */
.pf-previews { display:flex; flex-wrap:wrap; gap:10px; padding:8px; border:1px dashed transparent; border-radius:10px; }
.pf-previews.pf-previews-drag { border-color:#bbb; background:#fafafa; }

.pf-thumb{position:relative;width:120px;height:120px;border:1px solid #ddd;border-radius:10px;overflow:hidden;background:#fff}
.pf-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .2s}
.pf-thumb .pf-thumb-actions{position:absolute;right:6px;top:6px;display:flex;gap:6px}
.pf-thumb button{background:#fff;border:1px solid #ccc;border-radius:6px;padding:2px 6px;cursor:pointer}
.pf-thumb button:hover{background:#f2f2f2}
.pf-previews .ui-sortable-placeholder{
  border:2px dashed #ccc; visibility:visible !important; width:120px; height:120px; border-radius:10px; background:#fafafa;
}

/* ====== MOJI PROBLEMI: responzivna tabela ====== */
.pf-table-wrap{border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;background:#fff}
.pf-table{width:100%;border-collapse:collapse}
.pf-table thead th{background:#f8fafc;border-bottom:1px solid #e5e7eb;font-weight:700}
.pf-table th,.pf-table td{padding:12px 14px;border-bottom:1px solid #f1f5f9;text-align:left;vertical-align:top}
.pf-table tbody tr:last-child td{border-bottom:none}

/* Mobile -> “cards” */
@media (max-width: 800px){
  .pf-table{display:block}
  .pf-table thead{display:none}
  .pf-table tbody{display:block}
  .pf-table tr{display:block;border-bottom:1px solid #eef2f7;margin:0}
  .pf-table tr+tr{border-top:1px solid #eef2f7}
  .pf-table td{
    display:flex;justify-content:space-between;gap:18px;
    padding:10px 14px;border:none;border-bottom:1px dashed #eef2f7
  }
  .pf-table td:last-child{border-bottom:none}
  .pf-table td::before{
    content:attr(data-label);
    font-weight:700;color:#334155;flex:0 0 46%;
  }
}

/* Dugmad (konzistentno + !important) */
.button.button-primary,
.button.button-primary.pf-submit{
  background:linear-gradient(135deg,#0ea5ea,#2563eb) !important;
  color:#fff !important;border:none !important;border-radius:12px !important;
  padding:10px 16px !important;font-weight:800 !important;letter-spacing:.2px !important;
  box-shadow:none !important;transition:transform .08s, box-shadow .15s, filter .15s !important
}
.button.button-primary:hover{transform:translateY(-1px);box-shadow:0 8px 22px rgba(37,99,235,.25) !important}

/* Thumbovi – uvek centrirani i “cover” (frontend i admin) */
.pf-thumb img{object-fit:cover;object-position:center center}

/* ====== Overlay za slanje (spinner + progress) ====== */
.pf-loading{
  position:fixed;inset:0;background:rgba(10,15,25,.55);display:flex;align-items:center;justify-content:center;
  z-index:99999;padding:20px
}
.pf-loading .pf-box{
  background:#0b1320;color:#e5e7eb;border:1px solid rgba(255,255,255,.12);
  width:min(520px,92vw);border-radius:14px;padding:18px 16px;text-align:center
}
.pf-loading .pf-row{margin-top:10px}
.pf-spinner{
  width:32px;height:32px;border-radius:50%;border:3px solid rgba(255,255,255,.25);
  border-top-color:#fff;display:inline-block;animation:pfspin .8s linear infinite
}
@keyframes pfspin{to{transform:rotate(360deg)}}
.pf-progress{height:8px;background:#0f172a;border-radius:999px;overflow:hidden;margin-top:10px}
.pf-progress-bar{height:100%;width:0;background:#22c55e;transition:width .15s}
.pf-loading .pf-note{font-size:13px;opacity:.9;margin-top:6px}


/* Lista kartica */
.pf-cards{
  display:grid;
  gap:16px;
}
.pf-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:16px;
  box-shadow:0 1px 3px rgba(0,0,0,.04);
}

/* Naslov */
.pf-card-title{
  margin:0 0 8px;
  font-size:18px;
}
.pf-card-title a{
  color:#0f172a;
  text-decoration:none;
}
.pf-card-title a:hover{
  text-decoration:underline;
}

/* Meta info */
.pf-card-meta{
  font-size:13px;
  color:#64748b;
  margin-bottom:10px;
}
.pf-card-meta .pf-date::after{
  content:"•";
  margin:0 6px;
  color:#cbd5e1;
}

/* Sekcije */
.pf-card-section{
  margin-bottom:8px;
  font-size:14px;
}

/* Akcije */
.pf-card-actions{
  margin-top:12px;
}
.pf-card-actions .button{
  display:inline-block;
  border-radius:12px !important;
  padding:8px 14px !important;
  font-weight:700;
  text-decoration:none;
  cursor:pointer;
  margin-right:6px;
}
.pf-card-actions .button:not(.pf-change-status){
  background:linear-gradient(135deg,#0ea5ea,#2563eb) !important;
  color:#fff !important;
  border:none !important;
}
.pf-card-actions .pf-change-status{
  background:#fff !important;
  color:#0f172a !important;
  border:1px solid #94a3b8 !important;
}
.pf-card-actions .pf-change-status:hover{
  background:#f8fafc !important;
}

/* Responsive grid */
@media (min-width:768px){
  .pf-cards{
    grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
  }
}


/* Dugme "Promeni" */
.pf-modal .button.button-primary {
  background: linear-gradient(135deg, #0ea5ea, #2563eb) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 8px 16px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition: transform 0.08s, box-shadow 0.15s !important;
}
.pf-modal .button.button-primary:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25) !important;
  color:green !important;
}

/* Dugme "Odustani" */
.pf-modal .button {
  background: #fff !important;
  color: #dc2626 !important;
  border: 1px solid #dc2626 !important;
  border-radius: 10px !important;
  padding: 8px 16px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition: background 0.15s !important;
}
.pf-modal .button:hover {
  background: #fef2f2 !important;
}

/* === Modal: dugmad === */
.pf-btn {
  display: inline-block !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  padding: 8px 16px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  transition: all 0.15s ease-in-out !important;
}

/* Cancel dugme - crveno */
.pf-btn-cancel {
  background: #dc2626 !important;       /* crvena pozadina */
  color: #fff !important;               /* beli tekst */
  border: 1px solid #dc2626 !important;
}
.pf-btn-cancel:hover {
  background: #b91c1c !important;
}

/* OK dugme - zeleno samo border */
.pf-btn-ok {
  background: #fff !important;
  color: #16a34a !important;            /* zelena boja teksta */
  border: 1px solid #16a34a !important;
}
.pf-btn-ok:hover {
  background: #f0fdf4 !important;       /* svetlo zelena pozadina */
}
