/* =========================================================
   EU jednostrani raskid — front stilovi (samostalni)
   Ne oslanja se na stilove teme (eksplicitne boje/gumbi).
   ========================================================= */

#euwdr.euwdr-wrapper {
  margin: 1.5rem 0 2.5rem;
}

.euwdr-card {
  max-width: 780px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e6e8eb;
  border-radius: 10px;
  padding: 1.75rem 2rem;
  box-shadow: 0 2px 12px rgba(20, 30, 50, .05);
}

.euwdr-title {
  font-size: 1.55rem;
  line-height: 1.2;
  margin: 0 0 1.25rem;
  padding-bottom: .85rem;
  border-bottom: 2px solid #f0f2f4;
  color: #1f2d3d;
}

.euwdr-intro {
  color: #5c6b7a;
  margin: 0 0 1.25rem;
}

/* ---------- Stepper ---------- */
.euwdr-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.euwdr-steps li {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .9rem;
  border-radius: 30px;
  background: #f1f3f5;
  color: #868e96;
  font-size: .9rem;
  font-weight: 600;
}
.euwdr-steps li.active { background: #d8e8fb; color: #1b5fa6; }
.euwdr-steps li.done { background: #eef4fb; color: #5b80a6; }
.euwdr-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .12);
  font-size: .8rem;
}
.euwdr-steps li.active .euwdr-step-num { background: rgba(27, 95, 166, .18); }

/* ---------- Meta podaci ---------- */
.euwdr-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin-bottom: 1.25rem;
}
.euwdr-meta-label {
  display: block;
  font-size: .72rem;
  color: #909aa4;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .15rem;
}

