/* Velmoras — Order details page */
.od-wrap {
  max-width: 1180px;
  margin: 20px auto 60px;
  padding: 0 28px;
}
.od-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.od-num {
  font-family: monospace;
  font-size: 18px;
  font-weight: 700;
  color: #111;
  letter-spacing: 0.3px;
}
.od-meta { font-size: 13px; color: #757575; margin-top: 4px; }
.od-status-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.od-status-pill.status-pending    { background: #fef8e0; color: #8a6216; }
.od-status-pill.status-processing { background: #dbe9f7; color: #164a80; }
.od-status-pill.status-shipped    { background: #dfeadd; color: #1e5b3a; }
.od-status-pill.status-delivered  { background: #cfeadd; color: #0f4425; }
.od-status-pill.status-cancelled  { background: #f5d7dc; color: #a1273a; }

.od-card {
  background: #fff;
  border: 1px solid var(--line, #e8e0d5);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 16px;
}
.od-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 600;
  color: #111;
  margin: 0 0 14px;
}

/* Timeline */
.od-timeline {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0 4px;
}
.od-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.od-step-dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #f0eee9;
  color: #757575;
  border: 2px solid #f0eee9;
  display: grid; place-items: center;
  font-size: 13px;
  font-weight: 600;
}
.od-step-label { font-size: 12px; color: #757575; font-weight: 500; }
.od-step-line { flex: 1; height: 2px; background: #f0eee9; }
.od-step.is-done .od-step-dot {
  background: var(--green, #1e5b3a);
  border-color: var(--green, #1e5b3a);
  color: #fff;
}
.od-step.is-done .od-step-label { color: #111; font-weight: 600; }
.od-step.is-done + .od-step-line { background: var(--green, #1e5b3a); }
.od-step.is-current .od-step-dot {
  box-shadow: 0 0 0 4px rgba(30, 91, 58, 0.15);
  animation: odPulse 1.5s ease-in-out infinite;
}
@keyframes odPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(30, 91, 58, 0.15); }
  50%      { box-shadow: 0 0 0 8px rgba(30, 91, 58, 0.05); }
}
.od-status-note {
  margin-top: 14px;
  padding: 10px 14px;
  background: #f7f7f5;
  border-radius: 8px;
  font-size: 13px;
  color: #333;
}
.od-cancelled {
  padding: 0;
}
.od-cancelled-msg {
  padding: 14px 18px;
  background: #fdecec;
  color: #a1273a;
  border-radius: 8px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.od-cancelled-msg strong { font-size: 15px; }

/* Grid: items + sidebar */
.od-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}
.od-side { display: contents; }
@media (min-width: 901px) {
  .od-side {
    display: block;
    position: sticky;
    top: 100px;
  }
}

/* Items */
.od-items { display: flex; flex-direction: column; gap: 4px; }
.od-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #f0eee9;
  align-items: flex-start;
}
.od-item:last-child { border-bottom: none; padding-bottom: 4px; }
.od-item-img {
  width: 84px; height: 84px;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f5f5;
  display: block;
}
.od-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.od-item-noimg {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px; color: #757575;
}
.od-item-meta { min-width: 0; padding-top: 2px; }
.od-item-name {
  font-size: 14px; font-weight: 600; color: #111;
  display: block; text-decoration: none;
}
.od-item-name:hover { color: var(--green, #1e5b3a); }
.od-item-attrs { font-size: 12.5px; color: #757575; margin-top: 4px; }
.od-item-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px; color: var(--green, #1e5b3a);
  text-decoration: none; font-weight: 600;
}
.od-item-link:hover { text-decoration: underline; }
.od-item-total {
  font-size: 15px; font-weight: 700; color: #111;
  white-space: nowrap;
}

/* Payment + shipping summary */
.od-line {
  display: flex; justify-content: space-between;
  padding: 6px 0;
  font-size: 13.5px; color: #333;
}
.od-line strong { color: #111; font-weight: 600; }
.od-line.od-total {
  border-top: 1px solid var(--line, #e8e0d5);
  margin-top: 6px; padding-top: 12px;
  font-size: 15px; font-weight: 700;
}
.od-pay-method {
  margin-top: 10px;
  padding: 8px 12px;
  background: #f7f7f5;
  border-radius: 8px;
  font-size: 12.5px; color: #333;
  text-align: center;
  font-weight: 600;
}

.od-ship-name { font-weight: 600; margin: 0 0 4px; font-size: 14px; color: #111; }
.od-ship-addr { margin: 0 0 4px; font-size: 13px; color: #333; line-height: 1.5; }
.od-ship-phone { margin: 0; font-size: 13px; color: #757575; }

.od-review-link {
  padding: 10px 12px;
  border: 1px solid var(--line, #e8e0d5);
  border-radius: 8px;
  font-size: 13px; color: #111; font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s;
}
.od-review-link:hover { border-color: #111; }

.od-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
}

/* Responsive */
@media (max-width: 900px) {
  .od-wrap { padding: 0 16px; }
  .od-grid { grid-template-columns: 1fr; }
  .od-timeline { padding: 4px 0; overflow-x: auto; }
  .od-step-dot { width: 30px; height: 30px; font-size: 12px; }
  .od-step-label { font-size: 11px; }
  .od-item { grid-template-columns: 68px minmax(0, 1fr); gap: 12px; }
  .od-item-img { width: 68px; height: 68px; }
  .od-item-total { grid-column: 1 / -1; text-align: right; }
  .od-actions { flex-direction: column-reverse; }
  .od-actions .btn { width: 100%; text-align: center; }
}

/* ====================================================
   Review modal
   ==================================================== */
.rev-modal {
  position: fixed; inset: 0;
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.rev-modal[hidden] { display: none; }
.rev-backdrop {
  position: absolute; inset: 0;
  background: rgba(30, 20, 20, 0.55);
  backdrop-filter: blur(4px);
  animation: revFade 0.2s ease-out;
}
.rev-dialog {
  position: relative;
  background: #fff;
  width: 100%; max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px;
  padding: 28px 28px 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: revPop 0.25s cubic-bezier(.2,.7,.2,1);
}
@keyframes revFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes revPop  { from { transform: translateY(20px) scale(0.98); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

.rev-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none;
  font-size: 28px; line-height: 1;
  color: #757575; cursor: pointer;
  padding: 4px 8px;
}
.rev-close:hover { color: #111; }

.rev-dialog h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px; font-weight: 600;
  color: #111; margin: 0 0 4px;
}
.rev-product {
  font-size: 13.5px; color: #757575;
  margin: 0 0 20px;
  border-bottom: 1px solid #f0eee9;
  padding-bottom: 14px;
}

.rev-field { margin-bottom: 14px; }
.rev-field label {
  display: block;
  font-size: 12px; color: #757575;
  letter-spacing: 0.5px; text-transform: uppercase;
  font-weight: 500; margin-bottom: 6px;
}
.rev-field input[type=text],
.rev-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line, #e8e0d5);
  border-radius: 8px;
  font-family: inherit; font-size: 14px; color: #111;
  background: #fff; outline: none;
}
.rev-field textarea { min-height: 90px; resize: vertical; }
.rev-field input:focus, .rev-field textarea:focus { border-color: var(--green, #1e5b3a); }
.rev-field input[type=file] { font-size: 13px; padding: 4px 0; }

.rev-stars { display: inline-flex; gap: 4px; }
.rev-stars span {
  font-size: 30px;
  color: #ddd;
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
  line-height: 1;
}
.rev-stars span:hover { transform: scale(1.15); }
.rev-stars span.on { color: #e8a628; }

.rev-note { min-height: 18px; font-size: 13px; margin: 10px 0 6px; }

.rev-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 6px;
}

@media (max-width: 560px) {
  .rev-dialog { padding: 22px 20px 20px; }
  .rev-dialog h3 { font-size: 20px; }
  .rev-actions { flex-direction: column-reverse; }
  .rev-actions .btn { width: 100%; text-align: center; }
}

/* Sub-order id chip in items list */
.od-item-code {
  display: inline-block;
  margin-top: 4px;
  font-family: monospace;
  font-size: 11.5px;
  color: var(--ink-dim, #757575);
  background: var(--cream, #f7f0e6);
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

/* Return modal: type + scope + item picker */
.ret-type-row, .ret-scope-row {
  display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap;
}
.ret-type-opt, .ret-scope-opt {
  flex: 1; min-width: 130px;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line, #e8e0d5);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-size: 13.5px;
}
.ret-type-opt:hover, .ret-scope-opt:hover { background: var(--cream, #f7f0e6); }
.ret-type-opt input:checked ~ span,
.ret-scope-opt input:checked ~ span { color: var(--green, #1e5b3a); font-weight: 600; }
.ret-type-opt input[type="radio"]:checked ~ *,
.ret-scope-opt input[type="radio"]:checked ~ * { }
.ret-type-opt:has(input:checked),
.ret-scope-opt:has(input:checked) {
  border-color: var(--green, #1e5b3a);
  background: rgba(30, 91, 58, 0.06);
}

.ret-item-list {
  margin-top: 10px;
  display: flex; flex-direction: column; gap: 6px;
  max-height: 260px; overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--line, #e8e0d5);
  border-radius: 10px;
  background: #fafafa;
}
.ret-item-opt {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.ret-item-opt:hover { background: var(--cream, #f7f0e6); }
.ret-item-opt:has(input:checked) {
  border-color: var(--green, #1e5b3a);
  background: rgba(30, 91, 58, 0.06);
}
.ret-item-name { font-weight: 600; font-size: 14px; color: var(--ink, #111); }
.ret-item-meta { font-size: 12px; color: var(--ink-dim, #757575); margin-top: 2px; }
.ret-item-code {
  font-family: monospace;
  font-size: 11px;
  background: var(--cream, #f7f0e6);
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 6px;
  color: var(--ink, #111);
}
.ret-item-single {
  padding: 12px;
  background: #fafafa;
  border: 1px solid var(--line, #e8e0d5);
  border-radius: 10px;
}

.od-return-scope {
  font-size: 13px; margin: 6px 0 4px; color: var(--ink, #111);
}

/* Ensure [hidden] wins over display: flex on the item list */
.ret-item-list[hidden] { display: none !important; }

/* Locked item option — already requested */
.ret-item-opt.is-locked {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f4f0e8 !important;
  border-color: var(--line, #e8e0d5) !important;
  position: relative;
}
.ret-item-opt.is-locked input { pointer-events: none; }
.ret-locked-badge {
  display: inline-block;
  margin-left: auto;
  align-self: center;
  font-size: 10.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #a1273a;
  background: #fdecec;
  padding: 3px 8px;
  border-radius: 100px;
  font-weight: 600;
}
/* Locked scope option ("Whole order" grayed when item requests exist) */
.ret-scope-opt.is-locked {
  opacity: 0.5;
  cursor: not-allowed;
}
.ret-scope-opt.is-locked input { pointer-events: none; }

/* Return image previews in the customer's return modal */
.ret-img-previews {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px; margin-top: 10px;
}
.ret-img-thumb {
  aspect-ratio: 1;
  border: 1px solid var(--line, #e8e0d5);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.ret-img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* SKU chip in customer order details */
.od-item-codes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.od-item-sku {
  display: inline-block;
  font-family: monospace;
  font-size: 11px;
  color: #1a3a7a;
  background: #eef4ff;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}
