/* Order tracking — search + results */

.storefront-page.storefront-page--order-tracking > .order-tracking-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 0 28px;
}

.storefront-page .order-tracking-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 0 28px;
}

.storefront-page .order-tracking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    width: 100%;
}

@media screen and (min-width: 1024px) {
    .storefront-page.storefront-page--order-tracking .order-tracking-layout--has-result {
        grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
        align-items: start;
    }
}

/* Search card */
.storefront-page .ot-search-card {
    background: #fff;
    border: 1px solid #D8DEE6;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 8px 24px rgba(15, 23, 42, 0.06);
    margin-bottom: 20px;
}

.storefront-page .ot-search-card::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, #434C83 0%, #5B66A8 55%, #CE1D89 100%);
}

.storefront-page .ot-search-card__header {
    padding: 18px 20px 0;
    text-align: right;
}

.storefront-page .ot-search-card__title {
    margin: 0 0 6px;
    font-family: yekanB, sans-serif;
    font-size: 17px;
    line-height: 1.45;
    color: #1A202C;
}

.storefront-page .ot-search-card__hint {
    margin: 0;
    font-family: yekanR, sans-serif;
    font-size: 13px;
    line-height: 1.65;
    color: #718096;
}

.storefront-page .ot-search-form {
    padding: 16px 20px 20px;
}

.storefront-page .ot-search-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    margin-bottom: 14px;
}

.storefront-page .ot-field {
    min-width: 0;
}

.storefront-page .ot-field__label {
    display: block;
    margin: 0 0 6px;
    font-family: yekanM, sans-serif;
    font-size: 12px;
    line-height: 1.4;
    color: #4A5568;
}

.storefront-page .ot-field__input {
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background: #F8FAFC;
    font-family: yekanM, sans-serif;
    font-size: 14px;
    color: #1A202C;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.storefront-page .ot-field__input:focus {
    outline: none;
    border-color: #434C83;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(67, 76, 131, 0.12);
}

.storefront-page .ot-field__input.is-invalid {
    border-color: #E53E3E;
    background: #FFF5F5;
}

.storefront-page .ot-field__error {
    display: block;
    margin-top: 4px;
    font-family: yekanR, sans-serif;
    font-size: 11px;
    color: #E53E3E;
}

.storefront-page .ot-field span.inputStatus.empty {
    display: block;
    margin: 4px 0 0 !important;
    font-size: 12px;
    line-height: 1.5;
    text-align: right;
    direction: rtl;
    unicode-bidi: plaintext;
    word-break: break-word;
}

.storefront-page .ot-search-form__submit {
    width: 100%;
    min-height: 46px;
    margin: 0;
    border-radius: 10px;
    font-family: yekanM, sans-serif;
    font-size: 15px;
    box-shadow: 0 4px 14px rgba(67, 76, 131, 0.22);
}

.storefront-page .ot-search-form__submit:disabled {
    opacity: 0.75;
    cursor: wait;
}

.storefront-page .ot-alert {
    margin: 0 20px 14px;
    padding: 11px 13px;
    border-radius: 10px;
    font-family: yekanR, sans-serif;
    font-size: 13px;
    line-height: 1.55;
}

.storefront-page .ot-alert--error {
    background: #FFF5F5;
    color: #C53030;
    border: 1px solid #FEB2B2;
}

.storefront-page .tracking-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Results */
.storefront-page .ot-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.storefront-page .ot-results__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    padding: 2px 2px 4px;
}

.storefront-page .ot-results__badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    border-radius: 6px;
    background: #EEF0F8;
    border: 1px solid rgba(67, 76, 131, 0.14);
    font-family: yekanM, sans-serif;
    font-size: 13px;
    color: #434C83;
}

.storefront-page .ot-results__phone {
    margin: 0;
    font-family: yekanR, sans-serif;
    font-size: 12px;
    color: #718096;
}

/* Order card */
.storefront-page .ot-order-card {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.storefront-page .ot-order-card--highlight {
    border-color: #434C83;
    box-shadow:
        0 0 0 1px rgba(67, 76, 131, 0.12),
        0 8px 20px rgba(67, 76, 131, 0.1);
}

.storefront-page .ot-order-card__summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 14px;
    align-items: center;
    width: 100%;
    padding: 14px 16px;
    border: none;
    background: linear-gradient(180deg, #FAFBFC 0%, #fff 100%);
    cursor: pointer;
    text-align: right;
    font: inherit;
    color: inherit;
}

.storefront-page .ot-order-card__summary:hover {
    background: linear-gradient(180deg, #F4F6FA 0%, #FAFBFC 100%);
}

.storefront-page .ot-order-card__summary[aria-expanded="true"] {
    border-bottom: 1px dashed #E2E8F0;
}

.storefront-page .ot-order-card__identity {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    min-width: 0;
}

.storefront-page .ot-order-card__id {
    font-family: yekanB, sans-serif;
    font-size: 15px;
    color: #1A202C;
    direction: ltr;
    unicode-bidi: plaintext;
}

.storefront-page .ot-order-card__status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 10px;
    border-radius: 6px;
    font-family: yekanM, sans-serif;
    font-size: 11px;
    line-height: 1.35;
    white-space: nowrap;
}

.storefront-page .ot-order-card__status--pending {
    background: #EDF2F7;
    color: #4A5568;
}

.storefront-page .ot-order-card__status--processing {
    background: #EBF8FF;
    color: #2B6CB0;
}

.storefront-page .ot-order-card__status--delivered {
    background: #F0FFF4;
    color: #276749;
}

.storefront-page .ot-order-card__status--cancelled {
    background: #FFF5F5;
    color: #C53030;
}

.storefront-page .ot-order-card__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
    grid-column: 1 / -1;
}

