/* ═══════════════════════════════════════════════════════════
   ds_withdrawal — ewnar theme styles
   Wzorowane na .login-page .wrapper-login z motywu ewnar
   ═══════════════════════════════════════════════════════════ */

/* ── Layout: white card (jak .wrapper-login) ──────────────── */
.ds-withdrawal-wrapper {
  background: #fff;
  border-radius: 30px;
  padding: 50px 60px 65px;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (max-width: 767px) {
  .ds-withdrawal-wrapper {
    padding: 30px 20px;
    border-radius: 16px;
  }
}

/* ── Intro text (legal notice) ────────────────────────────── */
.ds-withdrawal-intro {
  width: 100%;
  max-width: 500px;
  text-align: center;
  margin-bottom: 28px;
  color: #707070;
  font-size: 14px;
  line-height: 1.6;
}

.ds-withdrawal-intro p {
  margin-bottom: 6px;
}

.ds-withdrawal-legal-note {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 0;
}

/* ── Progress stepper ─────────────────────────────────────── */
.ds-stepper {
  display: flex;
  align-items: flex-start;
  width: 100%;
  max-width: 500px;
  margin-bottom: 32px;
}

.ds-stepper__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ds-stepper__bubble {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  background: #f3f3f3;
  color: #aaa;
  border: 2px solid #e0e0e0;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  line-height: 1;
}

.ds-stepper__item--active .ds-stepper__bubble {
  background: #3a3a3a;
  color: #fff;
  border-color: #3a3a3a;
}

.ds-stepper__item--done .ds-stepper__bubble {
  background: #3a3a3a;
  color: #fff;
  border-color: #3a3a3a;
}

.ds-stepper__label {
  font-size: 11px;
  font-weight: 500;
  color: #aaa;
  text-align: center;
  white-space: nowrap;
}

.ds-stepper__item--active .ds-stepper__label {
  color: #3a3a3a;
  font-weight: 700;
}

.ds-stepper__item--done .ds-stepper__label {
  color: #707070;
}

.ds-stepper__line {
  flex: 1;
  height: 2px;
  background: #e0e0e0;
  margin: 18px 8px 0;
  transition: background 0.2s;
}

.ds-stepper__line--done {
  background: #3a3a3a;
}

/* ── Alerts ───────────────────────────────────────────────── */
.ds-withdrawal-wrapper .alert {
  width: 100%;
  max-width: 500px;
  border-radius: 10px;
  margin-bottom: 16px;
  padding: 12px 16px;
  font-size: 14px;
}

.ds-withdrawal-wrapper .alert-danger {
  background: #fff0f0;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.ds-withdrawal-wrapper .alert-success {
  background: #f0fff4;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.ds-withdrawal-wrapper .alert-info {
  background: #f0f8ff;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

.ds-withdrawal-wrapper .alert-warning {
  background: #fffbf0;
  border: 1px solid #ffeeba;
  color: #856404;
}

/* ── Form ─────────────────────────────────────────────────── */
#withdrawal-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 500px;
}

/* ── Form groups & labels ─────────────────────────────────── */
.ds-withdrawal-wrapper .form-group {
  margin-bottom: 12px;
  width: 100%;
}

.ds-withdrawal-wrapper .form-group label,
.ds-withdrawal-wrapper label.required {
  display: block;
  font-size: 13px;
  color: #707070;
  margin-bottom: 6px;
  font-weight: 500;
}

.ds-withdrawal-wrapper label.required::before {
  content: "";
}

/* ── Inputs & selects ─────────────────────────────────────── */
.ds-withdrawal-wrapper .form-control {
  width: 100%;
  background: #f3f3f3;
  height: 54px;
  border-radius: 10px;
  border: 0;
  padding: 0 16px;
  color: #3a3a3a;
  font-size: 14px;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.ds-withdrawal-wrapper .form-control:focus {
  background: #ebebeb;
  outline: none;
  border: 0;
  box-shadow: none;
}

.ds-withdrawal-wrapper .form-control::placeholder {
  color: #bbb;
}

.ds-withdrawal-wrapper select.form-control {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.ds-withdrawal-wrapper select.form-control.ds-placeholder {
  color: #bbb;
}

.ds-withdrawal-wrapper select.form-control option {
  color: #3a3a3a;
}

.ds-withdrawal-wrapper textarea.form-control {
  height: auto;
  padding: 14px 16px;
  resize: vertical;
  min-height: 90px;
}

.ds-withdrawal-wrapper .form-text,
.ds-withdrawal-wrapper small.form-text {
  font-size: 12px;
  color: #aaa;
  margin-top: 5px;
  display: block;
}

/* ── Buttons ──────────────────────────────────────────────── */
.ds-withdrawal-wrapper .btn-primary,
.ds-withdrawal-wrapper button.btn.btn-primary,
.ds-withdrawal-wrapper button[type="submit"].btn-primary {
  width: 100%;
  background: #3a3a3a !important;
  color: #fff !important;
  height: 54px;
  border-radius: 10px;
  border: 0 !important;
  transition: background 0.3s;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  padding: 0 20px;
}

.ds-withdrawal-wrapper .btn-primary:hover,
.ds-withdrawal-wrapper button.btn.btn-primary:hover,
.ds-withdrawal-wrapper button[type="submit"].btn-primary:hover {
  background: #000 !important;
  color: #fff !important;
  text-decoration: none !important;
}

.ds-withdrawal-wrapper a.btn-outline-secondary,
.ds-withdrawal-wrapper button.btn-outline-secondary,
.ds-withdrawal-wrapper .btn.btn-outline-secondary {
  height: 54px;
  border-radius: 10px;
  border: 1px solid #ddd !important;
  background: #fff !important;
  color: #707070 !important;
  font-size: 14px;
  text-decoration: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  padding: 0 20px;
}

.ds-withdrawal-wrapper a.btn-outline-secondary:hover,
.ds-withdrawal-wrapper button.btn-outline-secondary:hover {
  background: #f3f3f3 !important;
  border-color: #ccc !important;
  color: #3a3a3a !important;
  text-decoration: none !important;
}

/* ── Form actions row ─────────────────────────────────────── */
.ds-withdrawal-wrapper .form-actions {
  margin-top: 20px;
}

.ds-withdrawal-wrapper .row.form-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
}

.ds-withdrawal-wrapper .row.form-actions .col-md-6 {
  flex: 1;
  padding: 0;
}

.ds-withdrawal-wrapper .row.form-actions .mb-2 {
  margin-bottom: 0 !important;
}

/* ── "Order found" success bar ───────────────────────────── */
.ds-withdrawal-order-found {
  background: #f0fff4;
  border: 1px solid #c3e6cb;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  color: #155724;
  font-size: 14px;
  width: 100%;
  max-width: 500px;
  text-align: left;
  box-sizing: border-box;
}

.ds-withdrawal-order-found__text {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
}

.ds-withdrawal-order-found__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: #28a745;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-withdrawal-order-found .ds-withdrawal-order-found__change {
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Product items list (step 2) ──────────────────────────── */
.ds-withdrawal-items {
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 4px 0;
  background: #fff;
}

.ds-withdrawal-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #f5f5f5;
}

.ds-withdrawal-item-row:last-child {
  border-bottom: none;
}

.ds-withdrawal-item-check-col {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
}

.ds-withdrawal-item-check-col input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #3a3a3a;
}

