/* ═══════════════════════════════════════
   Withdrawal Module v2 - Frontend CSS
   PrestaShop 8/9 | Classic theme compat
   ═══════════════════════════════════════ */

/* ── Step indicator ── */
.wr-steps {
  display: flex;
  counter-reset: wr-step;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  gap: 4px;
}
.wr-steps li {
  flex: 1;
  padding: .55rem .75rem;
  font-size: .8rem;
  font-weight: 600;
  text-align: center;
  border-radius: 4px;
  background: #f1f3f4;
  color: #80868b;
  border: 1px solid #dee2e6;
  white-space: nowrap;
}
.wr-steps li.wr-active {
  background: #1a73e8;
  border-color: #1a73e8;
  color: #fff;
}
.wr-steps li.wr-done {
  background: #34a853;
  border-color: #34a853;
  color: #fff;
}

/* ── Cards ── */
.wr-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}
.wr-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid #f1f3f4;
}

/* ── Products table ── */
.wr-products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.wr-products-table th {
  background: #f8f9fa;
  font-weight: 700;
  padding: 8px 10px;
  border-bottom: 2px solid #dee2e6;
  text-align: left;
}
.wr-products-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f3f4;
  vertical-align: middle;
}
.wr-products-table tr:last-child td { border-bottom: none; }

/* ── Qty input ── */
.wr-qty-input {
  width: 70px;
  text-align: center;
  padding: 4px 6px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: .9rem;
}
.wr-qty-input:disabled { background: #f8f9fa; color: #aaa; }

/* ── Action bar ── */
.wr-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.25rem;
}

/* ── Withdrawal button (nell'ordine) ── */
.btn-wr-request {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 4px;
  border: 1px solid #f9ab00;
  background: #fff8e1;
  color: #e37400;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.btn-wr-request:hover {
  background: #f9ab00;
  color: #fff;
  text-decoration: none;
}
.wr-already-done {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .83rem;
  color: #1a73e8;
  padding: 4px 0;
}

/* ── Status badges ── */
.wr-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.wr-badge-info      { background: #e3f2fd; color: #1565c0; }
.wr-badge-warning   { background: #fff3e0; color: #e65100; }
.wr-badge-success   { background: #e8f5e9; color: #2e7d32; }
.wr-badge-danger    { background: #fce4ec; color: #b71c1c; }
.wr-badge-primary   { background: #ede7f6; color: #4527a0; }
.wr-badge-default   { background: #f5f5f5; color: #616161; }

/* ── Success page ── */
.wr-success-box {
  max-width: 560px;
  margin: 2rem auto;
  text-align: center;
}
.wr-success-icon {
  font-size: 3rem;
  color: #34a853;
  margin-bottom: .5rem;
}
.wr-ref-badge {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 5px 14px;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 4px;
  color: #2e7d32;
  margin: .5rem 0 1rem;
  letter-spacing: .5px;
}

/* ── Confirm checkbox ── */
.wr-confirm-block {
  background: #fff8e1;
  border: 1px solid #f9ab00;
  border-radius: 5px;
  padding: .85rem 1rem;
  margin: 1rem 0;
}
.wr-confirm-block label {
  font-weight: 600;
  cursor: pointer;
}

/* ── Error page ── */
.wr-error-box {
  max-width: 540px;
  margin: 2rem auto;
  text-align: center;
}

/* ── Mobile ── */
@media (max-width: 767px) {
  .wr-steps { flex-wrap: wrap; }
  .wr-steps li { font-size: .72rem; padding: .45rem .5rem; }
  .wr-products-table thead { display: none; }
  .wr-products-table tr {
    display: block;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: .5rem;
    padding: .5rem;
  }
  .wr-products-table td {
    display: flex;
    justify-content: space-between;
    border: none;
    padding: 4px 6px;
    font-size: .85rem;
  }
  .wr-products-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #555;
    flex: 0 0 45%;
  }
  .wr-actions { flex-direction: column; }
  .wr-actions a, .wr-actions button { width: 100%; text-align: center; }
  .wr-card { padding: 1rem; }
}
