/**
 * 感謝頁 / 訂單檢視模板樣式 (v2.22.1)
 *
 * 設計目標：
 *   - 卡片化 layout，視覺層級清晰
 *   - 語義 HTML (<dl>/<section>) + 明確 focus-visible
 *   - Mobile first + print-friendly
 *   - 無 inline style 於模板，樣式集中於此
 *
 * @package YangSheep\Ecommerce
 */

/* ─── Design tokens（局部作用域） ─── */
.ys-ec-ty {
    --ty-radius: 12px;
    --ty-radius-sm: 8px;
    --ty-gap: 16px;
    --ty-gap-lg: 24px;

    --ty-color-text: #111827;
    --ty-color-muted: #6b7280;
    --ty-color-border: #e5e7eb;
    --ty-color-surface: #ffffff;
    --ty-color-surface-alt: #f9fafb;

    --ty-color-brand: #2563eb;
    --ty-color-brand-soft: #eff6ff;
    --ty-color-success: #10b981;
    --ty-color-success-soft: #ecfdf5;
    --ty-color-warning: #f59e0b;
    --ty-color-warning-soft: #fffbeb;
    --ty-color-danger: #ef4444;
    --ty-color-danger-soft: #fef2f2;

    --ty-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --ty-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);

    max-width: 960px;
    margin: 24px auto;
    padding: 0 16px;
    color: var(--ty-color-text);
    font-feature-settings: 'tnum' 1;
}

/* ─── Hero：訂單狀態頭圖 ─── */
.ys-ec-ty-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 24px;
    background: var(--ty-color-surface);
    border: 1px solid var(--ty-color-border);
    border-radius: var(--ty-radius);
    box-shadow: var(--ty-shadow-sm);
    margin-bottom: var(--ty-gap-lg);
}

.ys-ec-ty-hero__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.ys-ec-ty-hero__icon svg {
    width: 36px;
    height: 36px;
    stroke-width: 2.5;
}

.ys-ec-ty-hero--success .ys-ec-ty-hero__icon {
    background: var(--ty-color-success-soft);
    color: var(--ty-color-success);
}

.ys-ec-ty-hero--pending .ys-ec-ty-hero__icon,
.ys-ec-ty-hero--offline .ys-ec-ty-hero__icon {
    background: var(--ty-color-warning-soft);
    color: var(--ty-color-warning);
}

.ys-ec-ty-hero--failed .ys-ec-ty-hero__icon {
    background: var(--ty-color-danger-soft);
    color: var(--ty-color-danger);
}

.ys-ec-ty-hero__title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
}

.ys-ec-ty-hero__subtitle {
    font-size: 15px;
    color: var(--ty-color-muted);
    margin: 0;
    line-height: 1.6;
    max-width: 560px;
}

.ys-ec-ty-hero__order-no {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 6px 14px;
    background: var(--ty-color-surface-alt);
    border-radius: 999px;
    font-size: 13px;
    color: var(--ty-color-muted);
}

.ys-ec-ty-hero__order-no strong {
    color: var(--ty-color-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.04em;
}

.ys-ec-ty-hero__actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ─── Section 通用卡片 ─── */
.ys-ec-ty-section {
    background: var(--ty-color-surface);
    border: 1px solid var(--ty-color-border);
    border-radius: var(--ty-radius);
    padding: 20px 24px;
    margin-bottom: var(--ty-gap);
    box-shadow: var(--ty-shadow-sm);
}

.ys-ec-ty-section__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ty-color-border);
}

.ys-ec-ty-section__title {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.01em;
    flex: 1;
}

.ys-ec-ty-section__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 999px;
    background: var(--ty-color-brand-soft);
    color: var(--ty-color-brand);
}

/* ─── Definition list：label/value pairs ─── */
.ys-ec-ty-dl {
    display: grid;
    grid-template-columns: minmax(120px, max-content) 1fr;
    gap: 10px 16px;
    margin: 0;
}

.ys-ec-ty-dl dt {
    font-size: 13px;
    color: var(--ty-color-muted);
    font-weight: 500;
    padding-top: 2px;
}

