/* ── Inputs: filled value = black, placeholder = light grey ─────── */
.ds-withdrawal-wrapper .form-control {
  color: #212529;
}

.ds-withdrawal-wrapper .form-control::placeholder {
  color: #adb5bd;
}

/* Select placeholder state (toggled via JS with .ds-placeholder class) */
.ds-withdrawal-wrapper select.form-control.ds-placeholder {
  color: #adb5bd;
}

.ds-withdrawal-wrapper select.form-control option {
  color: #212529;
}

/* ── Override theme zeroing out btn-outline-secondary ──────────── */
.ds-withdrawal-wrapper a.btn-outline-secondary,
.ds-withdrawal-wrapper button.btn-outline-secondary,
.ds-withdrawal-wrapper .btn.btn-outline-secondary {
  color: #495057 !important;
  background-color: #fff !important;
  border: 1px solid #6c757d !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  opacity: 1 !important;
}

.ds-withdrawal-wrapper a.btn-outline-secondary:hover,
.ds-withdrawal-wrapper button.btn-outline-secondary:hover,
.ds-withdrawal-wrapper .btn.btn-outline-secondary:hover {
  color: #fff !important;
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  text-decoration: none !important;
}

/* Narrow & center the white card — mirrors .page-authentication #content rule in theme.css */
body#module-ds_withdrawal-form #content,
body#module-ds_withdrawal-confirm #content,
body#module-ds_withdrawal-success #content {
  max-width: 760px;
  margin: 0 auto;
}

.ds-withdrawal-wrapper {
}

.ds-withdrawal-intro {
  background: #f8f9fa;
  border-left: 4px solid #007bff;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 0 4px 4px 0;
}

.ds-withdrawal-legal-note {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 0;
}

/* ── Progress stepper ────────────────────────── */
.ds-stepper {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.ds-stepper__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.ds-stepper__bubble {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: #e9ecef;
  color: #6c757d;
  border: 2px solid #dee2e6;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  line-height: 1;
}

.ds-stepper__item--active .ds-stepper__bubble {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
  box-shadow: 0 0 0 4px rgba(0, 123, 255, .18);
}

.ds-stepper__item--done .ds-stepper__bubble {
  background: #28a745;
  color: #fff;
  border-color: #28a745;
}

.ds-stepper__label {
  font-size: 0.72rem;
  font-weight: 500;
  color: #6c757d;
  text-align: center;
  white-space: nowrap;
}

.ds-stepper__item--active .ds-stepper__label {
  color: #007bff;
  font-weight: 700;
}

.ds-stepper__item--done .ds-stepper__label {
  color: #28a745;
}

.ds-stepper__line {
  flex: 1;
  height: 2px;
  background: #dee2e6;
  margin: 15px 0.5rem 0;
  transition: background 0.2s;
}

.ds-stepper__line--done {
  background: #28a745;
}

/* ── Qty stepper (+/−) ───────────────────────── */
.ds-qty-stepper {
  display: inline-flex;
  align-items: center;
}

.ds-qty-btn {
  width: 28px;
  height: 32px;
  border: 1px solid #ced4da;
  background: #f8f9fa;
  color: #495057;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.12s;
  padding: 0;
}

.ds-qty-btn:hover:not(:disabled) {
  background: #e2e6ea;
  color: #212529;
}

.ds-qty-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ds-qty-minus {
  border-radius: 4px 0 0 4px;
  border-right: none;
}

.ds-qty-plus {
  border-radius: 0 4px 4px 0;
  border-left: none;
}

.ds-qty-input {
  width: 44px !important;
  height: 32px;
  border: 1px solid #ced4da;
  border-radius: 0;
  text-align: center;
  font-size: 0.9rem;
  padding: 0 0.15rem;
  -moz-appearance: textfield;
  appearance: textfield;
}

.ds-qty-input::-webkit-inner-spin-button,
.ds-qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ds-qty-input:disabled {
  background: #f8f9fa;
  color: #adb5bd;
}

.ds-withdrawal-items {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 0.5rem;
  background: #fff;
}

.ds-withdrawal-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
}

.ds-withdrawal-item-row:last-child {
  border-bottom: none;
}

.ds-withdrawal-item-check-col {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1 1 auto;
}

.ds-withdrawal-item-check-col input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.ds-withdrawal-item-name {
  cursor: pointer;
  margin-bottom: 0;
  font-weight: normal;
}

.ds-withdrawal-item-qty-col {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.ds-withdrawal-qty-label {
  font-size: 0.82rem;
  color: #6c757d;
  margin-bottom: 0;
  white-space: nowrap;
}

.ds-withdrawal-qty-max {
  font-size: 0.82rem;
  color: #6c757d;
  white-space: nowrap;
  margin-left: 0.4rem;
}

/* ── Product thumbnail in step 2 ────────────── */
.ds-item-thumb {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 3px;
  background: #f8f9fa;
}

.ds-item-thumb-placeholder {
  display: inline-block;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: #f0f0f0;
  border-radius: 3px;
}

/* ── Confirm page ────────────────────────────── */
.ds-confirm-meta {
  background: #f8f9fa;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.ds-confirm-meta__row {
  display: flex;
  gap: 0.5rem;
  padding: 0.2rem 0;
  font-size: 0.9rem;
}

.ds-confirm-meta__label {
  color: #6c757d;
  min-width: 90px;
  flex-shrink: 0;
}

.ds-confirm-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  margin-bottom: 0.6rem;
}

.ds-confirm-products {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: #fff;
  padding: 0.5rem;
  margin-bottom: 1rem;
}

