/* ITMedia VirtueMart Withdrawal & Returns – frontend (namespaced, template-neutral, mobile first) */
.vmwithdrawal { --vmw-gap: 1rem; --vmw-radius: .5rem; --vmw-border: rgba(0,0,0,.12); --vmw-muted: rgba(0,0,0,.6); --vmw-primary: #1d6fb8; --vmw-primary-text: #fff; --vmw-success: #2e7d32; --vmw-warning-bg: #fff8e1; --vmw-info-bg: #e8f1fb; max-width: 60rem; margin: 0 auto; }
.vmwithdrawal *, .vmwithdrawal *::before, .vmwithdrawal *::after { box-sizing: border-box; }
.vmwithdrawal__title { margin: 0 0 var(--vmw-gap); font-size: 1.6rem; line-height: 1.2; }
.vmwithdrawal-muted { color: var(--vmw-muted); font-size: .9em; }
.vmwithdrawal-mt { margin-top: var(--vmw-gap); }
.vmwithdrawal-req { color: #b00020; }
.vmwithdrawal-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Steps */
.vmwithdrawal-steps { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0 0 var(--vmw-gap); padding: 0; counter-reset: vmw; }
.vmwithdrawal-steps__item { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--vmw-muted); }
.vmwithdrawal-steps__num { display: inline-flex; width: 1.6rem; height: 1.6rem; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--vmw-border); font-size: .8rem; }
.vmwithdrawal-steps__item.is-current { color: inherit; font-weight: 600; }
.vmwithdrawal-steps__item.is-current .vmwithdrawal-steps__num { background: var(--vmw-primary); color: var(--vmw-primary-text); border-color: var(--vmw-primary); }
.vmwithdrawal-steps__item.is-done .vmwithdrawal-steps__num { background: var(--vmw-success); color: #fff; border-color: var(--vmw-success); }
@media (max-width: 40rem) { .vmwithdrawal-steps__item:not(.is-current) .vmwithdrawal-steps__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

/* Cards & layout */
.vmwithdrawal-card, .vmwithdrawal-fieldset { border: 1px solid var(--vmw-border); border-radius: var(--vmw-radius); padding: var(--vmw-gap); margin: 0 0 var(--vmw-gap); background: rgba(255,255,255,.6); min-width: 0; }
.vmwithdrawal-fieldset legend { padding: 0 .4rem; }
.vmwithdrawal-card--success { border-color: var(--vmw-success); }
.vmwithdrawal-card__title { margin: 0 0 .75rem; font-size: 1.15rem; }
.vmwithdrawal-card__subtitle { margin: 1rem 0 .5rem; font-size: 1rem; }
.vmwithdrawal-grid { display: grid; grid-template-columns: 1fr; gap: var(--vmw-gap); }
@media (min-width: 48rem) { .vmwithdrawal-grid { grid-template-columns: 1fr 1fr; } .vmwithdrawal-card--wide { grid-column: 1 / -1; } .vmwithdrawal-grid .vmwithdrawal-card { margin: 0; } }
.vmwithdrawal-alert { padding: .75rem 1rem; border-radius: var(--vmw-radius); margin: 0 0 var(--vmw-gap); border: 1px solid var(--vmw-border); }
.vmwithdrawal-alert--warning { background: var(--vmw-warning-bg); }
.vmwithdrawal-alert--info { background: var(--vmw-info-bg); }
.vmwithdrawal-alert p:last-child { margin-bottom: 0; }
.vmwithdrawal-order-head, .vmwithdrawal-detail-head { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; margin-bottom: var(--vmw-gap); }

/* Forms */
.vmwithdrawal-form { display: block; }
.vmwithdrawal-field { margin-bottom: .9rem; }
.vmwithdrawal-field label { display: block; margin-bottom: .3rem; font-weight: 600; }
.vmwithdrawal-input { width: 100%; max-width: 100%; padding: .55rem .7rem; border: 1px solid var(--vmw-border); border-radius: var(--vmw-radius); font: inherit; background: #fff; color: inherit; }
.vmwithdrawal-input:focus { outline: 2px solid var(--vmw-primary); outline-offset: 1px; }
.vmwithdrawal-input--code { max-width: 12rem; letter-spacing: .3em; font-size: 1.3rem; text-align: center; }
.vmwithdrawal-hint { font-size: .85rem; margin-top: .25rem; min-height: 1.2em; }
.vmwithdrawal-hint.is-invalid { color: #b00020; }
.vmwithdrawal-hint.is-valid { color: var(--vmw-success); }
.vmwithdrawal-choice { display: flex; align-items: flex-start; gap: .6rem; padding: .6rem 0; }
.vmwithdrawal-choice input { margin-top: .3rem; }
.vmwithdrawal-bank { margin-top: .5rem; padding-top: .5rem; border-top: 1px dashed var(--vmw-border); }
.vmwithdrawal-inline-form { display: inline-block; margin-right: .5rem; }
.vmwithdrawal-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: var(--vmw-gap); }

/* Buttons */
.vmwithdrawal-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .6rem 1.1rem; border-radius: var(--vmw-radius); border: 1px solid var(--vmw-border); background: #fff; color: inherit; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; min-height: 2.75rem; }
.vmwithdrawal-btn--primary { background: var(--vmw-primary); border-color: var(--vmw-primary); color: var(--vmw-primary-text); }
.vmwithdrawal-btn--secondary { background: transparent; }
.vmwithdrawal-btn--link { background: none; border-color: transparent; text-decoration: underline; font-weight: 400; padding-left: .3rem; padding-right: .3rem; }
.vmwithdrawal-btn--lg { font-size: 1.1rem; padding: .8rem 1.5rem; }
.vmwithdrawal-btn--sm { min-height: 2.2rem; padding: .35rem .8rem; font-size: .9rem; }
.vmwithdrawal-btn:focus-visible { outline: 2px solid var(--vmw-primary); outline-offset: 2px; }
.vmwithdrawal-btn[disabled] { opacity: .6; cursor: progress; }
@media (max-width: 40rem) { .vmwithdrawal-actions .vmwithdrawal-btn--primary { width: 100%; } }

/* Orders list (start step) */
.vmwithdrawal-orders, .vmwithdrawal-items, .vmwithdrawal-list, .vmwithdrawal-summary-items, .vmwithdrawal-messages, .vmwithdrawal-timeline { list-style: none; margin: 0; padding: 0; }
.vmwithdrawal-orders__item, .vmwithdrawal-list__item { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; padding: .75rem 0; border-top: 1px solid var(--vmw-border); }
.vmwithdrawal-orders__item:first-child, .vmwithdrawal-list__item:first-child { border-top: 0; }
.vmwithdrawal-orders__main { min-width: 0; flex: 1 1 14rem; }
.vmwithdrawal-orders__meta, .vmwithdrawal-list__meta { display: block; color: var(--vmw-muted); font-size: .9em; }
.vmwithdrawal-list__link { display: grid; grid-template-columns: 1fr auto; gap: .25rem .75rem; width: 100%; text-decoration: none; color: inherit; }
.vmwithdrawal-list__number { font-weight: 600; }
.vmwithdrawal-list__status { grid-row: 1 / span 2; align-self: center; }
.vmwithdrawal-list__refund { grid-column: 1 / -1; font-size: .9em; }

/* Items (cards on mobile, row on desktop) */
.vmwithdrawal-item { display: grid; grid-template-columns: 1fr; gap: .75rem; padding: 1rem 0; border-top: 1px solid var(--vmw-border); }
.vmwithdrawal-item:first-child { border-top: 0; }
.vmwithdrawal-item.is-disabled { opacity: .7; }
.vmwithdrawal-item__name { font-weight: 600; }
.vmwithdrawal-item__attrs { color: var(--vmw-muted); }
.vmwithdrawal-item__meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; color: var(--vmw-muted); font-size: .9em; }
.vmwithdrawal-item__notice { margin-top: .4rem; padding: .4rem .6rem; background: var(--vmw-info-bg); border-radius: var(--vmw-radius); font-size: .9em; }
.vmwithdrawal-item__controls { display: grid; gap: .75rem; }
@media (min-width: 48rem) { .vmwithdrawal-item { grid-template-columns: 1fr 22rem; } }
.vmwithdrawal-qty { display: flex; align-items: center; gap: .4rem; }
.vmwithdrawal-qty__input { width: 5rem; text-align: center; }
.vmwithdrawal-qty__btn { width: 2.5rem; height: 2.5rem; border-radius: var(--vmw-radius); border: 1px solid var(--vmw-border); background: #fff; font-size: 1.2rem; cursor: pointer; }
.vmwithdrawal-qty__max { color: var(--vmw-muted); font-size: .9em; }
.vmwithdrawal-reason-text { margin-top: .4rem; }
.vmwithdrawal-field--reason[hidden] { display: none; }

/* Summary */
.vmwithdrawal-dl { display: grid; grid-template-columns: 1fr; gap: .25rem .75rem; margin: 0 0 1rem; }
.vmwithdrawal-dl dt { font-weight: 600; }
.vmwithdrawal-dl dd { margin: 0 0 .5rem; }
@media (min-width: 40rem) { .vmwithdrawal-dl { grid-template-columns: 12rem 1fr; } .vmwithdrawal-dl dd { margin: 0; } }
.vmwithdrawal-summary-items__row { display: flex; gap: .75rem; padding: .5rem 0; border-top: 1px solid var(--vmw-border); }
.vmwithdrawal-summary-items__row:first-child { border-top: 0; }
.vmwithdrawal-summary-items__qty { flex: 0 0 3rem; font-weight: 600; }
.vmwithdrawal-summary-items__name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.vmwithdrawal-summary-items__amount { flex: 0 0 auto; white-space: nowrap; }
.vmwithdrawal-estimate { margin-top: 1rem; padding-top: .75rem; border-top: 2px solid var(--vmw-border); }
.vmwithdrawal-estimate__row { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; }
.vmwithdrawal-estimate__row--total { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--vmw-border); margin-top: .3rem; padding-top: .5rem; }
.vmwithdrawal-legal { margin-top: 1rem; font-size: .9em; }
.vmwithdrawal-done__number { font-size: 1.2rem; }
.vmwithdrawal-address { margin: 1rem 0; font-style: normal; }

/* Timeline & messages */
.vmwithdrawal-timeline__item { display: grid; grid-template-columns: 1fr; gap: .1rem .75rem; padding: .4rem 0 .4rem 1rem; border-left: 2px solid var(--vmw-border); position: relative; }
.vmwithdrawal-timeline__item::before { content: ""; position: absolute; left: -.45rem; top: .8rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--vmw-primary); }
.vmwithdrawal-timeline__time { color: var(--vmw-muted); font-size: .85em; }
@media (min-width: 40rem) { .vmwithdrawal-timeline__item { grid-template-columns: 10rem 1fr; } }
.vmwithdrawal-message { padding: .75rem; border-radius: var(--vmw-radius); margin-bottom: .5rem; background: rgba(0,0,0,.04); }
.vmwithdrawal-message--customer { background: var(--vmw-info-bg); }
.vmwithdrawal-message__meta { font-size: .85em; color: var(--vmw-muted); margin-bottom: .25rem; }
.vmwithdrawal-message__body { overflow-wrap: anywhere; }

@media (prefers-reduced-motion: no-preference) { .vmwithdrawal-btn, .vmwithdrawal-input { transition: box-shadow .15s ease; } }

/* Quick mode – withdraw from the whole order */
.vmwithdrawal-quick { border-color: var(--vmw-primary); background: var(--vmw-info-bg); }
.vmwithdrawal-quick .vmwithdrawal-inline-form { display: block; margin: 0; }
.vmwithdrawal-quick .vmwithdrawal-btn { width: 100%; }
@media (min-width: 36em) { .vmwithdrawal-quick .vmwithdrawal-btn { width: auto; } }
.vmwithdrawal-quick__or { display: flex; align-items: center; gap: .75rem; margin: 0 0 var(--vmw-gap); color: var(--vmw-muted); font-size: .9rem; }
.vmwithdrawal-quick__or::before, .vmwithdrawal-quick__or::after { content: ""; flex: 1; border-top: 1px solid var(--vmw-border); }
