/*
 * Personalizzazione rapida
 * Sovrascrivere queste variabili nel CSS del tema, sotto .wdr-withdrawal-page.
 */
.wdr-withdrawal-page {
  --wdr-max-width: 800px;
  --wdr-color-text: #242424;
  --wdr-color-muted: #666;
  --wdr-color-border: #dedede;
  --wdr-color-primary: #222;
  --wdr-color-primary-text: #fff;
  --wdr-color-error: #b32d2e;
  --wdr-color-error-bg: #fff0ed;
  --wdr-color-warning: #dba617;
  --wdr-color-warning-bg: #fff8e5;
  --wdr-color-success: #218739;
  --wdr-color-success-bg: #edfaef;
  --wdr-radius: 4px;
  --wdr-space: 20px;

  box-sizing: border-box;
  width: 100%;
  max-width: var(--wdr-max-width);
  margin: 0 auto;
  color: var(--wdr-color-text);
}

.page:has(.wdr-withdrawal-page) .post-title {
  text-align: center;
}

.entry-title,
.page-title,
.woocommerce-products-header__title {
  text-align: center;
}

.wdr-withdrawal-page *,
.wdr-withdrawal-page *::before,
.wdr-withdrawal-page *::after {
  box-sizing: border-box;
}

.wdr-section,
.wdr-form,
.wdr-review,
.wdr-success {
  width: 100%;
  margin: 0 0 24px;
}

.wdr-page-title,
.wdr-order-title,
.wdr-review-title,
.wdr-success-title {
  margin-top: 0;
}

.wdr-intro-text {
  margin: 0 0 12px;
}

.wdr-form label,
.wdr-form input,
.wdr-form textarea,
.wdr-form button,
.wdr-confirm-form button {
  font: inherit;
}

.wdr-field {
  margin: 0 0 var(--wdr-space);
}

.wdr-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.wdr-input,
.wdr-textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  color: var(--wdr-color-text);
  background: #fff;
  border: 1px solid var(--wdr-color-border);
  border-radius: var(--wdr-radius);
}

.wdr-field-help {
  display: block;
  margin-top: 6px;
  color: var(--wdr-color-muted);
}

.wdr-scope-fieldset {
  display: grid;
  gap: 10px;
  margin: var(--wdr-space) 0;
  padding: 18px 27px;
  border: 1px solid var(--wdr-color-border);
  border-radius: var(--wdr-radius);
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.5;
}

.wdr-scope-legend {
  padding: 0 6px;
  font-weight: 600;
  font-size: clamp(16px, 1.5vw, 20px);
}

.wdr-radio-option,
.wdr-checkbox-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wdr-product-summary .wdr-product-checkbox {
  margin-right: 18px;
}

.wdr-product-list {
  margin: 36px 0;
  background-color: #ffffff;
  padding: 0 18px;
  border-radius: 10px;
  box-shadow: 0px 0px 20px 0px #8e8e8e38;
}

.wdr-review-product-list {
  margin: 36px 0;
  padding: 0 18px !important;
  list-style: none;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0px 0px 20px 0px #8e8e8e38;
}

.wdr-product-row,
.wdr-review-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wdr-space);
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 27px 18px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.wdr-product-row:not(:last-child),
.wdr-review-item:not(:last-child) {
  border-bottom: 1px solid var(--wdr-color-border);
}

.wdr-product-summary,
.wdr-review-product-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  position: relative;
  font-size: clamp(16px, 1.5vw, 18px);
}

.wdr-product-checkbox {
  flex: 0 0 auto;
}

.wdr-product-checkbox[hidden],
.wdr-partial-selector[hidden] {
  display: none;
}