.ys-ec-ty-dl dd {
    margin: 0;
    font-size: 14px;
    word-break: break-word;
}

.ys-ec-ty-dl dd strong {
    font-weight: 600;
}

.ys-ec-ty-dl__row--full {
    grid-column: 1 / -1;
}

.ys-ec-ty-dl__sub {
    display: block;
    font-size: 12px;
    color: var(--ty-color-muted);
    margin-top: 4px;
}

.ys-ec-ty-dl__mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.02em;
}

/* ─── 繳費資訊 Callout (ATM/CVS/Bank Transfer) ─── */
.ys-ec-ty-payment {
    border: 1px solid var(--ty-color-warning);
    background: var(--ty-color-warning-soft);
}

.ys-ec-ty-payment .ys-ec-ty-section__header {
    border-bottom-color: rgba(245, 158, 11, 0.3);
}

.ys-ec-ty-payment__code-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ys-ec-ty-payment__code {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 8px 14px;
    background: var(--ty-color-surface);
    border: 1px solid var(--ty-color-border);
    border-radius: var(--ty-radius-sm);
    color: var(--ty-color-text);
}

.ys-ec-ty-payment__deadline {
    color: var(--ty-color-danger);
    font-weight: 600;
}

.ys-ec-ty-payment__note {
    margin: 12px 0 0;
    padding: 10px 12px;
    font-size: 13px;
    color: #92400e;
    background: rgba(251, 191, 36, 0.12);
    border-radius: var(--ty-radius-sm);
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.ys-ec-ty-payment__note svg {
    flex-shrink: 0;
    margin-top: 1px;
}

/* ─── 信用卡 Callout ─── */
.ys-ec-ty-card-info {
    border: 1px solid var(--ty-color-brand);
    background: var(--ty-color-brand-soft);
}

.ys-ec-ty-card-info .ys-ec-ty-section__header {
    border-bottom-color: rgba(37, 99, 235, 0.25);
}

.ys-ec-ty-card-info__number {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 6px 12px;
    background: var(--ty-color-surface);
    border-radius: var(--ty-radius-sm);
    border: 1px solid var(--ty-color-border);
}

.ys-ec-ty-card-info__dots {
    letter-spacing: 0.2em;
    color: var(--ty-color-muted);
    font-weight: 400;
}

/* ─── 複製按鈕 ─── */
.ys-ec-ty-copy-btn {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 4px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ty-color-text);
    background: var(--ty-color-surface);
    border: 1px solid var(--ty-color-border);
    border-radius: var(--ty-radius-sm);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ys-ec-ty-copy-btn:hover {
    background: var(--ty-color-surface-alt);
    border-color: var(--ty-color-text);
}

.ys-ec-ty-copy-btn:focus-visible {
    outline: 2px solid var(--ty-color-brand);
    outline-offset: 2px;
}

.ys-ec-ty-copy-btn.is-copied {
    background: var(--ty-color-success-soft);
    border-color: var(--ty-color-success);
    color: var(--ty-color-success);
}

.ys-ec-ty-copy-btn svg {
    width: 14px;
    height: 14px;
}

/* ─── 商品清單 ─── */
.ys-ec-ty-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ys-ec-ty-item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    background: var(--ty-color-surface-alt);
    border-radius: var(--ty-radius-sm);
}

.ys-ec-ty-item__thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--ty-radius-sm);
    background: var(--ty-color-border);
}

.ys-ec-ty-item__thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ty-color-muted);
}

.ys-ec-ty-item__info {
    min-width: 0;
}

.ys-ec-ty-item__title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ys-ec-ty-item__variant {
    display: block;
    font-size: 12px;
    color: var(--ty-color-muted);
    margin-top: 2px;
}

.ys-ec-ty-item__meta {
    display: block;
    font-size: 12px;
    color: var(--ty-color-muted);
    margin-top: 4px;
}

.ys-ec-ty-item__amount {
    text-align: right;
    min-width: 96px;
}

