/* ============================================================
   Contract Withdrawal wizard - modern customer-facing design
   Scoped under .wd-page to avoid clashing with theme styles.
   ============================================================ */
.wd-page {
    --wd-primary: #2bb6cf;
    --wd-primary-dark: #005d9d;
    --wd-green: #22c55e;
    --wd-text: #1e293b;
    --wd-muted: #64748b;
    --wd-border: #eaf3f4;
    --wd-bg-soft: #f0f5f6;
    --wd-info-bg: #eff6ff;
    --wd-radius: 4px;
    color: var(--wd-text);
    font-size: 15px;
}

.wd-page * { box-sizing: border-box; }

.wd-wrap {
    max-width: 920px;
    margin: 0 auto;
    padding: 10px 0 50px;
}
.wd-wrap--narrow { max-width: 640px; }

.wd-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--wd-text);
    margin: 10px 0 28px;
}

/* ---------------- Stepper ---------------- */
.wd-steps {
    display: flex;
    list-style: none;
    margin: 0 auto 30px;
    padding: 0;
    max-width: 760px;
}
.wd-step {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 0 4px;
}
.wd-step::before {
    content: "";
    position: absolute;
    top: 21px;
    left: -50%;
    width: 100%;
    height: 3px;
    background: var(--wd-border);
    z-index: 0;
}
.wd-step:first-child::before { display: none; }
.wd-step--done::before,
.wd-step--active::before { background: var(--wd-bg-soft); }

.wd-step__circle {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    line-height: 40px;
    border-radius: 50%;
    margin: 0 auto 8px;
    background: #fff;
    border: 2px solid var(--wd-border);
    color: var(--wd-muted);
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 0 0 6px #fff;
}
.wd-step__circle > i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.wd-step--active .wd-step__circle {
    background: var(--wd-primary);
    border-color: var(--wd-primary);
    color: #fff;
    box-shadow: 0 0 0 6px #fff
}
.wd-step--done .wd-step__circle {
    background: var(--wd-green);
    border-color: var(--wd-green);
    color: #fff;
    box-shadow: 0 0 0 6px #fff;
}
.wd-step__label {
    font-size: 13px;
    color: var(--wd-muted);
    line-height: 1.3;
}
.wd-step--active .wd-step__label { color: var(--wd-primary); font-weight: 600; }
.wd-step--done .wd-step__label { color: var(--wd-text); }

/* ---------------- Card ---------------- */
.wd-card {
    background: #fff;
    border: 1px solid var(--wd-border);
    border-radius: var(--wd-radius);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
    padding: 28px;
    margin-bottom: 22px;
}
.wd-card--pad-lg { padding: 36px; }

/* When the theme upgrades our <select> with bootstrap-select, it copies the
   wd-select class onto the wrapper. Reset the wrapper and style its button so
   it matches the design instead of showing a double border. */
.wd-page .bootstrap-select.wd-select {
    border: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    height: auto;
    width: 100% !important;
}
.wd-page .bootstrap-select.wd-select > .dropdown-toggle {
    background: #fff;
    border: 1px solid var(--wd-border);
    border-radius: 4px;
    padding: 11px 14px;
    height: auto;
    color: var(--wd-text);
    box-shadow: none;
    font-size: 15px;
    outline: none;
}
.wd-page .bootstrap-select.wd-select > .dropdown-toggle:hover,
.wd-page .bootstrap-select.wd-select > .dropdown-toggle:focus,
.wd-page .bootstrap-select.wd-select.open > .dropdown-toggle {
    border-color: var(--wd-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
    background: #fff;
    color: var(--wd-text);
}
.wd-page .bootstrap-select .dropdown-menu { border-radius: 4px; }

.wd-card__icon {
    width: 64px;
    height: 64px;
    line-height: 64px;
    border-radius: 16px;
    background: var(--wd-info-bg);
    color: var(--wd-primary);
    font-size: 24px;
    text-align: center;
    margin: 0 auto 16px;
}
.wd-card__icon i { font-size: 24px; line-height: 64px; }
.wd-card__title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
}
.wd-card__subtitle {
    text-align: center;
    color: var(--wd-muted);
    margin: 0 auto 24px;
    max-width: 460px;
    line-height: 1.5;
}

.wd-section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 4px 0 0px;
    text-align: center;
}
.wd-section-sub {
    color: var(--wd-muted);
    margin: 0 0 15px;
    font-size: 14px;
    text-align: center;
}