.wdr-product-title,
.wdr-review-product-title {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(70%, 480px);
  line-height: 1.35;
  font-size: clamp(16px, 1.5vw, 20px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.wdr-product-available-quantity {
  color: var(--wdr-color-muted);
  white-space: nowrap;
}

.wdr-product-image {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  object-fit: cover;
  border-radius: var(--wdr-radius);
}

.wdr-partial-controls {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.wdr-partial-controls[hidden] {
  display: none;
}

.wdr-quantity-control[hidden] {
  display: none;
}

.wdr-quantity-input {
  width: 70px;
  min-width: 0;
  padding: 0 9px;
  color: var(--wdr-color-text);
  background: #fff;
  border: 0;
  border-radius: 0;
  font-size: 16px !important;
  line-height: 1 !important;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
  margin: 0;
}

.wdr-quantity-input::-webkit-outer-spin-button,
.wdr-quantity-input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.wdr-quantity-stepper {
  display: grid;
  grid-template-columns: 60px 40px 40px;
  min-height: 35px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d2d8e0;
  border-radius: 5px;
}

.wdr-quantity-button {
  display: inline-flex;
  justify-content: center;
  min-height: 30px;
  padding: 0;
  color: #1f2937;
  background: #fff;
  border: 0;
  border-left: 1px solid #d2d8e0;
  cursor: pointer;
  align-items: center;
}

.wdr-product-available-quantity,
.wdr-review-product-quantity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 35px;
  padding: 0 12px;
  color: var(--wdr-color-text);
  background: #fff;
  border: 1px solid #d2d8e0;
  border-radius: 5px;
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
  margin-top: 0px;
}

.wdr-review-quantity-label {
  margin-right: 6px;
  color: var(--wdr-color-muted);
  font-size: 13px;
}

.wdr-review-quantity-value {
  font-size: 16px;
  line-height: 1;
}

.wdr-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: var(--wdr-radius);
  cursor: pointer;
  text-decoration: none;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 500;
}

.wdr-button-primary {
  color: var(--wdr-color-primary-text);
  background: #ff5722 !important;
}

.wdr-button-secondary {
  color: var(--wdr-color-text);
  background: #f4f6f5;
  border: 1px solid var(--wdr-color-border);
}

.wdr-button:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 2px;
}

.wdr-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.wdr-review-details {
  display: grid;
  gap: 6px;
  margin-block: var(--wdr-space);
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.5;
}

.wdr-review-detail {
  margin: 0;
}

.wdr-review-message,
.wdr-confirmation-note {
  margin: var(--wdr-space) 0;
}

.wdr-confirmation-note {
  font-weight: 600;
}

.wdr-notice {
  width: 100%;
  margin: 0 0 var(--wdr-space);
  padding: 18px 27px;
  border-left: 4px solid;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.5;
}

.wdr-notice-error {
  color: #8a1f11;
  background: var(--wdr-color-error-bg);
  border-color: var(--wdr-color-error);
}

.wdr-notice-warning {
  background: var(--wdr-color-warning-bg);
  border-color: var(--wdr-color-warning);
}

.wdr-notice-success {
  background: var(--wdr-color-success-bg);
  border-color: var(--wdr-color-success);
}

.wdr-success-lead {
  margin: 0 0 18px;
  font-weight: 600;
}

.wdr-success-summary {
  display: grid;
  gap: 10px;
  margin: 0 0 var(--wdr-space);
}

.wdr-success-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #d2d8e0;
  border-radius: 5px;
}

.wdr-success-label {
  color: var(--wdr-color-muted);
  font-size: 13px;
}

.wdr-success-value {
  color: var(--wdr-color-text);
  font-size: 16px;
  text-align: right;
}

.wdr-success-email {
  margin: 0;
}

.wdr-error-list,
.wdr-existing-list {
  margin: 10px 0 0;
  padding-left: 20px;
}

.wdr-error-list {
  margin-top: 0;
}

.wdr-duplicate-message {
  margin-bottom: var(--wdr-space);
}

.wdr-intro .wdr-page-title {
  font-size: clamp(25px, 3vw, 35px);
  margin-bottom: 18px;
}

.wdr-intro .wdr-intro-text {
  font-size: clamp(16px, 1.5vw, 20px);
}

h3.title-order-id {
  font-size: clamp(25px, 3vw, 35px);
  margin-top: 36px;
}

.wdr-intro.wdr-section {
  background-color: #f4f6f5;
  border-left: 4px solid #303133;
  padding: 18px 27px;
}

.wdr-intro.wdr-section p {
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.5;
}

.wdr-intro.wdr-section p:not(:last-child) {
  margin-bottom: 36px;
}

.wdr-intro.wdr-section .wdr-refund-info {
  color: #5a5a5a;
}

@media (max-width: 600px) {
  .wdr-product-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .wdr-partial-controls {
    width: 100%;
    text-align: left;
  }

  .wdr-review-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .wdr-review-product-summary,
  .wdr-review-product-quantity {
    width: 100%;
  }

  .wdr-review-product-quantity {
    justify-content: space-between;
  }

  .wdr-success-detail {
    align-items: flex-start;
    flex-direction: column;
  }

  .wdr-success-value {
    text-align: left;
  }

  .wdr-form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }
}