.ds-confirm-product {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.5rem;
  border-bottom: 1px solid #f0f0f0;
}

.ds-confirm-product:last-child {
  border-bottom: none;
}

.ds-confirm-product__img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 3px;
  background: #f8f9fa;
}

.ds-confirm-product__img--placeholder {
  display: inline-block;
  background: #f0f0f0;
}

.ds-confirm-product__info {
  flex: 1 1 auto;
}

.ds-confirm-product__name {
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.ds-confirm-product__meta {
  font-size: 0.82rem;
  color: #6c757d;
}

.ds-confirm-note {
  background: #fff9e6;
  border-left: 3px solid #ffc107;
  border-radius: 0 4px 4px 0;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.ds-confirm-note__label {
  font-weight: 600;
  color: #856404;
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ds-confirm-note__text {
  margin: 0;
  color: #343a40;
}

.ds-confirm-declaration {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
}

.ds-confirm-declaration summary {
  cursor: pointer;
  color: #6c757d;
  font-size: 0.85rem;
}

.ds-confirm-declaration summary:hover {
  color: #007bff;
}

.ds-confirm-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* ── Per-product reason select ───────────────── */
.ds-item-reason-block {
  padding: 0.4rem 0.75rem 0.6rem 2.6rem;
  background: #f9fafb;
  border-top: 1px solid #f0f0f0;
}

.ds-reason-label {
  font-size: 0.82rem;
  color: #6c757d;
  display: block;
  margin-bottom: 0.3rem;
}

.ds-reason-select,
.ds-reason-custom {
  max-width: 340px;
}

.ds-withdrawal-order-found {
  border-left: 4px solid #28a745;
}

.ds-withdrawal-item-excluded {
  opacity: 0.6;
  background: #f8f9fa;
}

.ds-withdrawal-item-excluded .ds-withdrawal-item-name {
  color: #6c757d;
  cursor: default;
}

.ds-withdrawal-excl-badge {
  font-size: 0.72rem;
  padding: 0.15em 0.45em;
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
  border-radius: 3px;
  font-weight: normal;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.ds-withdrawal-excl-reason {
  font-size: 0.8rem;
  color: #856404;
  background: #fff9e6;
  border-left: 3px solid #ffc107;
  padding: 0.3rem 0.75rem;
  margin: 0 0.5rem 0.25rem;
}

.ds-withdrawal-b2b-block {
  border-left: 4px solid #ffc107;
}

.ds-withdrawal-declaration-text {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.95rem;
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 4px;
  border: none;
  margin: 0;
}

.ds-withdrawal-btn--footer {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  font-size: 0.85rem;
  color: #6c757d;
  text-decoration: underline;
  border: none;
  background: none;
}

.ds-withdrawal-btn--footer:hover {
  color: #343a40;
}

.ds-withdrawal-btn--account {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  color: #343a40;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ds-withdrawal-btn--account:hover {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0,123,255,.15);
  color: #007bff;
  text-decoration: none;
}

.ds-withdrawal-btn--order {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 4px;
  color: #856404;
  font-size: 0.9rem;
  text-decoration: none;
  margin-top: 0.5rem;
}

.ds-withdrawal-btn--order:hover {
  background: #ffc107;
  color: #212529;
  text-decoration: none;
}

.ds-withdrawal-footer-block,
.ds-withdrawal-account-block,
.ds-withdrawal-order-block {
  margin: 0.5rem 0;
}

/* ── Previous withdrawals block ─────────────── */
.ds-withdrawal-prev-block {
  background: #fff8e1;
  border-left: 4px solid #ffc107;
  border-radius: 0 4px 4px 0;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1rem;
}

.ds-withdrawal-prev-intro {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.ds-withdrawal-prev-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.6rem;
}

.ds-withdrawal-prev-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.2rem 0;
  font-size: 0.9rem;
}

.ds-withdrawal-prev-date {
  font-weight: 500;
  color: #495057;
}

.ds-withdrawal-prev-status {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: #6c757d;
}

.ds-withdrawal-prev-status--0 { background: #6c757d; }
.ds-withdrawal-prev-status--1 { background: #fd7e14; }
.ds-withdrawal-prev-status--2 { background: #28a745; }

.ds-withdrawal-prev-note {
  margin-bottom: 0;
}

/* ── Account tile — matches PS Classic .link-item tiles ─── */
.ds-withdrawal-account-tile {
  display: block;
  text-decoration: none;
  color: inherit;
}

.ds-withdrawal-account-tile:hover {
  text-decoration: none;
  color: inherit;
}

/* ── Order detail: withdrawal link next to Zamów ponownie ── */
.ds-withdrawal-btn--reorder {
  display: block;
  margin-top: 0.4rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.82rem;
  color: #856404;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
  text-align: center;
}

.ds-withdrawal-btn--reorder:hover {
  background: #ffc107;
  color: #212529;
  text-decoration: none;
}

/* ── History list: withdrawal link in order-actions cell ─── */
.ds-withdrawal-history-link {
  display: block;
  font-size: 0.82rem;
  color: #856404;
  text-decoration: none;
  margin-top: 0.2rem;
  white-space: nowrap;
}

.ds-withdrawal-history-link:hover {
  color: #533f03;
  text-decoration: underline;
}

.ds-withdrawal-history-icon {
  color: #856404;
  text-decoration: none;
}

.ds-withdrawal-history-icon:hover {
  color: #533f03;
}

/* ── Logged-in form: order select ──────────────────────── */
.ds-order-select {
  max-width: 440px;
}
