/* ==========================================================================
   چابک - قالب مدرن فرم رهگیری سفارشات
   این فایل فقط زمانی بارگذاری می شود که قالب مدرن در تنظیمات استایل
   انتخاب شده باشد و روی قالب کلاسیک اثری ندارد.
   ========================================================================== */

.wc-timeline-container.wott-skin-modern,
.wc-timeline.wott-skin-modern {
    --wott-ink: #16202b;
    --wott-ink-soft: #6a7682;
    --wott-line: #e4e8ec;
    --wott-paper: #ffffff;
    --wott-wash: #f6f8f9;
    --wott-radius: 18px;
    --wott-shadow: 0 10px 30px rgba(22, 32, 43, .07);
}

/* ---------- کادر جستجو ---------- */

.wc-timeline-container.wott-skin-modern .wc-search-wrapper {
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    max-width: 760px;
    margin: 0 auto;
    padding: 34px 26px 28px;
    border: 1px solid var(--wott-line);
    border-radius: var(--wott-radius);
    background: var(--wott-paper);
    box-shadow: var(--wott-shadow);
    text-align: center;
}

.wc-timeline-container.wott-skin-modern .wc-search-wrapper::before {
    content: "";
    position: absolute;
    inset-inline-start: 50%;
    top: -160px;
    width: 420px;
    height: 300px;
    transform: translateX(-50%);
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(var(--wott-brand-rgb), .17) 0%, transparent 68%);
}

.wc-timeline-container.wott-skin-modern .wc-search-icon {
    position: relative;
    width: 78px;
    height: 78px;
    margin: 0 auto 10px;
}

/* سوییچ انتخاب روش جستجو */
.wc-timeline-container.wott-skin-modern .wc-search-tabs {
    position: relative;
    display: inline-flex;
    gap: 4px;
    margin: 4px auto 18px;
    padding: 4px;
    border: 1px solid var(--wott-line);
    border-radius: 999px;
    background: var(--wott-wash);
}

.wc-timeline-container.wott-skin-modern .wc-search-tab {
    box-sizing: border-box;
    padding: 9px 22px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--wott-ink-soft);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    cursor: pointer;
    transition: background .22s ease, color .22s ease, box-shadow .22s ease;
}

.wc-timeline-container.wott-skin-modern .wc-search-tab:hover {
    color: var(--wott-ink);
}

.wc-timeline-container.wott-skin-modern .wc-search-tab.active {
    background: var(--wott-paper);
    color: var(--wott-brand-dark, var(--wott-brand));
    box-shadow: 0 2px 7px rgba(22, 32, 43, .1);
}

/* فرم */
.wc-timeline-container.wott-skin-modern .wc-search-form {
    position: relative;
    display: flex;
    gap: 10px;
    align-items: stretch;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 520px;
    margin: 0 auto;
}

.wc-timeline-container.wott-skin-modern .wc-search-input {
    flex: 1 1 240px;
    box-sizing: border-box;
    min-width: 0;
    height: 52px;
    padding: 0 18px;
    border: 1.5px solid var(--wott-line);
    border-radius: 14px;
    background: var(--wott-paper);
    color: var(--wott-ink);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .4px;
    text-align: center;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.wc-timeline-container.wott-skin-modern .wc-search-input::placeholder {
    color: #aeb6bd;
    font-weight: 500;
    letter-spacing: 0;
}

.wc-timeline-container.wott-skin-modern .wc-search-input:focus {
    outline: 0;
    border-color: var(--wott-brand);
    box-shadow: 0 0 0 4px rgba(var(--wott-brand-rgb), .16);
}

.wc-timeline-container.wott-skin-modern .wc-search-button {
    flex: 0 0 auto;
    height: 52px;
    padding: 0 34px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--wott-brand-soft, var(--wott-brand)), var(--wott-brand) 55%, var(--wott-brand-dark, var(--wott-brand)));
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 7px 18px rgba(var(--wott-brand-rgb), .30);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.wc-timeline-container.wott-skin-modern .wc-search-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 10px 22px rgba(var(--wott-brand-rgb), .36);
}