.ds-withdrawal-item-name {
  cursor: pointer;
  margin-bottom: 0;
  font-size: 14px;
  font-weight: normal;
  color: #3a3a3a;
}

.ds-withdrawal-item-qty-col {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ds-withdrawal-qty-label {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 0;
  white-space: nowrap;
}

.ds-withdrawal-qty-max {
  font-size: 12px;
  color: #aaa;
  white-space: nowrap;
  margin-left: 4px;
}

.ds-withdrawal-item-excluded {
  opacity: 0.55;
}

.ds-withdrawal-item-excluded .ds-withdrawal-item-name {
  color: #aaa;
  cursor: default;
}

.ds-withdrawal-excl-badge {
  font-size: 11px;
  padding: 2px 7px;
  background: #f3f3f3;
  color: #707070;
  border: 1px solid #e0e0e0;
  border-radius: 30px;
  font-weight: normal;
  margin-left: 6px;
  vertical-align: middle;
}

.ds-withdrawal-excl-reason {
  font-size: 12px;
  color: #aaa;
  padding: 6px 14px 6px 42px;
  margin: 0;
}

/* ── Qty stepper (+/−) ────────────────────────────────────── */
.ds-qty-stepper {
  display: inline-flex;
  align-items: center;
  background: #f3f3f3;
  border-radius: 8px;
  overflow: hidden;
}

.ds-qty-btn {
  width: 30px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #707070;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s;
}

.ds-qty-btn:hover:not(:disabled) {
  background: #e8e8e8;
  color: #3a3a3a;
}

.ds-qty-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.ds-qty-minus { border-radius: 8px 0 0 8px; }
.ds-qty-plus  { border-radius: 0 8px 8px 0; }

.ds-qty-input {
  width: 40px !important;
  height: 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
  font-size: 14px;
  padding: 0;
  color: #3a3a3a;
  -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: transparent;
  color: #707070;
}

/* ── Product thumbnail ────────────────────────────────────── */
.ds-item-thumb {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 6px;
  background: #f3f3f3;
}

.ds-item-thumb-placeholder {
  display: inline-block;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: #f3f3f3;
  border-radius: 6px;
}

/* ── Per-product reason ───────────────────────────────────── */
.ds-item-reason-block {
  padding: 8px 14px 10px 42px;
  background: #fafafa;
  border-top: 1px solid #f0f0f0;
}

.ds-reason-label {
  font-size: 12px;
  color: #aaa;
  display: block;
  margin-bottom: 4px;
}

.ds-reason-select,
.ds-reason-custom {
  max-width: 360px;
  height: 44px;
}

.ds-reason-custom {
  height: auto;
  padding: 10px 14px;
}

/* ── Confirm page ─────────────────────────────────────────── */
.ds-confirm-meta,
.ds-confirm-products,
.ds-confirm-note,
.ds-confirm-declaration,
.ds-confirm-actions,
.ds-withdrawal-wrapper > p {
  width: 100%;
  max-width: 500px;
  box-sizing: border-box;
}

.ds-confirm-meta {
  background: #f3f3f3;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.ds-confirm-meta__row {
  display: flex;
  gap: 8px;
  padding: 3px 0;
  font-size: 14px;
}

.ds-confirm-meta__label {
  color: #aaa;
  min-width: 100px;
  flex-shrink: 0;
}

.ds-confirm-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #aaa;
  margin-bottom: 10px;
}