/* ---------------- Order info banner ---------------- */
.wd-orderbar {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--wd-bg-soft);
    border: 1px solid var(--wd-border);
    border-radius: var(--wd-radius);
    padding: 16px 20px;
    margin-bottom: 22px;
}
.wd-orderbar__icon {
    position: relative;
    width: 46px;
    height: 46px;
    line-height: 46px;
    text-align: center;
    border-radius: 12px;
    background: #fff;
    color: var(--wd-primary);
    font-size: 20px;
    flex: 0 0 auto;
    border: 1px solid var(--wd-border);
}
.wd-orderbar__icon > i{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
}
.wd-orderbar__main { flex: 1; }
.wd-orderbar__title { font-weight: 700; font-size: 16px; }
.wd-orderbar__meta { color: var(--wd-muted); font-size: 13px; margin-top: 2px; }
.wd-orderbar__meta span { white-space: nowrap; }

/* ---------------- Forms ---------------- */
.wd-field { margin-bottom: 18px; }
.wd-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
}
.wd-label .wd-req { color: #ef4444; }
.wd-input,
.wd-select,
.wd-textarea {
    width: 100%;
    border: 1px solid var(--wd-border);
    border-radius: 4px;
    padding: 11px 14px;
    font-size: 15px;
    color: var(--wd-text);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.wd-input:focus,
.wd-select:focus,
.wd-textarea:focus {
    outline: none;
    border-color: var(--wd-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.wd-textarea { resize: vertical; min-height: 44px; }
.wd-input::placeholder, .wd-textarea::placeholder { color: #aab4c4; }
.wd-field-error { color: #ef4444; font-size: 13px; margin-top: 5px; }

/* ---------------- Buttons ---------------- */
.wd-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 4px;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
}
.wd-btn i { font-size: 14px; }
.wd-btn--primary { background: var(--wd-primary); color: #fff; }
.wd-btn--primary:hover { background: var(--wd-primary-dark); color: #fff; }
.wd-btn--ghost { background: #fff; color: var(--wd-text); border: 1px solid var(--wd-border); }
.wd-btn--ghost:hover { background: var(--wd-bg-soft); color: var(--wd-text); }
.wd-btn--block { width: 100%; justify-content: center; padding: 14px; font-size: 16px; }
.wd-btn--lg { padding: 14px 26px; font-size: 16px; }

/* ---------------- Note / info boxes ---------------- */
.wd-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--wd-info-bg);
    border: 1px solid #dbe7fe;
    border-radius: 4px;
    padding: 14px 16px;
    color: #1e3a8a;
    font-size: 14px;
    line-height: 1.5;
    margin: 18px 0;
}
.wd-note i { color: var(--wd-primary); margin-top: 2px; }
.wd-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: var(--wd-radius);
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 14px;
}
.wd-alert > p:last-child {
    margin: 0;
}


/* ---------------- FAQ ---------------- */
.wd-faq {
    background: var(--wd-bg-soft);
    border: 1px solid var(--wd-border);
    border-radius: var(--wd-radius);
    padding: 18px 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.wd-faq__icon {
    width: 38px; height: 38px; line-height: 38px; text-align: center;
    border-radius: 50%; background: #fff; color: var(--wd-primary);
    border: 1px solid var(--wd-border); flex: 0 0 auto;
}
.wd-faq__q { font-weight: 700; margin: 2px 0 4px; }
.wd-faq__a { color: var(--wd-muted); font-size: 14px; line-height: 1.5; }
.wd-instructions-html { color: #1e293b; font-size: 14px; line-height: 1.6; }
.wd-instructions-html p { margin: 0 0 10px; }
.wd-instructions-html p:last-child { margin-bottom: 0; }

/* ---------------- Product selection rows ---------------- */
.wd-products { display: flex; flex-direction: column; gap: 0; }
.wd-prow {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 18px;
    padding: 20px 4px;
    border-top: 1px solid var(--wd-border);
}
.wd-prow:first-child { border-top: none; }
/* keep the product identity (checkbox/image/name) vertically centered,
   while the control columns align to the top so their labels + inputs line up */
.wd-prow__check,
.wd-prow__img,
.wd-prow__info { align-self: center; }
.wd-prow__check { flex: 0 0 auto; }
.wd-prow__img { flex: 0 0 auto; }
.wd-prow__img img { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; }
.wd-prow__info { flex: 1 1 200px; min-width: 180px; }
.wd-prow__name { font-weight: 700; font-size: 14px; line-height: 1.4; }
.wd-prow__extra { color: var(--wd-muted); font-size: 13px; margin-top: 2px; line-height: 1.4; }
.wd-prow__meta { color: var(--wd-muted); font-size: 13px; margin-top: 3px; }
.wd-prow__col { flex: 0 0 auto; }
.wd-prow__col--grow { flex: 1 1 160px; min-width: 150px; }
.wd-colhead { font-size: 12px; color: var(--wd-muted); font-weight: 600; margin-bottom: 6px; text-transform: none; }
.wd-ordered { font-weight: 600; }

/* qty stepper */
.wd-qty { display: inline-flex; align-items: center; border: 1px solid var(--wd-border); border-radius: 4px; overflow: hidden; }
.wd-qty__btn {
    width: 38px; height: 40px; border: none; background: #fff; color: var(--wd-text);
    font-size: 18px; cursor: pointer; line-height: 1;
}
.wd-qty__btn:hover { background: var(--wd-bg-soft); }
.wd-qty__input {
    width: 48px; height: 40px; border: none; text-align: center; font-size: 15px;
    border-left: 1px solid var(--wd-border); border-right: 1px solid var(--wd-border);
    -moz-appearance: textfield;
}
.wd-qty__input::-webkit-outer-spin-button,
.wd-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wd-hint { font-size: 12px; color: var(--wd-muted); margin-top: 6px; }
.wd-counter { text-align: right; font-size: 12px; color: var(--wd-muted); margin-top: 4px; }

/* ---------------- Refund method cards ---------------- */
.wd-methods { display: flex; gap: 18px; flex-wrap: wrap; }
.wd-method {
    flex: 1 1 280px;
    border: 2px solid var(--wd-border);
    border-radius: var(--wd-radius);
    padding: 20px;
    cursor: pointer;
    position: relative;
    transition: border-color .15s, box-shadow .15s;
}
.wd-method.is-selected {
    border-color: var(--wd-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}
.wd-method__head { display: flex; align-items: flex-start; gap: 10px; }
.wd-method__radio { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--wd-primary); }
.wd-method__icon { margin-left: auto; font-size: 22px; color: var(--wd-primary); }
.wd-method__title { font-weight: 700; }
.wd-method__desc { color: var(--wd-muted); font-size: 13px; margin-top: 4px; line-height: 1.5; }
.wd-method__body { margin-top: 16px; }

/* ---------------- Summary / refund box ---------------- */
.wd-refundbox {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--wd-bg-soft);
    border: 1px solid var(--wd-border);
    border-radius: var(--wd-radius);
    padding: 18px 22px;
    margin: 22px 0;
}
.wd-refundbox__icon {
    position: relative;
    width: 48px; height: 48px;
    border-radius: 50%; background: #fff; color: var(--wd-primary);
    border: 1px solid var(--wd-border); flex: 0 0 auto;
}
.wd-refundbox__icon i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    line-height: 1;
}
.wd-refundbox__label { color: var(--wd-muted); font-size: 13px; }
.wd-refundbox__amount { font-size: 24px; font-weight: 700; color: var(--wd-text); }
.wd-refundbox__note { margin-left: auto; color: var(--wd-muted); font-size: 13px; max-width: 280px; text-align: right; }

/* ---------------- Tables (summary) ---------------- */
.wd-table { width: 100%; border-collapse: collapse; margin: 6px 0; }
.wd-table th {
    text-align: left; font-size: 12px; color: var(--wd-muted); font-weight: 600;
    padding: 8px 10px; border-bottom: 2px solid var(--wd-border);
}
.wd-table td { padding: 12px 10px; border-bottom: 1px solid var(--wd-border); vertical-align: middle; }
.wd-table .text-right { text-align: right; }
.wd-table__prod { display: flex; align-items: center; gap: 12px; }
.wd-table__prod img { width: 46px; height: 46px; object-fit: contain; border-radius: 6px; }
.wd-table__code { color: var(--wd-muted); font-size: 12px; }
.wd-table__extra { color: var(--wd-muted); font-size: 13px; margin-top: 2px; }
.wd-table tfoot td { border-bottom: none; padding-top: 14px; }
.wd-total-label { text-align: right; color: var(--wd-muted); }
.wd-total-value { text-align: right; font-weight: 700; }
.wd-total-value--big { font-size: 20px; color: var(--wd-primary); }

/* ---------------- Detail list (order info) ---------------- */
.wd-dl { display: flex; flex-wrap: wrap; gap: 24px 48px; }
.wd-dl__item .wd-dl__label { color: var(--wd-muted); font-size: 13px; margin-bottom: 2px; }
.wd-dl__item .wd-dl__val { font-weight: 600; }
.wd-dl__val--accent { color: var(--wd-primary); }

/* ---------------- Checklist ---------------- */
.wd-checklist { list-style: none; padding: 0; margin: 0; }
.wd-checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; color: var(--wd-text); }
.wd-checklist li i { color: var(--wd-green); margin-top: 3px; }
.wd-link { color: var(--wd-primary); text-decoration: none; }
.wd-link:hover { text-decoration: underline; }

/* ---------------- Custom FA checkboxes ---------------- */
.wd-checkbox {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    cursor: pointer;
    vertical-align: middle;
}
.wd-checkbox input[type="checkbox"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    z-index: 2;
    cursor: pointer;
}
.wd-checkbox::before,
.wd-agree__row label::before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--wd-border-med, var(--wd-border));
    border-radius: 2px;
    background: #fff;
    box-sizing: border-box;
    font-family: FontAwesome;
    font-weight: normal;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    color: #fff;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.wd-checkbox:has(input:checked)::before,
.wd-agree__row input[type="checkbox"]:checked + label::before {
    content: "\f00c";
    background-color: var(--wd-green);
    border-color: var(--wd-green);
}
.wd-checkbox:has(input:focus)::before,
.wd-agree__row input[type="checkbox"]:focus + label::before {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

/* ---------------- Agreement checkboxes ---------------- */
.wd-agree {
    background: var(--wd-bg-soft);
    border: 2px solid var(--wd-border);
    border-radius: var(--wd-radius);
    padding: 16px 20px;
    margin: 22px 0;
}
.wd-agree__row { position: relative; padding: 6px 0; }
.wd-agree__row input[type="checkbox"] {
    position: absolute;
    left: 0;
    top: 9px;
    width: 20px;
    height: 20px;
    margin: 0;
    opacity: 0;
    z-index: 2;
    cursor: pointer;
}
.wd-agree__row label {
    margin: 0;
    font-weight: 500;
    line-height: 1.6;
    cursor: pointer;
    display: block;
    padding-left: 32px;
    position: relative;
}
.wd-agree__row label::before {
    position: absolute;
    left: 0;
    top: 1px;
}

/* ---------------- Action bar ---------------- */
.wd-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 26px;
}
.wd-actions__spacer { flex: 1; }
.wd-actions__summary { color: var(--wd-muted); font-size: 14px; text-align: center; }
.wd-actions__summary strong { color: var(--wd-text); }
.wd-actions__summary .wd-actions__amount { color: var(--wd-primary); font-weight: 700; font-size: 16px; }

/* ---------------- Success ---------------- */
.wd-success-icon {
    width: 76px; height: 76px; line-height: 76px; text-align: center;
    border-radius: 50%; background: #dcfce7; color: var(--wd-green); font-size: 36px;
    margin: 0 auto 18px;
}
.wd-success-icon i { font-size: 32px; line-height: 76px; }

.wd-dl--success {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px 32px;
    margin: 24px 0;
}
.wd-dl--success .wd-dl__item {
    flex: 1 1 140px;
    max-width: 220px;
    text-align: center;
}
.wd-pdf-card {
    text-align: center;
    padding: 32px 24px;
    margin-bottom: 18px;
}
.wd-pdf-card__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #dcfce7;
    color: var(--wd-green);
    display: flex;
    align-items: center;
    justify-content: center;
}
.wd-pdf-card__icon > i {
    font-size: 32px;
}
.wd-pdf-card__link {
    color: var(--wd-primary);
    font-weight: 600;
    text-decoration: none;
}
.wd-pdf-card__link:hover,
.wd-pdf-card__link:focus {
    color: var(--wd-primary-dark);
    text-decoration: underline;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 767px) {
    .wd-title { font-size: 22px; }
    .wd-step__label { font-size: 11px; }
    .wd-prow { gap: 12px; }
    .wd-prow__col--grow { flex-basis: 100%; }
    .wd-refundbox { flex-wrap: wrap; }
    .wd-refundbox__note { margin-left: 0; text-align: left; max-width: none; }
    .wd-actions { flex-wrap: wrap; }
    .wd-actions__summary { order: -1; flex-basis: 100%; }
}