.wc-timeline-container.wott-skin-modern .wc-search-button:active {
    transform: translateY(0);
}

.wc-timeline-container.wott-skin-modern .g-recaptcha {
    flex: 1 1 100%;
    margin: 4px 0 0;
}

/* ---------- کارت نتیجه ---------- */

.wc-timeline.wott-skin-modern {
    box-sizing: border-box;
    max-width: 760px;
    margin: 22px auto;
    padding: 0;
    border: 1px solid var(--wott-line);
    border-radius: var(--wott-radius);
    background: var(--wott-paper);
    box-shadow: var(--wott-shadow);
    overflow: hidden;
}

.wc-timeline.wott-skin-modern .wc-timeline-header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    margin: 0;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--wott-line);
    background: linear-gradient(180deg, rgba(var(--wott-brand-rgb), .05) 0%, #fff 100%);
}

.wc-timeline.wott-skin-modern .wc-timeline-header h3 {
    margin: 0 0 4px;
    color: var(--wott-ink);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.8;
}

.wc-timeline.wott-skin-modern .wc-timeline-header p {
    margin: 2px 0;
    color: var(--wott-ink-soft);
    font-size: 13px;
    line-height: 1.9;
}

.wc-timeline.wott-skin-modern .wc-total-price {
    align-self: center;
    padding: 7px 15px;
    border-radius: 11px;
    background: rgba(var(--wott-brand-rgb), .11);
    color: var(--wott-brand-dark, var(--wott-brand)) !important;
    font-size: 15px;
    white-space: nowrap;
}

/* مشخصات گیرنده به صورت تراشه ای */
.wc-timeline.wott-skin-modern .wc-address-details {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 11px;
}

.wc-timeline.wott-skin-modern .wc-address-item {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 5px 12px;
    border: 1px solid var(--wott-line);
    border-radius: 999px;
    background: var(--wott-wash);
    color: #45515d;
    font-size: 12.5px;
    line-height: 1.9;
}

.wc-timeline.wott-skin-modern .wc-address-icon {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    color: var(--wott-brand);
}

/* ---------- تایم لاین افقی ---------- */

.wc-timeline.wott-skin-modern .wc-timeline-steps {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin: 0;
    padding: 30px 26px 24px;
}

.wc-timeline.wott-skin-modern .wc-timeline-line {
    display: none;
}

.wc-timeline.wott-skin-modern .wc-step {
    position: relative;
    z-index: auto;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    min-width: 0;
    text-align: center;
}

/* قطعه خط بین دو گام؛ از لبه دایره قبلی تا لبه دایره فعلی کشیده می شود و هرگز از روی دایره عبور نمی کند */
.wc-timeline.wott-skin-modern .wc-step::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: 20.5px;
    inset-inline-start: calc(-50% + 27px);
    width: calc(100% - 54px);
    height: 3px;
    border-radius: 3px;
    background: var(--wott-line);
}

/* خط اتصال برای نخستین گام لازم نیست */
.wc-timeline.wott-skin-modern .wc-step:first-child::after,
.wc-timeline.wott-skin-modern .wc-timeline-line + .wc-step::after {
    display: none;
}

.wc-timeline.wott-skin-modern .wc-step.completed::after,
.wc-timeline.wott-skin-modern .wc-step.active::after {
    background: linear-gradient(to left, var(--wott-brand-soft, var(--wott-brand)), var(--wott-brand));
}

.wc-timeline.wott-skin-modern .wc-step-icon {
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    border: 2px solid var(--wott-line);
    border-radius: 50%;
    background: var(--wott-paper);
    color: #b8c0c7;
    transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}

.wc-timeline.wott-skin-modern .wc-step-icon svg {
    width: 21px;
    height: 21px;
    color: inherit !important;
}