.ds-confirm-products {
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  background: #fff;
  padding: 4px 0;
  margin-bottom: 16px;
}

.ds-confirm-product {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #f5f5f5;
}

.ds-confirm-product:last-child {
  border-bottom: none;
}

.ds-confirm-product__img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 6px;
  background: #f3f3f3;
}

.ds-confirm-product__img--placeholder {
  display: inline-block;
  background: #f3f3f3;
}

.ds-confirm-product__info {
  flex: 1 1 auto;
}

.ds-confirm-product__name {
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 2px;
  color: #3a3a3a;
}

.ds-confirm-product__meta {
  font-size: 12px;
  color: #aaa;
}

.ds-confirm-note {
  background: #fffbf0;
  border-left: 3px solid #e0c060;
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
}

.ds-confirm-note__label {
  font-weight: 600;
  color: #856404;
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ds-confirm-note__text {
  margin: 0;
  color: #3a3a3a;
}

.ds-confirm-declaration {
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 20px;
  font-size: 13px;
}

.ds-confirm-declaration summary {
  cursor: pointer;
  color: #707070;
  font-size: 13px;
}

.ds-confirm-declaration summary:hover {
  color: #3a3a3a;
}

.ds-confirm-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.ds-withdrawal-declaration-text {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 13px;
  background: #f3f3f3;
  padding: 16px;
  border-radius: 8px;
  border: none;
  margin: 10px 0 0;
}

/* ── Previous withdrawals block ───────────────────────────── */
.ds-withdrawal-prev-block {
  background: #fffbf0;
  border-left: 3px solid #e0c060;
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin-bottom: 16px;
  width: 100%;
  max-width: 500px;
}

.ds-withdrawal-prev-intro {
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

.ds-withdrawal-prev-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}

.ds-withdrawal-prev-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 0;
  font-size: 14px;
}

.ds-withdrawal-prev-date {
  font-weight: 500;
  color: #3a3a3a;
}

.ds-withdrawal-prev-status {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #aaa;
}