.ys-ec-ty-item__price {
    font-size: 14px;
    font-weight: 600;
}

.ys-ec-ty-item__qty {
    display: block;
    font-size: 12px;
    color: var(--ty-color-muted);
    margin-top: 2px;
}

.ys-ec-ty-item__price-original {
    display: block;
    font-size: 12px;
    color: var(--ty-color-muted);
    text-decoration: line-through;
    font-weight: 400;
}

/* ─── 付款明細 ─── */
.ys-ec-ty-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ys-ec-ty-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14px;
    padding: 4px 0;
}

.ys-ec-ty-summary__row--discount {
    color: var(--ty-color-success);
}

.ys-ec-ty-summary__row--fee {
    color: var(--ty-color-warning);
}

.ys-ec-ty-summary__row--total {
    margin-top: 8px;
    padding: 14px 0 4px;
    border-top: 2px solid var(--ty-color-text);
    font-size: 16px;
    font-weight: 700;
}

.ys-ec-ty-summary__row--total .ys-ec-ty-summary__value {
    font-size: 22px;
    color: var(--ty-color-danger);
    letter-spacing: -0.01em;
}

.ys-ec-ty-summary__label {
    color: var(--ty-color-muted);
}

.ys-ec-ty-summary__row--total .ys-ec-ty-summary__label {
    color: var(--ty-color-text);
}

.ys-ec-ty-summary__free {
    color: var(--ty-color-success);
    font-weight: 600;
}

/* ─── Status badge ─── */
.ys-ec-ty-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 999px;
    border: 1px solid transparent;
}

.ys-ec-ty-status--pending,
.ys-ec-ty-status--offline_payment {
    background: var(--ty-color-warning-soft);
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.3);
}

.ys-ec-ty-status--processing,
.ys-ec-ty-status--awaiting_ship {
    background: var(--ty-color-brand-soft);
    color: var(--ty-color-brand);
    border-color: rgba(37, 99, 235, 0.3);
}

.ys-ec-ty-status--shipped,
.ys-ec-ty-status--completed {
    background: var(--ty-color-success-soft);
    color: #065f46;
    border-color: rgba(16, 185, 129, 0.3);
}

.ys-ec-ty-status--cancelled,
.ys-ec-ty-status--timeout,
.ys-ec-ty-status--failed,
.ys-ec-ty-status--refunded {
    background: #f3f4f6;
    color: #4b5563;
    border-color: var(--ty-color-border);
}

/* ─── Bottom actions ─── */
.ys-ec-ty-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 24px 0 8px;
}

/* ─── Button normalise（相容既有 .ys-ec-btn，本地加 focus-visible） ─── */
.ys-ec-ty .ys-ec-btn:focus-visible {
    outline: 2px solid var(--ty-color-brand);
    outline-offset: 2px;
}

/* ─── 響應式 ─── */
@media (max-width: 640px) {
    .ys-ec-ty-section {
        padding: 16px;
    }

    .ys-ec-ty-hero {
        padding: 24px 16px;
    }

    .ys-ec-ty-hero__title {
        font-size: 20px;
    }

    .ys-ec-ty-dl {
        grid-template-columns: 1fr;
        gap: 4px 0;
    }

    .ys-ec-ty-dl dt {
        padding-top: 8px;
        font-size: 12px;
    }

    .ys-ec-ty-dl__row--full {
        grid-column: 1;
    }

    .ys-ec-ty-item {
        grid-template-columns: 52px 1fr;
        grid-template-rows: auto auto;
    }

    .ys-ec-ty-item__thumb {
        width: 52px;
        height: 52px;
        grid-row: 1 / 3;
    }

    .ys-ec-ty-item__amount {
        grid-column: 2;
        text-align: left;
    }

    .ys-ec-ty-payment__code {
        font-size: 16px;
    }

    .ys-ec-ty-actions .ys-ec-btn {
        flex: 1 1 calc(50% - 12px);
    }
}