.storefront-page .ot-order-card__meta-item {
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #EDF2F7;
    border-radius: 8px;
    background: #fff;
}

.storefront-page .ot-order-card__meta-label {
    display: block;
    margin-bottom: 3px;
    font-family: yekanR, sans-serif;
    font-size: 10px;
    color: #718096;
}

.storefront-page .ot-order-card__meta-value {
    display: block;
    font-family: yekanM, sans-serif;
    font-size: 12px;
    line-height: 1.45;
    color: #2D3748;
    word-break: break-word;
}

.storefront-page .ot-order-card__chevron {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    background: #fff;
    position: relative;
    transition: transform 0.2s, background 0.15s;
}

.storefront-page .ot-order-card__chevron::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #718096;
    border-bottom: 2px solid #718096;
    transform: translate(-50%, -65%) rotate(45deg);
    transition: border-color 0.15s;
}

.storefront-page .ot-order-card__summary[aria-expanded="true"] .ot-order-card__chevron {
    transform: rotate(180deg);
    background: #EEF0F8;
    border-color: rgba(67, 76, 131, 0.2);
}

.storefront-page .ot-order-card__summary[aria-expanded="true"] .ot-order-card__chevron::before {
    border-color: #434C83;
}

.storefront-page .ot-order-card__detail {
    padding: 14px 16px 16px;
    background: #fff;
}

.storefront-page .ot-order-card__shipping {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #F8FAFC;
    border: 1px solid #EDF2F7;
    font-family: yekanR, sans-serif;
    font-size: 12px;
    color: #4A5568;
}

.storefront-page .ot-order-card__shipping-label {
    font-family: yekanM, sans-serif;
    color: #434C83;
}

.storefront-page .ot-order-card__shipping-name {
    font-family: yekanM, sans-serif;
    color: #1A202C;
}

.storefront-page .ot-order-card__shipping-cost {
    font-family: yekanM, sans-serif;
    color: #2D3748;
}

/* Items table — reuse invoice table patterns */
.storefront-page .ot-items-table {
    --invoice-col-qty: 44px;
    --invoice-col-unit: 84px;
    --invoice-col-total: 84px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.storefront-page .ot-items-table__head,
.storefront-page .ot-items-table .checkout-order-line {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        var(--invoice-col-qty)
        var(--invoice-col-unit)
        var(--invoice-col-total);
    align-items: start;
    gap: 8px;
}

.storefront-page .ot-items-table__head {
    padding: 9px 12px;
    background: #F1F5F9;
    border-bottom: 1px solid #E2E8F0;
    font-family: yekanM, sans-serif;
    font-size: 11px;
    line-height: 1.4;
    color: #64748B;
}

.storefront-page .ot-items-table__head .checkout-invoice-table__col--qty {
    text-align: center;
}

.storefront-page .ot-items-table__head .checkout-invoice-table__col--unit,
.storefront-page .ot-items-table__head .checkout-invoice-table__col--total {
    text-align: left;
    direction: rtl;
}

.storefront-page .ot-items-table__body .checkout-order-line {
    padding: 11px 12px;
    margin: 0;
    border-bottom: 1px solid #EDF2F7;
    background: #fff;
}

.storefront-page .ot-items-table__body .checkout-order-line:last-child {
    border-bottom: none;
}

.storefront-page .ot-items-table__body .checkout-order-line:nth-child(even) {
    background: #FCFDFE;
}

@media screen and (max-width: 768px) {
    .storefront-page .ot-search-form__grid {
        grid-template-columns: 1fr;
    }

    .storefront-page .ot-order-card__meta {
        grid-template-columns: 1fr 1fr;
    }

    .storefront-page .ot-order-card__meta-item:last-child {
        grid-column: 1 / -1;
    }

    .storefront-page .ot-items-table__head {
        display: none;
    }

    .storefront-page .ot-items-table .checkout-order-line {
        display: block;
        padding: 12px;
        border-bottom: 1px solid #E2E8F0;
    }

    .storefront-page .ot-items-table .checkout-order-line:last-child {
        border-bottom: none;
    }

    .storefront-page .ot-items-table .checkout-order-line__name {
        margin-bottom: 8px;
        padding-bottom: 8px;
        border-bottom: 1px dashed #EDF2F7;
    }

    .storefront-page .ot-items-table .checkout-order-line__qty,
    .storefront-page .ot-items-table .checkout-order-line__unit,
    .storefront-page .ot-items-table .checkout-order-line__total {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 4px 0;
    }

    .storefront-page .ot-items-table .checkout-order-line__qty::before,
    .storefront-page .ot-items-table .checkout-order-line__unit::before,
    .storefront-page .ot-items-table .checkout-order-line__total::before {
        content: attr(data-label);
        font-family: yekanR, sans-serif;
        font-size: 11px;
        color: #718096;
        flex-shrink: 0;
    }
}

@media screen and (max-width: 480px) {
    .storefront-page .ot-search-card__header,
    .storefront-page .ot-search-form {
        padding-left: 14px;
        padding-right: 14px;
    }

    .storefront-page .ot-order-card__summary {
        padding: 12px;
    }

    .storefront-page .ot-order-card__meta {
        grid-template-columns: 1fr;
    }

    .storefront-page .ot-order-card__meta-item:last-child {
        grid-column: auto;
    }
}