.ds-withdrawal-prev-status--0 { background: #aaa; }
.ds-withdrawal-prev-status--1 { background: #e09040; }
.ds-withdrawal-prev-status--2 { background: #3a3a3a; }

.ds-withdrawal-prev-note {
  margin-bottom: 0;
  font-size: 12px;
  color: #aaa;
}

/* ── B2B block ────────────────────────────────────────────── */
.ds-withdrawal-b2b-block {
  border-left: 3px solid #e0c060;
  width: 100%;
  max-width: 500px;
}

/* ── Account tile ─────────────────────────────────────────── */
.ds-withdrawal-account-tile {
  display: block;
  text-decoration: none;
  color: inherit;
}

.ds-withdrawal-account-tile:hover {
  text-decoration: none;
  color: inherit;
}

/* ── Buttons for hooks (footer/order/account) ─────────────── */
.ds-withdrawal-btn--footer {
  display: inline-block;
  padding: 4px 0;
  font-size: 14px;
  color: #707070;
  text-decoration: none;
  background: none;
  border: none;
}

.ds-withdrawal-btn--footer:hover {
  color: #3a3a3a;
  text-decoration: underline;
}

.ds-withdrawal-btn--account {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f3f3f3;
  border: 0;
  border-radius: 10px;
  color: #3a3a3a;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s;
}

.ds-withdrawal-btn--account:hover {
  background: #ebebeb;
  color: #000;
  text-decoration: none;
}

/* ── Order confirmation block (white card) ────────────────── */
.ds-withdrawal-order-block {
  background: #fff;
  border-radius: 20px;
  padding: 30px 40px;
  margin-top: 16px;
  text-align: center;
}

.ds-withdrawal-btn--order {
  display: inline-block;
  padding: 10px 24px;
  background: #f8f8f8;
  border: 1px solid #d0d0d0;
  border-radius: 10px;
  color: #333;
  font-size: 14px;
  text-decoration: none;
  margin-top: 0;
}

.ds-withdrawal-btn--order:hover {
  background: #ebebeb;
  color: #3a3a3a;
  text-decoration: none;
}

.ds-withdrawal-btn--reorder {
  display: block;
  margin-top: 6px;
  padding: 5px 12px;
  font-size: 12px;
  color: #707070;
  background: #f3f3f3;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  text-align: center;
}

.ds-withdrawal-btn--reorder:hover {
  background: #ebebeb;
  color: #3a3a3a;
  text-decoration: none;
}

.ds-withdrawal-history-link {
  display: block;
  font-size: 12px;
  color: #707070;
  text-decoration: none;
  margin-top: 3px;
  white-space: nowrap;
}

.ds-withdrawal-history-link:hover {
  color: #3a3a3a;
  text-decoration: underline;
}

.ds-withdrawal-history-icon {
  color: #707070;
  text-decoration: none;
}

.ds-withdrawal-history-icon:hover {
  color: #3a3a3a;
}

/* ── Order select (logged-in) ─────────────────────────────── */
.ds-order-select {
  width: 100%;
}

/* ── PS 1.6 / Bootstrap 3 compatibility ──────────────────── */
.ds-withdrawal-wrapper .mb-0 { margin-bottom: 0 !important; }
.ds-withdrawal-wrapper .mb-1 { margin-bottom: 0.25rem !important; }
.ds-withdrawal-wrapper .mb-2 { margin-bottom: 0.5rem !important; }
.ds-withdrawal-wrapper .mb-3 { margin-bottom: 1rem !important; }
.ds-withdrawal-wrapper .mb-4 { margin-bottom: 1.5rem !important; }
.ds-withdrawal-wrapper .mt-2 { margin-top: 0.5rem !important; }
.ds-withdrawal-wrapper .mt-3 { margin-top: 1rem !important; }
.ds-withdrawal-wrapper .ms-2,
.ds-withdrawal-wrapper .ml-2  { margin-left: 0.5rem !important; }
.ds-withdrawal-wrapper .mx-2  { margin-left: 0.5rem !important; margin-right: 0.5rem !important; }
.ds-withdrawal-wrapper .mr-2  { margin-right: 0.5rem !important; }
.ds-withdrawal-wrapper .w-100 { width: 100% !important; }
.ds-withdrawal-wrapper .d-flex          { display: -ms-flexbox !important; display: flex !important; }
.ds-withdrawal-wrapper .align-items-center    { -ms-flex-align: center !important; align-items: center !important; }
.ds-withdrawal-wrapper .justify-content-between { -ms-flex-pack: justify !important; justify-content: space-between !important; }
.ds-withdrawal-wrapper .flex-wrap       { -ms-flex-wrap: wrap !important; flex-wrap: wrap !important; }
.ds-withdrawal-wrapper .gap-2           { gap: 0.5rem !important; }
.ds-withdrawal-wrapper .text-muted      { color: #aaa !important; }
.ds-withdrawal-wrapper .small           { font-size: 12px !important; }

/* BS4 card (confirm/success pages) */
.ds-withdrawal-wrapper .card            { border: 1px solid #e8e8e8; border-radius: 10px; }
.ds-withdrawal-wrapper .card-header     { padding: 14px 20px; background: #f3f3f3; border-bottom: 1px solid #e8e8e8; }
.ds-withdrawal-wrapper .card-body       { padding: 20px; }
.ds-withdrawal-wrapper .table-sm th,
.ds-withdrawal-wrapper .table-sm td     { padding: 6px !important; }
.ds-withdrawal-wrapper .thead-light th  { background: #f3f3f3 !important; color: #707070; }

/* btn-outline-primary (cancel / back links) */
.ds-withdrawal-wrapper .btn-outline-primary {
  color: #3a3a3a !important;
  background: transparent !important;
  border: 1px solid #3a3a3a !important;
  border-radius: 10px !important;
  text-decoration: none !important;
  height: 54px;
  display: inline-flex;
  align-items: center;
  padding: 0 20px;
}

.ds-withdrawal-wrapper .btn-outline-primary:hover {
  color: #fff !important;
  background: #3a3a3a !important;
  text-decoration: none !important;
}

/* btn-sm (small inline buttons) */
.ds-withdrawal-wrapper .btn-sm {
  height: 36px !important;
  font-size: 12px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
}
