/* Moderi Returns — storefront. Builds on the theme's accedit-* form styles and
   its CSS variables; the fallbacks keep it readable on any other theme. */

.mrma { padding-bottom: 32px; }
.mrma-narrow { max-width: 760px; margin: 0 auto; }
.mrma-lead { text-align: center; color: var(--color-text-light, #6b7280); font-size: var(--font-size-md, 16px); margin: 10px auto 18px; max-width: 620px; line-height: 1.6; }
.mrma-muted { color: var(--color-text-light, #6b7280); font-size: var(--font-size-sm, 13px); }
.mrma-label { font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--color-text-muted, #999); font-weight: 600; margin: 28px 0 12px; }
.mrma-text { line-height: 1.7; margin: 0 0 12px; }
.mrma-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.mrma-fieldset-help { margin: -10px 0 18px; }
.mrma-error-block { margin: 0 0 14px; }
.mrma-opt-tag { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--color-text-muted, #999); }
.mrma-inline { display: inline; margin: 0; }
.mrma [hidden] { display: none !important; }
.mrma-contact { text-align: center; }

/* Alerts */
.mrma-alert { border-radius: var(--radius-sm, 4px); padding: 12px 16px; margin: 0 0 18px; font-size: var(--font-size-md, 16px); border: 1px solid transparent; }
.mrma-alert .fa { margin-right: 6px; }
.mrma-alert--success { background: var(--color-success-bg, #f0f9f2); color: var(--color-success, #2d6a3f); border-color: #c3e6cb; }
.mrma-alert--danger { background: var(--color-danger-bg, #fdf0f0); color: var(--color-danger, #c0392b); border-color: #f1c4c0; }
.mrma-alert--info { background: var(--color-bg-alt, #f6f3ee); color: var(--color-text, #1f2933); border-color: var(--color-border, #e5e2dd); }
.mrma-note { background: var(--color-bg-alt, #f6f3ee); border-radius: var(--radius-sm, 4px); padding: 12px 16px; margin: 0 0 20px; color: var(--color-text, #1f2933); }
.mrma-note .fa { color: var(--color-accent, #b89b6b); margin-right: 6px; }

/* How it works */
.mrma-how { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; }
@media (min-width: 768px) { .mrma-how { grid-template-columns: repeat(3, 1fr); } }
.mrma-how li { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--color-border, #e5e2dd); border-radius: var(--radius-sm, 4px); background: var(--color-bg, #fff); font-size: var(--font-size-sm, 13px); line-height: 1.5; }
.mrma-how__n { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--color-primary, #1f2a44); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }

/* Lists (returns, orders, items) */
.mrma-list { border: 1px solid var(--color-border, #e5e2dd); border-radius: var(--radius-sm, 4px); overflow: hidden; background: var(--color-bg, #fff); }
.mrma-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--color-border, #e5e2dd); color: var(--color-text, #1f2933); text-decoration: none; }
.mrma-row:last-child { border-bottom: 0; }
a.mrma-row:hover, a.mrma-row:focus { background: var(--color-bg-alt, #f6f3ee); color: var(--color-text, #1f2933); text-decoration: none; }
.mrma-row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mrma-row__meta { color: var(--color-text-light, #6b7280); font-size: var(--font-size-sm, 13px); }
.mrma-row__arrow { color: var(--color-text-muted, #999); }
.mrma-row--muted .mrma-row__main strong { color: var(--color-text-light, #6b7280); font-weight: 500; }

.mrma-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0 20px; height: 40px; border-radius: 50px; background: var(--color-primary, #1f2a44); color: #fff; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600; white-space: nowrap; text-decoration: none; }
.mrma-btn:hover, .mrma-btn:focus { background: var(--color-primary-hover, #2c3e54); color: #fff; text-decoration: none; }
.mrma-btn--small { height: 36px; padding: 0 16px; }

/* Badges */
.mrma-badge { display: inline-block; padding: 4px 10px; border-radius: 50px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #eef0f3; color: #4b5563; }
.mrma-badge--lg { font-size: 13px; padding: 6px 14px; }
.mrma-badge--warning { background: #fff4e0; color: #8a5a00; }
.mrma-badge--info { background: #e8eef7; color: var(--color-primary, #1f2a44); }
.mrma-badge--success { background: var(--color-success-bg, #f0f9f2); color: var(--color-success, #2d6a3f); }
.mrma-badge--danger { background: var(--color-danger-bg, #fdf0f0); color: var(--color-danger, #c0392b); }

/* Lookup */
.mrma-lookup { margin-top: 28px; }
.mrma-lookup__help { margin: -10px 0 18px; }

/* Item picker */
.mrma-items { display: flex; flex-direction: column; gap: 12px; }
.mrma-item { border: 1px solid var(--color-border, #e5e2dd); border-radius: var(--radius-sm, 4px); background: var(--color-bg, #fff); transition: border-color .2s, box-shadow .2s; }
.mrma-item.is-selected, .mrma-item:has(.mrma-item__check:checked) { border-color: var(--color-primary, #1f2a44); box-shadow: 0 2px 10px rgba(0, 0, 0, .05); }
.mrma-item.has-error { border-color: var(--color-danger, #c0392b); }
.mrma-item__head { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin: 0; cursor: pointer; font-weight: 400; }
.mrma-item.is-blocked .mrma-item__head { cursor: default; opacity: .75; }
.mrma-item__check { flex: 0 0 22px; width: 22px; height: 22px; margin: 0 !important; accent-color: var(--color-primary, #1f2a44); cursor: pointer; }
.mrma-item__check--off { display: inline-flex; align-items: center; justify-content: center; color: var(--color-text-muted, #999); cursor: default; }
.mrma-item__img { width: 60px; height: 60px; object-fit: cover; border-radius: var(--radius-sm, 4px); background: var(--color-bg-alt, #f6f3ee); flex: 0 0 auto; }
.mrma-row .mrma-item__img { width: 56px; height: 56px; }
.mrma-item__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mrma-item__name { font-weight: 500; color: var(--color-text, #1f2933); }
.mrma-item__opt { font-size: var(--font-size-sm, 13px); color: var(--color-text-light, #6b7280); }
.mrma-item__blocked { font-size: var(--font-size-sm, 13px); color: var(--color-danger, #c0392b); }
.mrma-item__fields { display: none; padding: 0 16px 16px; border-top: 1px dashed var(--color-border, #e5e2dd); padding-top: 14px; }
.mrma-item.is-selected .mrma-item__fields, .mrma-item:has(.mrma-item__check:checked) .mrma-item__fields { display: block; }
.mrma-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 576px) { .mrma-grid { grid-template-columns: 1fr 1fr; } }

/* Segmented control (refund / exchange) */
.mrma-seg { display: flex; border: 1px solid var(--color-border, #e5e2dd); border-radius: 50px; overflow: hidden; height: 48px; }
.mrma-seg__opt { flex: 1; margin: 0; position: relative; font-weight: 500; cursor: pointer; }
.mrma-seg__opt input { position: absolute; opacity: 0; pointer-events: none; }
.mrma-seg__opt span { display: flex; align-items: center; justify-content: center; height: 100%; padding: 0 8px; font-size: var(--font-size-sm, 13px); text-align: center; transition: background .2s, color .2s; }
.mrma-seg__opt input:checked + span { background: var(--color-primary, #1f2a44); color: #fff; }
.mrma-seg__opt input:focus-visible + span { outline: 2px solid var(--color-accent, #b89b6b); outline-offset: -2px; }

.mrma-iban { text-transform: uppercase; letter-spacing: 1px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.mrma-iban-view { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; margin-top: 4px; }

/* File picker */
.mrma-file { display: inline-block; position: relative; margin: 0; cursor: pointer; }
.mrma-file input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.mrma-file__btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border: 1px dashed var(--color-border-filter, #d6cdbf); border-radius: 50px; font-size: var(--font-size-sm, 13px); font-weight: 600; color: var(--color-text, #1f2933); background: var(--color-bg-alt, #f6f3ee); }
.mrma-file:hover .mrma-file__btn { border-color: var(--color-primary, #1f2a44); }
.mrma-file input:focus-visible + .mrma-file__btn { outline: 2px solid var(--color-accent, #b89b6b); }
.mrma-file__list { list-style: none; padding: 0; margin: 10px 0 0; font-size: var(--font-size-sm, 13px); }
.mrma-file__list li { padding: 4px 0; color: var(--color-text, #1f2933); }
.mrma-file__list li.is-error { color: var(--color-danger, #c0392b); }
.mrma-file__help { margin-top: 6px; }

/* Progress */
.mrma-steps { list-style: none; display: flex; padding: 0; margin: 6px 0 22px; counter-reset: none; }
.mrma-steps__item { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12px; color: var(--color-text-muted, #999); }
.mrma-steps__item::before { content: ""; position: absolute; top: 14px; left: -50%; right: 50%; height: 2px; background: var(--color-border, #e5e2dd); z-index: 0; }
.mrma-steps__item:first-child::before { display: none; }
.mrma-steps__item.is-done::before { background: var(--color-primary, #1f2a44); }
.mrma-steps__dot { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--color-border, #e5e2dd); background: var(--color-bg, #fff); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.mrma-steps__item.is-done .mrma-steps__dot { background: var(--color-primary, #1f2a44); border-color: var(--color-primary, #1f2a44); color: #fff; }
.mrma-steps__item.is-active .mrma-steps__dot { border-color: var(--color-primary, #1f2a44); color: var(--color-primary, #1f2a44); }
.mrma-steps__item.is-done, .mrma-steps__item.is-active { color: var(--color-text, #1f2933); }

/* Panels */
.mrma-panel { border: 1px solid var(--color-border, #e5e2dd); border-radius: var(--radius-sm, 4px); padding: 16px 20px; margin: 16px 0 0; background: var(--color-bg, #fff); }
.mrma-panel--accent { border-left: 3px solid var(--color-accent, #b89b6b); margin-bottom: 8px; }
.mrma-panel--accent .mrma-label { margin-top: 0; }
.mrma-address { padding: 12px 14px; background: var(--color-bg-alt, #f6f3ee); border-radius: var(--radius-sm, 4px); line-height: 1.6; }
.mrma-address__title { display: block; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--color-text-muted, #999); font-weight: 600; margin-bottom: 4px; }

/* Messages */
.mrma-thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.mrma-msg { padding: 12px 16px; border-radius: 10px; max-width: 88%; background: var(--color-bg-alt, #f6f3ee); }
.mrma-msg--customer { align-self: flex-end; background: #e8eef7; }
.mrma-msg--system { align-self: center; max-width: 100%; background: transparent; border: 1px dashed var(--color-border, #e5e2dd); font-size: var(--font-size-sm, 13px); color: var(--color-text-light, #6b7280); text-align: center; }
.mrma-msg__head { font-size: 12px; color: var(--color-text-light, #6b7280); margin-bottom: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.mrma-msg--system .mrma-msg__head { justify-content: center; }
.mrma-msg__text { line-height: 1.6; word-wrap: break-word; overflow-wrap: anywhere; }
.mrma-msg__files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mrma-thumb img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius-sm, 4px); display: block; }
.mrma-attach { font-size: var(--font-size-sm, 13px); }
.mrma-reply { margin-top: 6px; }
.mrma-reply .mrma-file { margin-top: 12px; }

.mrma-link-danger { background: none; border: 0; padding: 0; color: var(--color-danger, #c0392b); text-decoration: underline; font-size: var(--font-size-sm, 13px); cursor: pointer; }

@media (max-width: 575px) {
  .mrma-row { padding: 12px 14px; flex-wrap: wrap; }
  .mrma-row .mrma-btn { width: 100%; }
  .mrma-msg { max-width: 100%; }
  .mrma .accedit-actions { flex-wrap: wrap; }
}

/* Withdrawal statement summary (art. 11a(2)) and captcha */
.mrma-statement { margin: 0 0 18px; }
.mrma-statement .mrma-label { margin-top: 0; }
.mrma-statement__list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.mrma-statement__list dt { font-weight: 400; color: var(--color-text-light, #6b7280); }
.mrma-statement__list dd { margin: 0; color: var(--color-text, #1f2933); overflow-wrap: anywhere; }
.mrma-captcha { margin-top: 18px; }
@media (max-width: 479px) { .mrma-statement__list { grid-template-columns: 1fr; gap: 2px; } .mrma-statement__list dd { margin-bottom: 8px; } }

/* Order summary (cancel before shipping) */
.mrma-summary__price { font-weight: 600; white-space: nowrap; }
.mrma-summary__totals { background: var(--color-bg-alt, #f6f3ee); }
.mrma-summary__list { display: grid; grid-template-columns: 1fr max-content; gap: 4px 20px; margin: 0; width: 100%; }
.mrma-summary__list dt { font-weight: 400; color: var(--color-text-light, #6b7280); text-align: right; }
.mrma-summary__list dd { margin: 0; text-align: right; white-space: nowrap; }
.mrma-summary__list dt:last-of-type, .mrma-summary__list dd:last-of-type { font-weight: 600; color: var(--color-text, #1f2933); }
