/* portal.css — Customer Returns Portal, reworked to the Elite Core design.
   Built on eca-theme.css --b2-* tokens. CTA gold = --role-cta-primary. */

@keyframes rp-rise { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Header ── */
.rp-header { border-bottom: 1px solid var(--b2-hairline); background: var(--b2-surface-0); }
.rp-header-inner { max-width: 680px; margin: 0 auto; display: flex; align-items: center; gap: 13px; padding: 15px 22px; }
.rp-logo { height: 24px; width: auto; display: block; }
.rp-header-title { font-size: 13px; font-weight: 600; color: var(--b2-text-2); padding-left: 13px; border-left: 1px solid var(--b2-hairline-strong); }
.rp-spacer { flex: 1; }
.rp-track-top { font-size: 13px; font-weight: 600; color: var(--b2-text-3); cursor: pointer; text-decoration: none; }
.rp-track-top:hover { color: var(--b2-text); }

/* ── Layout / shared ── */
.rp-main { max-width: 680px; margin: 0 auto; padding: 30px 22px 72px; }
.rp-view { animation: rp-rise .28s cubic-bezier(0.22,1,0.36,1); }
.rp-h1 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 6px; }
.rp-sub { font-size: 14px; color: var(--b2-text-2); margin: 0 0 22px; }
.rp-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--role-cta-primary); margin-bottom: 12px; }
.rp-label { display: block; font-size: 12px; font-weight: 600; color: var(--b2-text-2); margin-bottom: 7px; }
.rp-mt { margin-top: 16px; }
.rp-mt-lg { margin-top: 22px; }
.rp-flex1 { flex: 1; }
.rp-error { display: flex; align-items: flex-start; gap: 9px; color: var(--role-danger); font-size: 13px; font-weight: 600; line-height: 1.45; margin: 13px 0 0; padding: 11px 13px; background: color-mix(in srgb, var(--role-danger) 10%, transparent); border: 1px solid color-mix(in srgb, var(--role-danger) 30%, transparent); border-radius: 11px; }
.rp-error svg { flex: 0 0 auto; margin-top: 1px; }
.rp-error[hidden] { display: none; } /* display:flex above would otherwise defeat the hidden attribute */
.rp-footnote { text-align: center; font-size: 13px; color: var(--b2-text-3); margin-top: 18px; }
.rp-link { color: var(--role-info); cursor: pointer; text-decoration: none; }
.rp-link:hover { text-decoration: underline; }

.rp-input {
  width: 100%; height: 46px; padding: 0 15px; background: var(--b2-surface-2);
  border: 1px solid var(--b2-hairline-strong); border-radius: 12px; color: var(--b2-text);
  font-family: inherit; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.rp-input:focus { border-color: color-mix(in srgb, var(--role-cta-primary) 55%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--role-cta-primary) 22%, transparent); }
.rp-select { width: 100%; height: 42px; padding: 0 12px; background-color: var(--b2-surface-2); border: 1px solid var(--b2-hairline-strong); border-radius: 10px; color: var(--b2-text); font-family: inherit; font-size: 14px; outline: none; }
.rp-select:focus { border-color: var(--role-cta-primary); }
/* Native <select>: replace the OS chevron with one clean, themed chevron. */
select.rp-select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e95' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* ── Buttons ── */
.rp-btn { height: 48px; padding: 0 22px; border: 0; border-radius: 12px; font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: background .14s; }
.rp-btn-primary { background: var(--role-cta-primary); color: var(--eca-on-primary); }
.rp-btn-primary:hover { background: #ffe066; }
.rp-btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.rp-btn-secondary { background: var(--b2-surface-3); color: var(--b2-text); font-weight: 600; }
.rp-block { width: 100%; }
.rp-actions { display: flex; gap: 12px; margin-top: 24px; }

/* ── Stepper ── */
.rp-steps { list-style: none; display: flex; align-items: center; gap: 6px; margin: 0 0 30px; padding: 0; }
.rp-steps[hidden] { display: none; }
.rp-steps li { display: flex; align-items: center; gap: 6px; flex: 1; }
.rp-step-circle { width: 24px; height: 24px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--b2-surface-2); color: var(--b2-text-3); border: 1px solid var(--b2-hairline-strong); }
.rp-step-name { font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--b2-text-4); }
.rp-steps li:not(:last-child)::after { content: ""; flex: 1; height: 2px; background: var(--b2-hairline-strong); border-radius: 2px; }
.rp-steps li[data-state="active"] .rp-step-circle { background: var(--role-cta-primary); color: var(--eca-on-primary); border-color: transparent; }
.rp-steps li[data-state="active"] .rp-step-name { color: var(--b2-text); }
.rp-steps li[data-state="done"] .rp-step-circle { background: var(--role-success); color: #0c2a14; border-color: transparent; }
.rp-steps li[data-state="done"] .rp-step-circle::before { content: "✓"; }
.rp-steps li[data-state="done"] .rp-step-circle { font-size: 0; }
.rp-steps li[data-state="done"] .rp-step-circle::before { font-size: 13px; }
.rp-steps li[data-state="done"] .rp-step-name { color: var(--b2-text-2); }

/* ── Lookup hero ── */
.rp-hero { position: relative; overflow: hidden; border-radius: 20px; padding: 32px 28px; background: linear-gradient(150deg, color-mix(in srgb, var(--role-cta-primary) 10%, transparent), transparent 60%), var(--b2-surface-1); border: 1px solid var(--b2-hairline); }
.rp-hero-h1 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 10px; line-height: 1.1; }
.rp-hero-copy { font-size: 15px; color: var(--b2-text-2); margin: 0 0 26px; line-height: 1.5; max-width: 440px; }

