/* ==========================================================================
   Woolements – تشکر از خرید و خلاصه سفارش
   تمام انتخابگرها با wlty اختصاصی هستند تا با قالب و ویجت‌های دیگر تداخل نکنند.
   ========================================================================== */
.wlty-order {
    --wlty-primary: #2563eb;
    --wlty-success: #16a34a;
    --wlty-warning: #d97706;
    --wlty-danger: #dc2626;
    --wlty-slate-950: #0f172a;
    --wlty-slate-700: #334155;
    --wlty-slate-500: #64748b;
    --wlty-slate-200: #e2e8f0;
    --wlty-slate-100: #f1f5f9;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px;
    box-sizing: border-box;
    color: var(--wlty-slate-700);
    direction: rtl;
}
.wlty-order *, .wlty-order *::before, .wlty-order *::after { box-sizing: border-box; }
.wlty-order--empty { max-width: 620px; padding: 52px 30px; border: 1px dashed var(--wlty-slate-200); border-radius: 22px; background: #fff; text-align: center; }
.wlty-order--empty h3 { margin: 16px 0 8px; color: var(--wlty-slate-950); font-size: 21px; }
.wlty-order--empty p { margin: 0; color: var(--wlty-slate-500); line-height: 1.9; }
.wlty-empty-icon { display: inline-flex; width: 64px; height: 64px; align-items: center; justify-content: center; border-radius: 20px; background: var(--wlty-slate-100); color: var(--wlty-primary); font-size: 26px; }

.wlty-hero { position: relative; display: flex; align-items: center; gap: 22px; overflow: hidden; min-height: 158px; padding: 32px; border: 1px solid #dbeafe; border-radius: 24px; background: linear-gradient(135deg, #f8fbff 0%, #eff6ff 100%); box-shadow: 0 14px 40px rgba(37, 99, 235, .09); }
.wlty-hero::before { position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--wlty-primary); content: ""; }
.wlty-status--success .wlty-hero { border-color: #bbf7d0; background: linear-gradient(135deg, #f0fdf4 0%, #f8fffc 100%); }
.wlty-status--success .wlty-hero::before { background: var(--wlty-success); }
.wlty-status--pending .wlty-hero { border-color: #fde68a; background: linear-gradient(135deg, #fffbeb 0%, #fffdf7 100%); }
.wlty-status--pending .wlty-hero::before { background: var(--wlty-warning); }
.wlty-status--failed .wlty-hero { border-color: #fecaca; background: linear-gradient(135deg, #fef2f2 0%, #fffafa 100%); }
.wlty-status--failed .wlty-hero::before { background: var(--wlty-danger); }
.wlty-hero-icon { z-index: 1; display: inline-flex; width: 78px; height: 78px; flex: 0 0 78px; align-items: center; justify-content: center; border-radius: 24px; background: var(--wlty-primary); box-shadow: 0 12px 24px rgba(37, 99, 235, .25); color: #fff; font-size: 34px; }
.wlty-hero-icon svg { width: 34px; height: 34px; fill: currentColor; }
.wlty-status--success .wlty-hero-icon { background: var(--wlty-success); box-shadow: 0 12px 24px rgba(22, 163, 74, .24); }
.wlty-status--pending .wlty-hero-icon { background: var(--wlty-warning); box-shadow: 0 12px 24px rgba(217, 119, 6, .24); }
.wlty-status--failed .wlty-hero-icon { background: var(--wlty-danger); box-shadow: 0 12px 24px rgba(220, 38, 38, .22); }
.wlty-hero-content { z-index: 1; }
.wlty-status-badge { display: inline-flex; margin-bottom: 7px; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.75); color: var(--wlty-slate-700); font-size: 11px; font-weight: 800; }
.wlty-hero-title { margin: 0 0 8px; color: var(--wlty-slate-950); font-size: 25px; font-weight: 850; line-height: 1.4; }
.wlty-hero-text { max-width: 680px; margin: 0; color: var(--wlty-slate-500); font-size: 14px; line-height: 1.9; }
.wlty-hero-glow { position: absolute; top: -90px; left: -35px; width: 250px; height: 250px; border-radius: 50%; background: rgba(255,255,255,.75); filter: blur(2px); }

.wlty-timeline { display: flex; align-items: center; justify-content: center; margin: 24px 0; padding: 0 18px; }
.wlty-timeline-step { display: flex; min-width: 90px; flex-direction: column; align-items: center; gap: 7px; color: #94a3b8; font-size: 11px; text-align: center; }
.wlty-timeline-step i, .wlty-timeline-step svg { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border: 2px solid #cbd5e1; border-radius: 50%; background: #fff; }
.wlty-timeline-step svg { padding: 6px; fill: currentColor; }
.wlty-timeline-step.is-done { color: var(--wlty-success); }
.wlty-timeline-step.is-done i, .wlty-timeline-step.is-done svg { border-color: var(--wlty-success); background: var(--wlty-success); color: #fff; fill: #fff; }
.wlty-timeline-step.is-failed { color: var(--wlty-danger); }
.wlty-timeline-step.is-failed i, .wlty-timeline-step.is-failed svg { border-color: var(--wlty-danger); background: var(--wlty-danger); color: #fff; fill: #fff; }
.wlty-timeline-line { width: min(16%, 130px); height: 2px; margin-bottom: 19px; background: #cbd5e1; }
.wlty-timeline-line.is-done { background: var(--wlty-success); }

.wlty-meta-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-top: 24px; margin-bottom: 24px; }
.wlty-meta { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 16px 18px; border: 1px solid var(--wlty-slate-200); border-radius: 16px; background: #fff; box-shadow: 0 5px 15px rgba(15, 23, 42, .035); }
.wlty-meta-icon { display: inline-flex; width: 44px; height: 44px; flex: 0 0 44px; align-items: center; justify-content: center; border-radius: 12px; background: #eff6ff; color: var(--wlty-primary); font-size: 17px; }
.wlty-meta-icon svg { width: 18px; height: 18px; fill: currentColor; }
.wlty-meta-content { min-width: 0; flex: 1; overflow: hidden; }
.wlty-meta-label { display: block; overflow: hidden; color: var(--wlty-slate-500); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.wlty-meta-value { display: block; overflow: hidden; margin-top: 4px; color: var(--wlty-slate-950); font-size: 13.5px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.wlty-meta-total { color: var(--wlty-primary); }

.wlty-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .8fr); gap: 24px; align-items: start; }
.wlty-side-stack { display: grid; gap: 16px; }
.wlty-card { padding: 24px; border: 1px solid var(--wlty-slate-200); border-radius: 20px; background: #fff; box-shadow: 0 8px 26px rgba(15, 23, 42, .045); }
.wlty-card-title { display: flex; align-items: center; gap: 9px; margin: 0 0 19px; padding-bottom: 16px; border-bottom: 1px solid var(--wlty-slate-100); color: var(--wlty-slate-950); font-size: 16px; font-weight: 800; }
.wlty-card-title i { color: var(--wlty-primary); }
.wlty-card-title svg { width: 18px; height: 18px; fill: currentColor; color: var(--wlty-primary); }

/* ردیف اقلام و متغیرها */
.wlty-items { display: grid; gap: 16px; }
.wlty-item { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px dashed var(--wlty-slate-200); }
.wlty-item:last-child { padding-bottom: 0; border-bottom: 0; }
.wlty-item-image, .wlty-item-placeholder { display: inline-flex; width: 64px; height: 64px; flex: 0 0 64px; align-items: center; justify-content: center; overflow: hidden; border-radius: 14px; background: var(--wlty-slate-100); color: var(--wlty-slate-500); font-size: 11px; }
.wlty-item-image img { width: 100%; height: 100%; object-fit: cover; }
.wlty-item-info { min-width: 0; flex: 1; }
.wlty-item-title { display: block; overflow: hidden; color: var(--wlty-slate-950); font-size: 13.5px; font-weight: 750; line-height: 1.6; text-overflow: ellipsis; }
.wlty-item-meta-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.wlty-badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 8px; font-size: 11px; font-weight: 600; line-height: 1.5; background: var(--wlty-slate-100); color: var(--wlty-slate-700); }
.wlty-badge--qty { background: #e0f2fe; color: #0369a1; }
.wlty-badge--var { background: #f8fafc; border: 1px solid #e2e8f0; color: #475569; }
.wlty-item-variations { display: inline-flex; flex-wrap: wrap; gap: 5px; }

/* قیمت واحد، قیمت کل و مبلغ نهایی ردیف محصول */
.wlty-item-prices { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; text-align: left; }
.wlty-price-box { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.wlty-price-label { color: var(--wlty-slate-500); font-size: 11px; }
.wlty-price-amount { color: var(--wlty-slate-700); font-weight: 600; }
.wlty-price-final { color: var(--wlty-primary); font-size: 13px; font-weight: 800; }

/* بخش روش ارسال */
.wlty-shipping-card { background: #fff; }
.wlty-shipping-details { display: grid; gap: 11px; }
.wlty-shipping-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--wlty-slate-100); }
.wlty-shipping-label { display: inline-flex; align-items: center; gap: 7px; color: var(--wlty-slate-700); font-size: 12.5px; font-weight: 600; }
.wlty-shipping-label i { color: var(--wlty-primary); font-size: 14px; }
.wlty-shipping-label svg { width: 14px; height: 14px; fill: currentColor; color: var(--wlty-primary); }
.wlty-shipping-val { color: var(--wlty-slate-950); font-size: 12.5px; font-weight: 700; text-align: left; }
.wlty-shipping-cost { display: inline-flex; padding: 2px 8px; border-radius: 8px; background: #e0f2fe; color: #0284c7; font-weight: 800; }

.wlty-totals { display: grid; gap: 10px; margin-top: 21px; padding-top: 17px; border-top: 1px solid var(--wlty-slate-200); }
.wlty-totals > div { display: flex; justify-content: space-between; gap: 15px; color: var(--wlty-slate-500); font-size: 13px; }
.wlty-totals strong { color: var(--wlty-slate-700); }
.wlty-totals .is-grand-total { margin-top: 3px; padding-top: 14px; border-top: 1px dashed var(--wlty-slate-200); color: var(--wlty-slate-950); font-size: 15px; font-weight: 800; }
.wlty-totals .is-grand-total strong { color: var(--wlty-primary); }

/* بخش اطلاعات دریافت سفارش */
.wlty-address-card { background: #fff; }
.wlty-address-content { display: grid; gap: 12px; }
.wlty-address-box { padding: 14px 16px; border-radius: 14px; background: var(--wlty-slate-100); border: 1px solid transparent; }
.wlty-address-badge { display: inline-flex; margin-bottom: 9px; padding: 3px 9px; border-radius: 6px; background: #e0f2fe; color: #0284c7; font-size: 11px; font-weight: 750; }
.wlty-address-person { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 9px; padding-bottom: 8px; border-bottom: 1px dashed var(--wlty-slate-200); color: var(--wlty-slate-950); font-size: 12.5px; font-weight: 750; }
.wlty-address-person span { display: inline-flex; align-items: center; gap: 6px; }
.wlty-address-person i { color: var(--wlty-primary); font-size: 12.5px; }
.wlty-address-person svg { width: 13px; height: 13px; fill: currentColor; color: var(--wlty-primary); }
.wlty-address-text { margin: 0; color: var(--wlty-slate-500); font-size: 13px; line-height: 2; word-break: break-word; }
.wlty-address-text br { display: block; content: ""; margin-top: 2px; }
.wlty-note-card p { margin: 0; color: var(--wlty-slate-500); font-size: 13px; line-height: 2; }
.wlty-actions { display: grid; gap: 10px; }
.wlty-button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 9px; padding: 10px 17px; border: 1px solid transparent; border-radius: 13px; font-size: 13px; font-weight: 750; text-decoration: none !important; transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease; }
.wlty-button svg { width: 16px; height: 16px; fill: currentColor; }
.wlty-button--reverse { flex-direction: row-reverse; }
.wlty-button:hover { transform: translateY(-2px); }
.wlty-button--primary { background: var(--wlty-primary); box-shadow: 0 8px 18px rgba(37, 99, 235, .2); color: #fff; }
.wlty-button--secondary { border-color: var(--wlty-slate-200); background: #fff; color: var(--wlty-slate-700); }
.wlty-button--ghost { background: var(--wlty-slate-100); color: var(--wlty-slate-700); }
.wlty-order--minimal .wlty-hero, .wlty-order--minimal .wlty-card, .wlty-order--minimal .wlty-meta { border-radius: 12px; box-shadow: none; }
.wlty-order--minimal .wlty-hero { background: #fff; }
.wlty-order--premium .wlty-hero { border: 0; background: linear-gradient(135deg, #172554, #2563eb 55%, #38bdf8); }
.wlty-order--premium .wlty-hero-title, .wlty-order--premium .wlty-hero-text { color: #fff; }
.wlty-order--premium .wlty-status-badge { color: #1e3a8a; }
.wlty-order--premium .wlty-hero-icon { background: rgba(255,255,255,.18); box-shadow: none; }
.wlty-order--premium .wlty-hero::before { background: rgba(255,255,255,.7); }
@media (max-width: 880px) {
    .wlty-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wlty-layout { grid-template-columns: 1fr; }
    .wlty-side-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wlty-actions { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wlty-button--ghost:only-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .wlty-item { flex-direction: column; align-items: flex-start; gap: 10px; }
    .wlty-item-prices { width: 100%; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; padding-top: 8px; border-top: 1px dotted var(--wlty-slate-200); }
    .wlty-shipping-row { flex-direction: column; align-items: flex-start; gap: 6px; }
    .wlty-shipping-val { text-align: right; }
}
@media (max-width: 560px) {
    .wlty-order { padding: 15px; }
    .wlty-hero { min-height: auto; flex-direction: column; padding: 25px 19px; text-align: center; }
    .wlty-hero-icon { width: 64px; height: 64px; flex-basis: 64px; border-radius: 20px; font-size: 28px; }
    .wlty-hero-title { font-size: 20px; }
    .wlty-hero-text { font-size: 13px; }
    .wlty-timeline { margin-inline: -15px; padding: 0; }
    .wlty-timeline-step { min-width: 76px; font-size: 10px; }
    .wlty-timeline-line { width: 9%; }
    .wlty-meta-grid, .wlty-side-stack, .wlty-actions { grid-template-columns: 1fr; }
    .wlty-card { padding: 18px; border-radius: 16px; }
    .wlty-meta { padding: 14px; }
}
