html, body {
    height: 100%;
}
body {
    display: flex;
    flex-direction: column;
}
#view {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}
#content.site-content {
    flex: 1 0 auto;
}
.motqn-order-received,
.motqn-view-order {
    max-width: 1100px;
    margin: 32px auto 64px;
    padding: 0 20px;
    color: #0f172a;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

.motqn-order-hero {
    background: linear-gradient(135deg, #0b74f1 0%, #0f172a 70%);
    border-radius: 24px;
    padding: 28px 28px 32px;
    color: #f8fafc;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.22);
}

.motqn-order-hero--cta {
    margin-bottom: 20px;
    background: radial-gradient(120% 120% at 20% 20%, rgba(14, 165, 233, 0.35), transparent 40%),
        radial-gradient(120% 120% at 80% 10%, rgba(255, 255, 255, 0.1), transparent 45%),
        linear-gradient(135deg, #0b74f1 0%, #0f172a 80%);
}

.motqn-order-hero__header {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.motqn-order-hero__copy {
    flex: 1;
    min-width: 0;
}

.motqn-order-hero--empty {
    text-align: center;
}

.motqn-order-hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    font-size: 12px;
    margin: 0 0 10px;
    opacity: 0.8;
}

.motqn-order-hero__title {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
}

.motqn-order-hero__cta-panel {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
    padding: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    width: 100%;
    align-self: stretch;
}

.motqn-order-hero__lede {
    margin: 0;
    color: rgba(248, 250, 252, 0.88);
    font-size: 15px;
}

.motqn-track-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.motqn-track-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.motqn-field {
    display: block;
}

.motqn-field__label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
    color: rgba(248, 250, 252, 0.88);
}

.motqn-field input {
    width: 100%;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.motqn-field input:focus {
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.35);
    background: rgba(255, 255, 255, 0.16);
}

.motqn-track-form__actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.motqn-order-hero--collapsed {
    display: none;
}

.motqn-order-hero--cta:target {
    display: block;
}

#motqn-track-another:target ~ .motqn-order-hero,
#motqn-track-another:target ~ .motqn-order-grid,
#motqn-track-another:target ~ .motqn-card {
    display: none;
}

.motqn-track-form__hint {
    margin: 0;
    color: rgba(248, 250, 252, 0.82);
    font-size: 13px;
}

.motqn-button { 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    margin-top: 16px;
    background: #0ea5e9;
    color: #fff;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease;
}

.motqn-button:hover {
    background: #0284c7;
    color: #fff;
}

.motqn-button--secondary {
    background: rgba(248, 250, 252, 0.14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(2px);
}

.motqn-button--secondary:hover,
.motqn-button--secondary.is-copied {
    background: #fff;
    color: #0f172a;
    border-color: #e2e8f0;
}

.motqn-order-share {
    position: relative;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
}

.motqn-order-share__button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(15, 23, 42, 0.14);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.26);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.motqn-order-share__button:hover,
.motqn-order-share__button.is-copied {
    transform: translateY(-1px);
    background: #fff;
    color: #0f172a;
    border-color: #cbd5f5;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.3);
}

.motqn-order-share__button--ghost {
    background: rgba(248, 250, 252, 0.1);
    border-color: rgba(248, 250, 252, 0.25);
}

.motqn-order-share__button--ghost:hover {
    background: rgba(255, 255, 255, 0.24);
}

.motqn-order-share__icon {
    width: 18px;
    height: 18px;
    display: inline-block;
}

.motqn-order-share__icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.motqn-order-share__feedback {
    margin: 0;
    color: rgba(248, 250, 252, 0.8);
    font-size: 13px;
    text-align: right;
    flex-basis: 100%;
}

.motqn-order-share__feedback.is-error {
    color: #fee2e2;
}

.motqn-order-share__toast {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    padding: 10px 14px;
    background: #0f172a;
    color: #f8fafc;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    border: 1px solid #1e293b;
}

.motqn-order-share__toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 760px) {
    .motqn-order-hero__header {
        flex-direction: column;
        align-items: stretch;
    }

    .motqn-order-share {
        align-items: flex-start;
    }

    .motqn-order-share__feedback {
        text-align: left;
    }

    .motqn-order-share__toast {
        right: auto;
        left: 0;
    }

    .motqn-order-hero__cta-panel {
        min-width: 0;
    }

    .motqn-track-form__grid {
        grid-template-columns: 1fr;
    }

    .motqn-track-form__actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

.motqn-order-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 20px 0 16px;
}

