.orders-mobile-shell {
    padding-top: var(--mobile-shell-top-gap);
    padding-bottom: 18px;
}

.orders-mobile-head,
.orders-status-tabs,
.orders-list {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.orders-mobile-head {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    min-height: 48px;
    padding: 0;
    border-radius: 0;
    border-color: transparent;
    background: transparent;
}

.orders-mobile-head a {
    display: grid;
    min-width: 44px;
    min-height: 44px;
    justify-self: start;
    color: #6f6f6f;
    place-items: center;
}

.orders-mobile-head h1 {
    margin: 0;
    font-size: 18px;
    text-align: center;
}

.orders-status-tabs {
    overflow-x: auto;
    display: flex;
    gap: 6px;
    min-height: 48px;
    padding: 6px;
    border-radius: 8px;
    border-color: transparent;
    background: transparent;
    scrollbar-width: none;
}

.orders-status-tabs::-webkit-scrollbar {
    display: none;
}

.orders-status-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 11px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.orders-status-tabs a.is-active {
    color: #242424;
    border-color: rgba(141, 45, 40, 0.18);
    background: transparent;
}

/* Migrated order card styles */
.orders-list {
    display: grid;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
}

.orders-card {
    display: grid;
    gap: 9px;
    padding: 11px 12px 12px;
    border: 1px solid rgba(36, 36, 36, 0.06);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}

.orders-card-head,
.orders-card-state,
.orders-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.orders-card-head span {
    min-width: 0;
    overflow: hidden;
    color: rgba(36, 36, 36, 0.48);
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.orders-card-head strong {
    flex: 0 0 auto;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.35;
    color: #6f6f6f;
    background: #f5f5f5;
}

.orders-card-head strong.is-paid,
.orders-card-head strong.is-shipped {
    color: #1e6b48;
    background: #eef8f1;
}

.orders-card-head strong.is-done {
    color: #6a4a13;
    background: #fff7da;
}

.orders-card-head strong.is-cancelled {
    color: #777;
    background: #f4f1ec;
}

.orders-card-head strong.is-refund {
    color: #9c2f2b;
    background: #fff2f0;
}

.orders-card-product {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) minmax(70px, auto);
    align-items: start;
    gap: 11px;
}

.orders-card-cover {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 8px;
    color: #f06a22;
    background: #f6f6f6;
    font-weight: 900;
}

.orders-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.orders-card-info h2 {
    margin: 0;
    color: #242424;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.orders-card-info p {
    margin: 4px 0 0;
    color: rgba(36, 36, 36, 0.52);
    font-size: 12px;
    line-height: 1.35;
    word-break: break-word;
}

.orders-card-note {
    display: -webkit-box;
    overflow: hidden;
    color: rgba(36, 36, 36, 0.58) !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.orders-card-side {
    display: grid;
    justify-items: end;
    gap: 4px;
    min-width: 76px;
    padding-top: 1px;
    text-align: right;
}

.orders-card-side span {
    color: rgba(36, 36, 36, 0.48);
    font-size: 12px;
    line-height: 1.2;
}

.orders-card-side strong {
    color: #f06a22;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
}

.orders-card-state {
    min-height: 28px;
    padding: 6px 8px;
    border-radius: 8px;
    color: rgba(36, 36, 36, 0.6);
    background: #f7f7f7;
    font-size: 12px;
    line-height: 1.35;
}

.orders-card-state span,
.orders-card-state em {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.orders-card-state span {
    color: #242424;
    font-weight: 600;
}

.orders-card-state em {
    color: rgba(36, 36, 36, 0.48);
    font-style: normal;
}

.orders-card-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.orders-card-actions button {
    min-width: 86px;
    min-height: 38px;
    border: 0;
    border-radius: 999px;
    padding: 0 12px;
    color: #fff;
    background: #242424;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.orders-card-actions button.ghost {
    color: #4f4f4f;
    background: #f4f4f4;
}

.orders-card-actions button.order-pay-button {
    border-color: transparent;
    color: #fff;
    background: #f06a22;
}

.orders-card-actions button.danger,
.member-order-actions button.danger {
    color: #9c2f2b;
    border-color: #e5b9b2;
    background: #fffafa;
}

.orders-card-actions button:disabled {
    opacity: 0.62;
    cursor: not-allowed;
}

@media (max-width: 390px) {
    .orders-card-product {
        grid-template-columns: 54px minmax(0, 1fr) minmax(56px, auto);
        gap: 8px;
    }

    .orders-card-cover {
        width: 54px;
        height: 54px;
    }

    .orders-card-side {
        min-width: 58px;
    }

    .orders-card-side strong {
        font-size: 15px;
    }

    .orders-card-state {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .orders-card-actions button {
        min-width: 78px;
        padding: 0 10px;
    }
}

.orders-mobile-shell {
    width: var(--mobile-shell-width);
    max-width: var(--mobile-shell-width);
    margin-right: auto;
    margin-left: auto;
    padding-right: 0;
    padding-left: 0;
}

.orders-mobile-page .site-bottom-nav {
    width: 100%;
    max-width: 100%;
    right: 0;
    left: 0;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 720px) {
    .orders-mobile-page .site-bottom-nav {
        width: var(--mobile-shell-width);
        max-width: var(--mobile-shell-width);
    }
}

/* Current order-status page cleanup. */
.orders-mobile-head,
.orders-status-tabs {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.orders-mobile-head {
    padding-right: 0;
    padding-left: 0;
}

.orders-status-tabs {
    padding-right: 0;
    padding-left: 0;
}

.orders-status-tabs a {
    border-color: transparent;
    background: transparent;
}

.orders-status-tabs a.is-active {
    border-color: transparent;
    color: #242424;
    background: transparent;
}

.orders-toast {
    position: fixed;
    right: 50%;
    bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 18px);
    z-index: 120;
    max-width: min(292px, calc(100% - 32px));
    padding: 10px 13px;
    border-radius: 8px;
    color: #fff;
    background: rgba(42, 33, 27, 0.9);
    font-size: 13px;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    transform: translate(50%, 8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.orders-toast.is-visible {
    opacity: 1;
    transform: translate(50%, 0);
}

.orders-dialog-layer {
    position: fixed;
    inset: 0;
    z-index: 130;
    display: grid;
    align-items: end;
    justify-items: center;
    padding: 16px 8px calc(env(safe-area-inset-bottom) + 16px);
    background: rgba(31, 23, 18, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.orders-dialog-layer.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.orders-dialog {
    display: grid;
    gap: 12px;
    width: var(--mobile-shell-width, min(560px, 100%));
    max-width: var(--mobile-shell-width, min(560px, 100%));
    max-height: min(78dvh, 620px);
    overflow: auto;
    padding: 16px;
    border-radius: 12px;
    color: #2a211b;
    background: #fffdfa;
    box-shadow: 0 14px 34px rgba(42, 33, 27, 0.16);
    transform: translateY(12px);
    transition: transform 0.18s ease;
}

.orders-dialog-layer.is-visible .orders-dialog {
    transform: translateY(0);
}

.orders-dialog h2 {
    margin: 0;
    color: #2a211b;
    font-size: 18px;
    line-height: 1.3;
}

.orders-dialog p {
    margin: 0;
    color: #6d5c4d;
    font-size: 14px;
    line-height: 1.6;
}

.orders-dialog-content {
    min-width: 0;
}

.orders-dialog-content[hidden] {
    display: none;
}

.orders-dialog-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.orders-dialog-actions button {
    min-height: 44px;
    border: 1px solid rgba(141, 45, 40, 0.16);
    border-radius: 8px;
    color: #6b5847;
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.orders-dialog-actions button.primary {
    border-color: transparent;
    color: #fff;
    background: #f06a22;
}

.orders-dialog-actions button.primary.danger {
    background: #9c2f2b;
}

.orders-address-list {
    display: grid;
    gap: 8px;
}

.orders-address-option {
    display: grid;
    gap: 5px;
    width: 100%;
    min-height: 58px;
    padding: 10px 12px;
    border: 1px solid rgba(48, 72, 64, 0.1);
    border-radius: 8px;
    color: #2a211b;
    background: transparent;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.orders-address-option strong {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    line-height: 1.35;
}

.orders-address-option strong span {
    color: #6d5c4d;
    font-weight: 700;
}

.orders-address-option em {
    min-height: 20px;
    padding: 0 7px;
    border: 1px solid rgba(141, 45, 40, 0.28);
    border-radius: 999px;
    color: rgba(141, 45, 40, 0.82);
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
    line-height: 18px;
}

.orders-address-option small {
    color: #6d5c4d;
    font-size: 13px;
    line-height: 1.45;
}

.orders-reason-field {
    display: grid;
    gap: 8px;
}

.orders-reason-field span {
    color: #4f4034;
    font-size: 13px;
    font-weight: 800;
}

.orders-reason-field textarea {
    width: 100%;
    min-height: 108px;
    resize: vertical;
    border: 1px solid rgba(48, 72, 64, 0.14);
    border-radius: 8px;
    padding: 10px 12px;
    color: #2a211b;
    background: transparent;
    font: inherit;
    font-size: 14px;
    line-height: 1.55;
    outline: none;
}

.orders-reason-field textarea:focus {
    border-color: rgba(240, 106, 34, 0.5);
}
