/* Order lookup shares the storefront's quiet surfaces and light/dark tokens. */
html:has(.storefront-query) .shop-search { display: none; }
:root[data-app-theme] main.storefront-query {
    max-width: 900px; padding: 40px 12px 72px; color: var(--foreground);
    --acg-delivery-accent: var(--primary);
    --acg-delivery-accent-soft: var(--secondary);
    --acg-delivery-on-accent: var(--primary-foreground);
    --acg-delivery-surface: var(--muted);
    --acg-delivery-border: var(--border);
    --acg-delivery-radius: 8px;
}
.storefront-query [hidden] { display: none !important; }
.sq-search-form { margin: 0; }
.sq-password-form > label { display: block; margin: 0 0 10px; color: var(--foreground); font-size: 13px; font-weight: 500; }
.sq-search-field { display: flex; align-items: center; gap: 12px; padding: 5px 5px 5px 16px; border: 1px solid var(--input); border-radius: 10px; background: var(--card); }
.sq-search-field:focus-within { border-color: var(--ring); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ring) 12%, transparent); }
.sq-search-field > svg { width: 19px; height: 19px; flex: 0 0 auto; color: var(--muted-foreground); }
:root[data-app-theme] .sq-search-field input { width: 100%; min-width: 0; height: 40px; padding: 0; border: 0; background: transparent; color: var(--foreground); outline: none !important; box-shadow: none !important; }
.sq-search-field input::placeholder, .sq-password-input::placeholder { color: var(--muted-foreground); }
.storefront-query .sq-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-height: 40px; padding: 8px 18px; border: 1px solid var(--border); border-radius: 7px; background: var(--card); color: var(--foreground); font-size: 13px; font-weight: 500; line-height: 1.5; cursor: pointer; transition: opacity .15s, background .15s; }
.storefront-query .sq-search-submit, .storefront-query .sq-unlock { border-color: var(--primary); background: var(--primary); color: var(--primary-foreground); }
.storefront-query .sq-button:hover:not(:disabled) { opacity: .8; }
.storefront-query .sq-button:disabled { opacity: .45; cursor: default; }
.sq-validation, .sq-password-error { margin: 10px 0 0; color: var(--destructive); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.sq-feedback { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 28px; padding: 40px 24px; min-height: 180px; border: 1px dashed var(--border); border-radius: 12px; color: var(--foreground); text-align: center; }
.sq-feedback p { margin: 0; max-width: 480px; overflow-wrap: anywhere; }
.sq-feedback-title { font-size: 15px; font-weight: 500; }
.sq-feedback-detail { font-size: 13px; line-height: 1.7; color: var(--muted-foreground); }
.sq-feedback.is-loading { min-height: 140px; border: 0; }
.sq-spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--foreground); border-radius: 50%; animation: sq-spin .8s linear infinite; }
@keyframes sq-spin { to { transform: rotate(360deg); } }
.sq-results { margin-top: 36px; }
.sq-results-heading { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
:root[data-app-theme] .sq-results-heading h2 { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 600; }
.sq-result-count { color: var(--muted-foreground); font-size: 12px; font-variant-numeric: tabular-nums; }
.sq-order-list { display: flex; flex-direction: column; gap: 20px; }
.sq-order { min-width: 0; padding: 24px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.sq-order-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.sq-order-identity { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.sq-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 5px; color: var(--muted-foreground); background: var(--muted); font-size: 12px; line-height: 1.5; }
.sq-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.sq-status.is-paid { color: var(--foreground); background: var(--secondary); }
.sq-order-number { font-size: 13px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sq-amount { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; min-width: 0; }
.sq-amount-label { font-size: 12px; color: var(--muted-foreground); }
.sq-amount strong { color: var(--foreground); font-size: 24px; line-height: 1.4; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sq-product { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.sq-product-media { width: 60px; height: 60px; flex-shrink: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--muted); }
.sq-product-image { width: 100%; height: 100%; object-fit: contain; }
.sq-product-info { min-width: 0; }
:root[data-app-theme] .sq-product-info h3 { margin: 0 0 8px; color: var(--foreground); font-size: 15px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.sq-product-specs { display: flex; flex-wrap: wrap; gap: 5px 12px; color: var(--muted-foreground); font-size: 12px; line-height: 1.6; }
.sq-product-specs > span { overflow-wrap: anywhere; }
.sq-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 24px; margin: 22px 0 0; }
.sq-detail { min-width: 0; font-size: 12px; line-height: 1.6; }
.sq-detail dt { margin-bottom: 5px; color: var(--muted-foreground); font-weight: 400; }
.sq-detail dd { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 0; color: var(--foreground); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.sq-detail dd img { width: 17px; height: 17px; border-radius: 3px; object-fit: contain; }
.sq-delivery { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.sq-delivery-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
:root[data-app-theme] .sq-delivery-heading h4 { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.5; }
.sq-shipment { font-size: 12px; color: var(--muted-foreground); }
.sq-delivery-content { min-width: 0; }
.sq-delivery-content:focus { outline: none !important; box-shadow: none !important; }
.sq-secret-text { margin: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--muted); color: var(--foreground); font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.sq-leave-message { margin: 12px 0 0; color: var(--muted-foreground); font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.sq-password-form { max-width: 520px; }
.sq-password-field { display: flex; gap: 10px; }
:root[data-app-theme] .sq-password-input { width: 100%; min-width: 0; min-height: 42px; padding: 9px 12px; border: 1px solid var(--input); border-radius: 7px; background: var(--card); color: var(--foreground); font-size: 14px; }
.storefront-query .acg-delivery__file, .storefront-query .acg-delivery__icon { box-shadow: none; }
.storefront-query .acg-delivery__download, .storefront-query .acg-delivery__copy { border-radius: 6px; }
.sq-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 24px; }
.sq-page-number { color: var(--muted-foreground); font-size: 13px; font-variant-numeric: tabular-nums; }
.storefront-query :is(a, button, input):focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
@media (max-width: 767px) {
    :root[data-app-theme] main.storefront-query { padding: 28px 16px 48px; }
    :root[data-app-theme] .sq-search-field input, :root[data-app-theme] .sq-password-input { font-size: 16px !important; }
    .sq-search-field { gap: 8px; padding-left: 12px; }
    .sq-search-field > svg { display: none; }
    .storefront-query .sq-button { min-height: 42px; padding-inline: 14px; }
    .sq-results { margin-top: 28px; }
    .sq-order { padding: 18px; }
    .sq-order-header { gap: 12px; }
    .sq-order-number { font-size: 12px; }
    .sq-amount strong { font-size: 22px; }
    .sq-details { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
    .sq-feedback { margin-top: 24px; padding: 32px 18px; }
}
@media (max-width: 380px) {
    .sq-order { padding: 16px; }
    .sq-order-header { flex-wrap: wrap; }
    .sq-amount { margin-left: auto; }
    .sq-product-media { width: 48px; height: 48px; }
    .sq-password-field { flex-direction: column; }
    .sq-details { grid-template-columns: minmax(0, 1fr); }
    .sq-pagination { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .storefront-query *, .storefront-query *::before { animation: none !important; transition: none !important; }
}