/* ── Select: item cards ── */
.rp-items { display: flex; flex-direction: column; gap: 12px; }
.rp-item { background: var(--b2-surface-1); border: 1.5px solid var(--b2-hairline); border-radius: 16px; padding: 16px 17px; transition: border-color .15s; }
.rp-item[data-selected="true"] { border-color: var(--role-cta-primary-border); }
.rp-item-head { display: flex; align-items: flex-start; gap: 13px; cursor: pointer; }
.rp-check { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 7px; display: grid; place-items: center; margin-top: 1px; background: var(--b2-surface-2); border: 1.5px solid rgba(255,255,255,0.2); }
.rp-item[data-selected="true"] .rp-check { background: var(--role-cta-primary); border-color: var(--role-cta-primary); }
.rp-item-name { font-size: 14.5px; font-weight: 600; }
.rp-item-meta { font-size: 12px; color: var(--b2-text-3); margin-top: 3px; font-variant-numeric: tabular-nums; }
.rp-item-body { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--b2-hairline); display: flex; flex-direction: column; gap: 15px; }
.rp-item-blocked { opacity: 0.72; }
.rp-check-blocked { background: var(--b2-surface-3); border-color: var(--b2-hairline-strong); color: var(--b2-text-3); font-size: 12px; }
.rp-blocked-reason { font-size: 12px; font-weight: 600; color: var(--role-danger); margin-top: 5px; }
.rp-window-note { font-size: 12.5px; color: var(--role-pending); background: var(--role-pending-bg); border: 1px solid var(--role-pending-border); border-radius: 9px; padding: 9px 11px; }
.rp-field-row { display: flex; gap: 12px; }
.rp-field-row > div { flex: 1; }