.wc-timeline.wott-skin-modern .wc-step.completed .wc-step-icon {
    border-color: var(--wott-brand);
    background: var(--wott-brand);
    color: #fff;
}

.wc-timeline.wott-skin-modern .wc-step.completed .wc-step-icon svg {
    color: #fff !important;
}

.wc-timeline.wott-skin-modern .wc-step.active .wc-step-icon {
    border-color: var(--wott-brand);
    background: var(--wott-paper);
    color: var(--wott-brand);
    box-shadow: 0 0 0 6px rgba(var(--wott-brand-rgb), .15);
}

.wc-timeline.wott-skin-modern .wc-step.active .wc-step-icon svg {
    color: var(--wott-brand) !important;
}

.wc-timeline.wott-skin-modern .wc-step-label {
    position: relative;
    z-index: 2;
    margin: 0;
    color: #9aa3ab;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.8;
}

.wc-timeline.wott-skin-modern .wc-step.completed .wc-step-label,
.wc-timeline.wott-skin-modern .wc-step.active .wc-step-label {
    color: var(--wott-ink);
}

.wc-timeline.wott-skin-modern .wc-step.active .wc-step-label {
    color: var(--wott-brand-dark, var(--wott-brand));
    font-weight: 800;
}

/* ---------- بدنه جزئیات ---------- */

.wc-timeline.wott-skin-modern .wc-order-details {
    margin: 0;
    padding: 4px 22px 22px;
    border: 0;
    background: transparent;
}

.wc-timeline.wott-skin-modern .wc-status-custom-message {
    margin: 0 0 16px;
    padding: 13px 16px;
    border: 0;
    border-inline-start: 4px solid var(--wott-brand);
    border-radius: 12px;
    background: rgba(var(--wott-brand-rgb), .08);
    color: #35424e;
    font-size: 13.5px;
    line-height: 2.1;
}

/* کادر کد رهگیری */
.wc-timeline.wott-skin-modern .wc-tracking-number {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin: 0 0 12px;
    padding: 14px 16px;
    border: 1.5px dashed #cdd3d9;
    border-radius: 14px;
    background: rgba(var(--wott-brand-rgb), .06);
    color: var(--wott-ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 2;
}

.wc-timeline.wott-skin-modern .wc-tracking-button {
    box-sizing: border-box;
    display: flex;
    width: fit-content !important;
    min-width: 200px;
    max-width: 100%;
    margin: 0 auto 14px !important;
    justify-content: center;
    text-align: center;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: 0;
    border-radius: 11px;
    background: var(--wott-brand);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: filter .18s ease, transform .18s ease;
}

.wc-timeline.wott-skin-modern .wc-tracking-button:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
    color: #fff;
}

.wc-timeline.wott-skin-modern .wc-tracking-attachment {
    border-radius: 12px;
}

/* هزینه ارسال */
.wc-timeline.wott-skin-modern .wc-shipping-cost {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 12px;
    padding: 11px 15px;
    border: 1px solid var(--wott-line);
    border-radius: 12px;
    background: var(--wott-wash);
    font-size: 13.5px;
    line-height: 2;
}

/* اقلام سفارش */
.wc-timeline.wott-skin-modern .wc-order-items {
    margin: 0;
    padding: 0;
    border: 1px solid var(--wott-line);
    border-radius: 14px;
    background: var(--wott-paper);
    overflow: hidden;
}

.wc-timeline.wott-skin-modern .wc-order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 12px 15px;
    border: 0;
    border-bottom: 1px solid var(--wott-line);
    background: transparent;
}

.wc-timeline.wott-skin-modern .wc-order-item:last-child {
    border-bottom: 0;
}

.wc-timeline.wott-skin-modern .wc-order-item:nth-child(even) {
    background: #fbfcfc;
}