/* ─── Print ─── */
@media print {
    body {
        background: #fff;
    }
    .ys-ec-ty {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    .ys-ec-ty-hero__actions,
    .ys-ec-ty-actions,
    .ys-ec-ty-copy-btn,
    .ys-ec-change-store {
        display: none !important;
    }
    .ys-ec-ty-section {
        box-shadow: none;
        page-break-inside: avoid;
    }
    .ys-ec-ty-payment {
        border: 2px solid #000;
        background: #fff;
    }
}

/* ─── Accessibility ─── */
.ys-ec-ty-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    .ys-ec-ty-copy-btn {
        transition: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   v2.22.1：重新付款頁（/checkout/?repay_order=X）共用 ys-ec-ty 系統
   ═══════════════════════════════════════════════════════════════ */

.ys-ec-ty-hero--repay .ys-ec-ty-hero__icon {
    background: var(--ty-color-brand-soft);
    color: var(--ty-color-brand);
}

.ys-ec-ty-hero__meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 14px;
    font-size: 13px;
    color: var(--ty-color-muted);
}

.ys-ec-ty-hero__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ys-ec-ty-hero__meta-item strong {
    color: var(--ty-color-text);
    font-weight: 600;
}

/* 重新付款時的警示通知（取代原本 inline style 的 .ys-ec-notice） */
.ys-ec-ty-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 16px;
    padding: 12px 16px;
    font-size: 13px;
    border-radius: var(--ty-radius-sm);
    border: 1px solid transparent;
    line-height: 1.5;
}

.ys-ec-ty-notice svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.ys-ec-ty-notice--warning {
    background: var(--ty-color-warning-soft);
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.3);
}