/* resolution tiles */
.rp-res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rp-res-tile { cursor: pointer; padding: 11px 12px; border-radius: 11px; background: var(--b2-surface-2); border: 1.5px solid var(--b2-hairline-strong); transition: all .12s; }
.rp-res-tile[data-active="true"] { background: var(--role-cta-primary-bg); border-color: var(--role-cta-primary); }
.rp-res-tile-label { font-size: 13px; font-weight: 700; }
.rp-res-rec { font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--b2-bg, #1a1a1d); background: var(--role-cta-primary); border-radius: 5px; padding: 1px 5px; margin-left: 6px; vertical-align: middle; }
.rp-res-tile-desc { font-size: 11px; color: var(--b2-text-3); margin-top: 3px; line-height: 1.35; }

/* photo prompt */
.rp-photo-box { background: var(--b2-teal-bg); border: 1px solid var(--b2-teal-border); border-radius: 11px; padding: 13px 14px; }
.rp-photo-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--b2-teal); }
.rp-photo-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; align-items: center; }
.rp-photo-thumb { position: relative; width: 54px; height: 54px; border-radius: 9px; background: linear-gradient(140deg,#2c2c30,#1c1c1f) center/cover; border: 1px solid var(--b2-hairline-strong); display: grid; place-items: center; color: var(--b2-text-3); }
.rp-photo-x { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; background: var(--b2-surface-3); border: 1px solid rgba(255,255,255,0.2); color: var(--b2-text-2); font-size: 10px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.rp-photo-add { height: 54px; padding: 0 16px; background: var(--b2-surface-2); border: 1px dashed rgba(255,255,255,0.22); border-radius: 9px; color: var(--b2-text-2); font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.rp-photo-uploading { opacity: .6; }

/* ── Review ── */
.rp-rev-item { background: var(--b2-surface-1); border: 1px solid var(--b2-hairline); border-radius: 14px; padding: 15px 16px; }
.rp-rev-top { display: flex; justify-content: space-between; gap: 10px; }
.rp-rev-name { font-size: 14px; font-weight: 600; }
.rp-rev-qty { font-size: 13px; color: var(--b2-text-2); white-space: nowrap; }
.rp-rev-sku { font-size: 11.5px; color: var(--b2-text-3); margin-top: 3px; font-variant-numeric: tabular-nums; }
.rp-rev-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.rp-rev-tag { font-size: 11.5px; color: var(--b2-text); background: var(--b2-surface-2); border: 1px solid var(--b2-hairline-strong); padding: 3px 10px; border-radius: 7px; }
.rp-rev-chip { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 7px; }
.rp-ship-notes { background: var(--b2-surface-1); border: 1px solid var(--b2-hairline); border-radius: 14px; padding: 16px; margin-top: 16px; }
.rp-ship-title { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--b2-text-3); margin-bottom: 11px; }
.rp-ship-note { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 9px; }
.rp-ship-dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 6px; flex: 0 0 auto; }
.rp-ship-note span:last-child { font-size: 13px; color: var(--b2-text); line-height: 1.45; }

/* ── Confirm ── */
.rp-confirm { text-align: center; padding-top: 8px; }
.rp-confirm-icon { width: 66px; height: 66px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; background: var(--role-success-bg); border: 1px solid var(--role-success-border); }
.rp-rma { font-size: 30px; font-weight: 800; letter-spacing: .01em; font-variant-numeric: tabular-nums; margin: 0 0 22px; }
.rp-next { text-align: left; background: var(--b2-surface-1); border: 1px solid var(--b2-hairline); border-radius: 16px; padding: 20px; max-width: 440px; margin: 0 auto; }
.rp-next-step { display: flex; gap: 12px; margin-bottom: 14px; font-size: 13px; color: var(--b2-text); line-height: 1.45; }
.rp-next-step:last-child { margin-bottom: 0; }
.rp-next-num { width: 26px; height: 26px; flex: 0 0 auto; border-radius: 50%; background: var(--b2-surface-2); border: 1px solid var(--b2-hairline-strong); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--role-cta-primary); }

/* ── Status ── */
.rp-status-form { background: var(--b2-surface-1); border: 1px solid var(--b2-hairline); border-radius: 16px; padding: 22px; }
.rp-status-card { background: var(--b2-surface-1); border: 1px solid var(--b2-hairline); border-radius: 16px; overflow: hidden; margin-top: 16px; }
.rp-status-banner { padding: 20px 22px 16px; border-bottom: 1px solid var(--b2-hairline); background: linear-gradient(160deg, rgba(var(--c),0.17) 0%, rgba(var(--c),0.04) 48%, transparent 100%); }
.rp-status-brow { display: inline-flex; align-items: center; gap: 8px; }
.rp-status-dot { width: 9px; height: 9px; border-radius: 50%; background: rgb(var(--c)); box-shadow: 0 0 10px 1px rgba(var(--c),0.7); }
.rp-status-lbl { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: rgb(var(--c)); }
.rp-status-rma { font-size: 24px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin-top: 12px; }
.rp-status-sub { font-size: 13px; color: var(--b2-text-2); margin-top: 4px; font-variant-numeric: tabular-nums; }
.rp-status-body { padding: 18px 22px 22px; }
.rp-status-items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.rp-status-item { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.rp-status-item .res { color: var(--b2-text-3); }
.rp-timeline { border-top: 1px solid var(--b2-hairline); padding: 18px 0 0; margin: 0; list-style: none; }
.rp-tl { position: relative; padding: 0 0 16px 22px; border-left: 2px solid var(--ln, var(--b2-hairline-strong)); }
.rp-tl:last-child { border-left-color: transparent; }
.rp-tl-dot { position: absolute; left: -6px; top: 1px; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, rgba(255,255,255,0.3)); border: 2px solid var(--b2-surface-1); }
.rp-tl-label { font-size: 13px; font-weight: 600; }
.rp-tl-time { font-size: 11px; color: var(--b2-text-3); margin-top: 1px; }

/* status chip */
.rp-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; color: rgb(var(--c)); background: rgba(var(--c),0.13); border: 1px solid rgba(var(--c),0.32); }
.rp-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--c)); }

/* ── Cross-link / mock badge ── */
.rp-admin-link { position: fixed; bottom: 16px; right: 16px; z-index: 30; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; background: rgba(36,36,39,0.9); border: 1px solid var(--b2-hairline-strong); border-radius: 9px; color: var(--b2-text-2); font-size: 12px; font-weight: 600; text-decoration: none; backdrop-filter: blur(8px); }
.rp-admin-link:hover { color: var(--b2-text); }
.rp-mock-badge { position: fixed; bottom: 16px; left: 16px; z-index: 30; font-size: 11px; font-weight: 650; color: var(--role-pending); background: var(--role-pending-bg); border: 1px solid var(--role-pending-border); border-radius: 999px; padding: 4px 11px; }

@media (max-width: 480px) { .rp-field-row { flex-direction: column; } .rp-res-grid { grid-template-columns: 1fr; } .rp-step-name { display: none; } }