/* ---------- Tablica ---------- */
.euwdr-table-wrap {
  overflow-x: auto;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 1.25rem;
}
.euwdr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}
.euwdr-table th,
.euwdr-table td {
  padding: .8rem 1rem;
  text-align: left;
  vertical-align: middle;
}
.euwdr-table thead th {
  background: #f8f9fa;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: #5c6b7a;
  border-bottom: 1px solid #e9ecef;
}
.euwdr-table tbody tr + tr td { border-top: 1px solid #f1f3f5; }
.euwdr-table tfoot th {
  background: #fbfcfd;
  border-top: 2px solid #e9ecef;
  font-size: .95rem;
}
.euwdr-table .ta-center { text-align: center; }
.euwdr-table .ta-right { text-align: right; }

.euwdr-prod-name { font-weight: 600; color: #243240; }
.euwdr-prod-ref {
  display: inline-block;
  margin-left: .35rem;
  color: #adb5bd;
  font-size: .85rem;
}
.euwdr-pill {
  display: inline-block;
  min-width: 30px;
  padding: .15rem .55rem;
  background: #eef2f7;
  border-radius: 12px;
  font-weight: 600;
  color: #495057;
}

/* ---------- Polja ---------- */
.euwdr-field { margin-bottom: 1.25rem; }
.euwdr-label {
  display: block;
  font-weight: 600;
  margin-bottom: .4rem;
  color: #34414f;
}
.euwdr-help { display: block; margin-top: .35rem; color: #909aa4; font-size: .85rem; }
.euwdr-input {
  width: 100%;
  padding: .6rem .75rem;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
  color: #212529;
  transition: border-color .15s ease, box-shadow .15s ease;
  box-sizing: border-box;
}
.euwdr-input:focus {
  outline: none;
  border-color: #2d72d2;
  box-shadow: 0 0 0 3px rgba(45, 114, 210, .15);
}
.euwdr-qty {
  width: 84px;
  text-align: center;
  padding: .45rem .4rem;
  margin: 0 auto;
}
.euwdr-textarea { resize: vertical; min-height: 84px; }

/* ---------- Potvrdna kvačica ---------- */
.euwdr-confirm-check {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  background: #f8f9fa;
  border: 1px solid #eef0f2;
  border-radius: 8px;
  font-weight: 500;
  color: #34414f;
  cursor: pointer;
}
.euwdr-confirm-check input { margin-top: .25rem; flex: 0 0 auto; }

/* Skupina dodatnih izjava */
.euwdr-acks { margin-top: .6rem; }
.euwdr-acks .euwdr-confirm-check { margin: .5rem 0 0; }
.euwdr-acks .euwdr-ack { margin: .5rem 0 0; }
.euwdr-acks .euwdr-ack .euwdr-confirm-check { margin: 0; }

/* Skraćeni tekst (prva 4 retka) + "pročitaj više" */
.euwdr-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  line-clamp: 4;
  overflow: hidden;
}
.euwdr-clamp.euwdr-expanded {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}
.euwdr-readmore {
  display: inline-block;
  margin: .35rem 0 0 1.95rem;
  font-size: .9rem;
  color: #2d72d2;
  cursor: pointer;
  text-decoration: underline;
}
.euwdr-readmore:hover { color: #245db0; }

/* ---------- Razlog (potvrda) ---------- */
.euwdr-reason-box {
  margin-bottom: 1.25rem;
  padding: .9rem 1.1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

/* ---------- Info trgovca ---------- */
.euwdr-seller-info {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: #f4f8ff;
  border-left: 3px solid #2d72d2;
  border-radius: 6px;
  color: #34414f;
}

/* ---------- Gumbi ---------- */
.euwdr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}
.euwdr-actions--start { justify-content: flex-start; }
.euwdr-btn {
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  padding: .65rem 1.5rem;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.euwdr-btn--primary { background: #e7f1fd; color: #1b5fa6 !important; border-color: #cadef6; }
.euwdr-btn--primary:hover { background: #d8e8fb; color: #154e8a !important; }
.euwdr-btn--ghost { background: #fff; color: #495057 !important; border-color: #ced4da; }
.euwdr-btn--ghost:hover { background: #f1f3f5; color: #34414f !important; }
.euwdr-btn--danger { background: #e03131; color: #fff !important; }
.euwdr-btn--danger:hover { background: #c92a2a; color: #fff !important; }

/* ---------- Alerti (samostalni) ---------- */
#euwdr .alert {
  padding: .85rem 1.1rem;
  border-radius: 6px;
  margin-bottom: 1.25rem;
  border: 1px solid transparent;
}
#euwdr .alert-danger { background: #fff0f0; color: #c92a2a; border-color: #ffc9c9; }
#euwdr .alert-success { background: #ebfbee; color: #2b8a3e; border-color: #b2f2bb; }
#euwdr .alert-info { background: #e7f5ff; color: #1971c2; border-color: #a5d8ff; }
#euwdr .alert-warning { background: #fff9db; color: #b8860b; border-color: #ffe066; }
.euwdr-errors { margin: 0; padding-left: 1.2rem; }

/* ---------- Akcijski gumbi u popisu narudžbi ---------- */
.euwdr-actions-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
}
.euwdr-actions-cell a.euwdr-link {
  display: block;
  width: 100%;
  max-width: 210px;
  margin: 0;
  padding: .35rem .75rem;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none !important;
  border: 1px solid transparent;
  transition: background-color .15s ease, color .15s ease;
}

/* Kompaktniji redovi u popisu narudžbi (klasu dodaje front.js) */
.euwdr-compact-history td,
.euwdr-compact-history th {
  padding-top: .45rem !important;
  padding-bottom: .45rem !important;
  vertical-align: middle !important;
}

/* Font: isti sistemski stack koji tema koristi (--bs-font-sans-serif).
   Postavljen EKSPLICITNO jer se stranica obrasca renderira bez teme
   (tada bi body bio "Times New Roman", pa inherit ne bi pomogao). */
#euwdr,
#euwdr * {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
}
a.euwdr-link--details { background: #e7f1fd; color: #1b5fa6 !important; border-color: #cadef6; }
a.euwdr-link--details:hover { background: #d8e8fb; color: #154e8a !important; }
a.euwdr-link--reorder { background: #ddf4ec; color: #0e7458 !important; border-color: #c1e8da; }
a.euwdr-link--reorder:hover { background: #cdeee2; color: #0b5d47 !important; }
a.euwdr-link--withdraw { background: #fdecd6; color: #a85d0a !important; border-color: #f5d8b4; }
a.euwdr-link--withdraw:hover { background: #fbe0c0; color: #8c4d08 !important; }

/* Status narudžbe u popisu — čitljiviji tekst (tema daje svijetli tekst na svijetloj podlozi) */
.euwdr-compact-history .label,
.euwdr-compact-history .label-pill,
.euwdr-compact-history span.label {
  color: #1f2d3d !important;
  font-weight: 700 !important;
  text-shadow: none !important;
}

/* ---------- Gumb na detaljima narudžbe ---------- */
.euwdr-order-detail.box {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid #e6e8eb;
  border-radius: 8px;
  background: #fbfcfd;
}
.euwdr-order-detail .euwdr-btn { margin-top: .5rem; }

/* ---------- Boje znački statusa ---------- */
.badge.badge-secondary { background: #868e96; color: #fff; }
.badge.badge-success { background: #2f9e44; color: #fff; }
.badge.badge-danger { background: #e03131; color: #fff; }
.badge.badge-warning { background: #f08c00; color: #fff; }
.badge.badge-info { background: #1c7ed6; color: #fff; }

/* ---------- Responzivno ---------- */
@media (max-width: 575px) {
  .euwdr-card { padding: 1.25rem 1.1rem; }
  .euwdr-actions { flex-direction: column-reverse; }
  .euwdr-actions .euwdr-btn { width: 100%; }
}