.motqn-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

.motqn-card__title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

.motqn-card__header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.motqn-card__hint {
    margin: 0;
    color: #475569;
    font-size: 14px;
}

.motqn-summary {
    margin: 0;
}

.motqn-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 10px;
    color: #1e293b;
}

.motqn-summary__row:nth-child(odd) {
    background: #f8fafc;
}

.motqn-summary__row--highlight {
    background: linear-gradient(90deg, #0ea5e9 0%, #2563eb 100%);
    color: #f8fafc;
    font-weight: 800;
}

.motqn-summary__row dt {
    margin: 0;
    font-weight: 600;
    color: inherit;
}

.motqn-summary__row dd {
    margin: 0;
    font-weight: 700;
    color: inherit;
}

.motqn-addresses {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.motqn-addresses__block {
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}

.motqn-addresses__block h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 800;
}

.motqn-addresses__block address {
    margin: 0;
    font-style: normal;
    color: #334155;
    line-height: 1.6;
    font-size: 14px;
}

.motqn-addresses__meta {
    margin: 6px 0 0;
    color: #475569;
    font-size: 13px;
}

.motqn-order-note {
    margin-top: 14px;
    padding: 12px;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.motqn-order-note h4 {
    margin: 0 0 6px;
    font-size: 14px;
    color: #9a3412;
}

.motqn-order-note p {
    margin: 0;
    color: #7c2d12;
    font-size: 13px;
}

.motqn-card--items {
    margin-top: 12px;
}

.motqn-order-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.motqn-order-item {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 14px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.motqn-order-item__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.motqn-order-item__title-group {
    display: flex;
    gap: 6px;
    align-items: baseline;
    flex-wrap: wrap;
}

.motqn-order-item__name {
    font-weight: 700;
    color: #0f172a;
}

.motqn-order-item__qty {
    padding: 2px 8px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
    font-size: 13px;
}

.motqn-order-item__price {
    font-weight: 800;
    color: #0f172a;
}

.motqn-order-item__preview {
    position: relative;
    width: 100%;
    height: 100%;
}

.motqn-order-item__preview-inner {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.motqn-order-item__preview-inner .motqn-preview--checkout {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

.motqn-cart-preview__hidden-image {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.motqn-preview--checkout {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.motqn-preview--checkout .motqn-preview__canvas-element {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.motqn-preview--checkout .motqn-preview__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: #1f2937;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.95), rgba(226, 232, 240, 0.7));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    text-align: center;
    padding: 10px;
}

.motqn-preview--checkout .motqn-preview__overlay--visible {
    opacity: 1;
}

.motqn-preview--checkout .motqn-preview__overlay--has-image {
    background: rgba(255, 255, 255, 0.82);
}

.motqn-preview--checkout .motqn-preview__fallback {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
}

.motqn-preview--checkout .motqn-preview__overlay--has-image .motqn-preview__fallback {
    display: block;
}

.motqn-preview--checkout .motqn-preview__message {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.motqn-preview--checkout.is-loading .motqn-preview__overlay,
.motqn-preview--checkout.is-error .motqn-preview__overlay {
    opacity: 1;
}

.motqn-order-item__preview-inner img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.motqn-order-item__qty-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.9);
    color: #f8fafc;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 800;
    font-size: 12px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
    z-index: 2;
}

.motqn-order-item__refresh {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    z-index: 2;
}

.motqn-order-item__refresh:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 23, 42, 0.15);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.motqn-order-item__refresh:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

.motqn-order-item__refresh-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.motqn-order-item__refresh svg {
    width: 16px;
    height: 16px;
}

.motqn-order-item__refresh.is-refreshing .motqn-order-item__refresh-icon {
    animation: motqn-refresh-spin 0.9s linear infinite;
}

@keyframes motqn-refresh-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.motqn-order-item__preview-pill {
    position: absolute;
    left: 10px;
    bottom: 10px;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.15);
    z-index: 2;
}

.motqn-order-item__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.motqn-order-item__meta {
    margin: 10px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); 
    gap: 12px;
    align-items: stretch;
}
@media (max-width: 640px) {
    .motqn-order-item__meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
/* Material row: title on top, chip under it */
.motqn-meta-row--material.motqn-meta-row--chip {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.motqn-meta-row--material.motqn-meta-row--chip dt {
    margin-bottom: 6px;
}

.motqn-order-item__meta-grid {
    margin-top: 4px;
}

.motqn-meta-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.motqn-meta-row:hover {
    border-color: #cbd5e1;
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.motqn-meta-row dt {
    margin: 0 0 4px;
    font-weight: 700;
    color: #0f172a;
    font-size: 13px;
    white-space: nowrap;
}

.motqn-meta-row dd {
    margin: 0;
    color: #475569;
    font-size: 13px;
}

.motqn-meta-row--chip {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.motqn-meta-row--color {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.motqn-meta-row--material {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.motqn-meta-row--note dd {
    white-space: pre-wrap;
}

.motqn-meta-row--note {
    grid-column: 1 / -1;
    background: #f8fafc;
    border-style: dashed;
}

.motqn-color-chip {
    --motqn-chip-color: #0ea5e9;

    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    white-space: nowrap;
}

.motqn-color-chip__swatch {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: var(--motqn-chip-color, #0ea5e9);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65), 0 2px 6px rgba(15, 23, 42, 0.12);
}

.motqn-color-chip__label {
    display: inline-block;
}

.motqn-material-chip {
    --motqn-chip-color: linear-gradient(135deg, #cbd5f5 0%, #94a3b8 100%);

    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #eef2ff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

.motqn-material-chip__swatch {
    width: 18px;
    height: 18px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: var(--motqn-chip-color, linear-gradient(135deg, #cbd5f5 0%, #94a3b8 100%));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65), 0 2px 6px rgba(15, 23, 42, 0.12);
}

.motqn-material-chip__label {
    display: inline-block;
}

.motqn-quality-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: linear-gradient(135deg, #ecfeff 0%, #e0f2fe 100%);
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.motqn-quality-chip__dot {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65), 0 2px 6px rgba(15, 23, 42, 0.12);
}

.motqn-quality-chip__label {
    display: inline-block;
}

.motqn-order-totals {
    margin: 14px 0 0;
    display: grid;
    gap: 8px;
}

.motqn-order-totals__row {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-weight: 700;
    color: #0f172a;
}

.motqn-order-totals__row dt,
.motqn-order-totals__row dd {
    margin: 0;
}

.motqn-order-totals__row--order_total {
    background: linear-gradient(90deg, #0ea5e9 0%, #2563eb 100%);
    color: #f8fafc;
}

@media (max-width: 900px) {
    .motqn-order-grid {
        grid-template-columns: 1fr;
    }

    .motqn-addresses {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .motqn-order-item {
        grid-template-columns: 1fr;
    }

    .motqn-order-item__preview-inner {
        padding-bottom: 65%;
    }
}

@media (max-width: 640px) {
    .motqn-order-hero__title {
        font-size: 23px;
    }

    .motqn-order-item__row {
        flex-direction: column;
        align-items: flex-start;
    }

    .motqn-order-item__price {
        font-size: 15px;
    }
}
h1.motqn-order-hero__title {
    color: #FFFFFF;
}