.ys-ec-repay-prior-payment-warning {
    margin: 16px 0 20px;
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.ys-ec-ty-notice--info {
    background: var(--ty-color-brand-soft);
    color: #1e40af;
    border-color: rgba(37, 99, 235, 0.2);
}

/* 重新付款的提交按鈕置中，避免在寬版結帳頁撐成整列。 */
.ys-ec-ty-submit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.ys-ec-ty-submit__btn {
    width: min(100%, 320px);
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--ty-radius-sm);
    cursor: pointer;
    border: none;
    background: var(--ys-ec-btn-color, var(--ys-ec-primary-dark, #6b8a9a));
    color: var(--ys-ec-btn-text, #000000);
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.ys-ec-ty-submit__btn:hover:not(:disabled) {
    background: var(--ys-ec-btn-hover, #5a7a8a);
    color: var(--ys-ec-btn-hover-text, #000000);
}

.ys-ec-ty-submit__btn:active:not(:disabled) {
    transform: translateY(1px);
}

.ys-ec-ty-submit__btn:focus-visible {
    outline: 2px solid var(--ys-ec-primary, #7a9bae);
    outline-offset: 3px;
}

.ys-ec-ty-submit__btn:disabled,
.ys-ec-ty-submit__btn:disabled:hover {
    background: var(--ys-ec-btn-color, var(--ys-ec-primary-dark, #6b8a9a)) !important;
    color: var(--ys-ec-btn-text, #000000) !important;
    box-shadow: none;
    opacity: 0.6;
    cursor: not-allowed;
}

.ys-ec-ty-submit__hint {
    text-align: center;
    font-size: 12px;
    color: var(--ty-color-muted);
    margin: 0;
}

.ys-ec-ty-submit__hint a {
    color: var(--ys-ec-link-color, var(--ys-ec-primary-dark, #6b8a9a));
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ys-ec-ty-submit__hint a:hover,
.ys-ec-ty-submit__hint a:focus-visible {
    color: var(--ys-ec-primary, #7a9bae);
}

/* ═══════════════════════════════════════════════════════════════
   v2.22.1：選店 UI（已儲存門市 radio card + 選其他門市 dashed card）
   強化 checked active state / hover / focus-visible
   ═══════════════════════════════════════════════════════════════ */

.ys-ec-saved-recipients {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.ys-ec-saved-recipient-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.ys-ec-saved-recipient-option:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.ys-ec-saved-recipient-option input[type="radio"] {
    margin-top: 4px;
    flex-shrink: 0;
    accent-color: #2563eb;
    cursor: pointer;
}

.ys-ec-saved-recipient-option:has(input[type="radio"]:checked) {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.ys-ec-saved-recipient-option:focus-within {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.ys-ec-saved-recipient-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.ys-ec-saved-recipient-store {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.ys-ec-saved-recipient-store .dashicons {
    color: #10b981;
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.ys-ec-saved-recipient-detail {
    font-size: 13px;
    color: #4b5563;
}

.ys-ec-saved-recipient-addr {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

/* 「選擇其他取貨門市」虛線 CTA 卡片 */
.ys-ec-new-recipient-option {
    border-style: dashed;
    border-color: #cbd5e1;
    background: transparent;
    color: #475569;
}

.ys-ec-new-recipient-option:hover {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1e40af;
}

.ys-ec-new-recipient-option:has(input[type="radio"]:checked) {
    border-style: solid;
    border-color: #2563eb;
    background: #dbeafe;
    color: #1e40af;
}

.ys-ec-new-recipient-option .dashicons {
    margin-top: 2px;
    color: currentColor;
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.ys-ec-new-recipient-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ys-ec-new-recipient-label strong {
    font-size: 14px;
    font-weight: 600;
}

.ys-ec-new-recipient-label small {
    font-size: 12px;
    opacity: 0.85;
}

/* 已選中門市的資訊卡（選完回來後顯示） */
.ys-ec-cvs-store-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #ecfdf5;
    border: 1.5px solid #10b981;
    border-radius: 10px;
    margin-top: 12px;
}

.ys-ec-cvs-store-card > .dashicons {
    color: #10b981;
    font-size: 28px;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.ys-ec-cvs-store-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ys-ec-cvs-store-details strong {
    font-size: 14px;
    font-weight: 600;
    color: #065f46;
}

.ys-ec-cvs-store-details span {
    font-size: 12px;
    color: #047857;
}

.ys-ec-change-store {
    flex-shrink: 0;
}

/* 選擇門市主要 CTA（「選擇門市」大按鈕） */
.ys-ec-select-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
}

.ys-ec-select-store-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════
   v2.25.1 — Dashboard mode
   .ys-ec-ty 在 dashboard 內（會員中心）時的樣式變體
   ═══════════════════════════════════════════════════ */

/* Dashboard 模式：移除外層 margin/padding/max-width，避免與 dashboard-content 雙重框 */
.ys-ec-ty--dashboard {
    max-width: none;
    margin: 0;
    padding: 0;
}

/* Dashboard 模式訂單標頭（取代結帳完成 hero） */
.ys-ec-ty-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 20px;
    margin-bottom: 20px;
    background: var(--ty-color-surface-alt, #f9fafb);
    border: 1px solid var(--ty-color-border, #e5e7eb);
    border-radius: var(--ty-radius, 12px);
}

.ys-ec-ty-dashboard-header__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--ty-color-text, #111827);
    letter-spacing: -0.01em;
}

.ys-ec-ty-dashboard-header__title .ys-ec-ty-dl__mono {
    font-size: 15px;
    color: var(--ty-color-muted, #6b7280);
    margin-left: 4px;
}

@media (max-width: 640px) {
    .ys-ec-ty-dashboard-header {
        padding: 12px 14px;
    }
    .ys-ec-ty-dashboard-header__title {
        font-size: 16px;
    }
}

/* 訂單列表可點擊編號 */
.ys-ec-order-number-link {
    color: var(--ys-ec-primary-dark, #6b8a9a);
    text-decoration: none;
    transition: color 0.15s ease;
}

.ys-ec-order-number-link:hover,
.ys-ec-order-number-link:focus-visible {
    color: var(--ys-ec-primary, #8fa8b8);
    text-decoration: underline;
}

.ys-ec-order-number-link strong {
    font-weight: 600;
}

/* Dashboard 內訂單檢視返回按鈕留白 */
.ys-ec-order-view-wrap {
    padding-top: 4px;
}