.wc-timeline.wott-skin-modern .wc-order-item-name {
    color: var(--wott-ink);
    font-size: 13.5px;
    font-weight: 600;
}

.wc-timeline.wott-skin-modern .wc-order-item-qty {
    display: inline-block !important;
    width: auto !important;
    margin-top: 4px;
    padding: 1px 10px;
    border-radius: 999px;
    background: var(--wott-wash);
    color: var(--wott-ink-soft);
    font-size: 11.5px;
    font-weight: 600;
}

.wc-timeline.wott-skin-modern .wc-order-item-price {
    color: var(--wott-ink);
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
}

/* ---------- واکنش گرا ---------- */

@media (max-width: 782px) {
    .wc-timeline-container.wott-skin-modern .wc-search-wrapper {
        padding: 26px 16px 22px;
        border-radius: 16px;
    }

    .wc-timeline-container.wott-skin-modern .wc-search-tabs {
        display: flex;
        flex-direction: row;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
    }

    .wc-timeline-container.wott-skin-modern .wc-search-tab {
        flex: 1 1 0;
        min-width: 0;
        padding: 9px 8px;
        font-size: 13px;
        text-align: center;
    }

    .wc-timeline-container.wott-skin-modern .wc-search-form {
        max-width: none;
    }

    .wc-timeline-container.wott-skin-modern .wc-search-input,
    .wc-timeline-container.wott-skin-modern .wc-search-button {
        flex: 1 1 100%;
    }

    .wc-timeline.wott-skin-modern .wc-timeline-header {
        flex-direction: column;
        align-items: center;
        padding: 17px 16px 14px;
        text-align: center;
    }

    .wc-timeline.wott-skin-modern .wc-timeline-header > div {
        width: 100%;
    }

    .wc-timeline.wott-skin-modern .wc-address-details {
        justify-content: center;
    }

    .wc-timeline.wott-skin-modern .wc-total-price {
        align-self: center;
    }

    /* تایم لاین در موبایل عمودی می شود */
    .wc-timeline.wott-skin-modern .wc-timeline-steps {
        flex-direction: column;
        align-items: stretch;
        padding: 20px 18px 16px;
    }

    .wc-timeline.wott-skin-modern .wc-step {
        flex-direction: row;
        align-items: flex-start;
        gap: 13px;
        padding-bottom: 22px;
        text-align: start;
    }

    .wc-timeline.wott-skin-modern .wc-step-label {
        display: flex;
        align-items: center;
        min-height: 42px;
    }

    .wc-timeline.wott-skin-modern .wc-step:last-child {
        padding-bottom: 0;
    }

    /* در موبایل خط از زیر دایره هر گام تا بالای دایره گام بعد کشیده می شود */
    .wc-timeline.wott-skin-modern .wc-step::after {
        top: 46px;
        bottom: 4px;
        inset-inline-start: 19.5px;
        width: 3px;
        height: auto;
    }

    .wc-timeline.wott-skin-modern .wc-step.active::after {
        background: var(--wott-line);
    }

    .wc-timeline.wott-skin-modern .wc-step:first-child::after,
    .wc-timeline.wott-skin-modern .wc-timeline-line + .wc-step::after {
        display: block;
    }

    .wc-timeline.wott-skin-modern .wc-step:last-child::after {
        display: none;
    }

    .wc-timeline.wott-skin-modern .wc-step-icon {
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
    }

    .wc-timeline.wott-skin-modern .wc-order-details {
        padding: 4px 16px 18px;
    }

    .wc-timeline.wott-skin-modern .wc-tracking-number {
        justify-content: center;
        text-align: center;
    }
}

/* احترام به تنظیم غیرفعال سازی انیمیشن و ترجیح سیستم کاربر */
@media (prefers-reduced-motion: reduce) {
    .wc-timeline-container.wott-skin-modern *,
    .wc-timeline.wott-skin-modern * {
        transition: none !important;
        animation: none !important;
    }
}
