/**
 * Storelly Product Builder — Account Shell chrome (User Menu M4).
 *
 * Shared header/body wrapper for every My-Account endpoint, so the portal looks
 * consistent regardless of which feature renders. Tokenised via
 * _tokens-storefront.css (:root --nbd-mb-*). Depends on: spbwc-tokens-storefront.
 */

.spbwc-account {
    color: var(--nbd-mb-text, #1f2937);
    font-family: var(--nbd-font-family, inherit);
}

/* Breadcrumb */
.spbwc-account__breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--nbd-space-1, 4px);
    margin: 0 0 var(--nbd-space-3, 12px);
    font-size: 13px;
    color: var(--nbd-mb-text-soft, #6b7280);
}
.spbwc-account__breadcrumb a {
    color: var(--nbd-mb-text-soft, #6b7280);
    text-decoration: none;
}
.spbwc-account__breadcrumb a:hover {
    color: var(--nbd-mb-primary, #2563eb);
    text-decoration: underline;
}
.spbwc-account__breadcrumb-sep {
    color: var(--nbd-mb-border-strong, #d1d5db);
}

/* Header row */
.spbwc-account__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--nbd-space-3, 12px);
    margin: 0 0 var(--nbd-space-6, 24px);
    padding: 0 0 var(--nbd-space-4, 16px);
    border-block-end: 1px solid var(--nbd-mb-border, #e5e7eb);
}
.spbwc-account__titles {
    min-width: 0;
    /* Premium accent: a short gradient rule that marks the page heading. */
    padding-inline-start: var(--nbd-space-3, 12px);
    border-inline-start: 3px solid var(--nbd-mb-primary, #2563eb);
}
.spbwc-account__eyebrow {
    display: block;
    margin: 0 0 var(--nbd-space-1, 4px);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nbd-mb-primary, #2563eb);
}
.spbwc-account__title {
    margin: 0;
    font-size: 23px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--nbd-mb-text, #1f2937);
}
.spbwc-account__subtitle {
    margin: var(--nbd-space-1, 4px) 0 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--nbd-mb-text-soft, #6b7280);
}
.spbwc-account__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--nbd-space-2, 8px);
    flex-shrink: 0;
}

/* Body */
.spbwc-account__body {
    /* Reserved hook for per-page spacing; intentionally minimal so pages keep
       their existing internal layout. */
}

@media screen and (max-width: 782px) {
    .spbwc-account__title {
        font-size: 19px;
    }
    .spbwc-account__head {
        margin-bottom: var(--nbd-space-4, 16px);
    }
}

/* ── Empty state (User Menu G1) ──────────────────────────── */
.spbwc-account__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--nbd-space-2, 8px);
    padding: var(--nbd-space-12, 48px) var(--nbd-space-4, 16px);
    background: var(--nbd-mb-bg-soft, #f9fafb);
    border: 1px dashed var(--nbd-mb-border-strong, #d1d5db);
    border-radius: var(--nbd-radius-xl, 12px);
}
.spbwc-account__empty-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--nbd-mb-text-soft, #6b7280);
    font-size: 40px;
    line-height: 1;
    opacity: 0.8;
}
.spbwc-account__empty-icon svg {
    width: 100%;
    height: 100%;
}
.spbwc-account__empty-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--nbd-mb-text, #1f2937);
}
.spbwc-account__empty-text {
    margin: 0;
    max-width: 38ch;
    font-size: 14px;
    color: var(--nbd-mb-text-soft, #6b7280);
}
.spbwc-account__empty-cta {
    margin-top: var(--nbd-space-2, 8px);
    display: inline-flex;
    align-items: center;
    padding: var(--st-btn-pad-md);
    font-size: var(--st-btn-font-lg);
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: var(--nbd-mb-primary, #2563eb);
    border-radius: var(--st-btn-radius);
    transition: background var(--nbd-duration-fast, 120ms) var(--nbd-ease-out, ease-out);
}
.spbwc-account__empty-cta:hover {
    background: var(--nbd-mb-primary-pressed, #1d4ed8);
    color: #fff;
}

/* ── Portal footer (User Menu W2-MA) ─────────────────────── */
/* A quiet closing strip on every shell page: a help prompt + a back-to-shop
   link. Tokenised + logical properties; subtle so it never competes with the
   theme's own site footer. */
.spbwc-account__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--nbd-space-3, 12px);
    margin-block-start: var(--nbd-space-8, 32px);
    padding-block-start: var(--nbd-space-4, 16px);
    border-block-start: 1px solid var(--nbd-mb-border, #e5e7eb);
    font-size: 13px;
    color: var(--nbd-mb-text-soft, #6b7280);
}
.spbwc-account__foot-help {
    margin: 0;
}
.spbwc-account__foot-shop {
    display: inline-flex;
    align-items: center;
    gap: var(--nbd-space-1, 4px);
    font-weight: 600;
    color: var(--nbd-mb-primary, #2563eb);
    text-decoration: none;
    transition: color var(--nbd-duration-fast, 120ms) var(--nbd-ease-out, ease-out);
}
.spbwc-account__foot-shop:hover {
    color: var(--nbd-mb-primary-pressed, #1d4ed8);
    text-decoration: underline;
}
.spbwc-account__foot-shop .spbwc-account__foot-arrow {
    transition: transform var(--nbd-duration-fast, 120ms) var(--nbd-ease-out, ease-out);
}
.spbwc-account__foot-shop:hover .spbwc-account__foot-arrow {
    transform: translateX(2px);
}

/* ── Gallery skeleton (perceived speed, User Menu M6) ─────── */
/* Reserve a square + neutral placeholder so lazy thumbnails don't shift layout;
   a short shimmer runs a few times then settles (no JS, no perpetual cost). The
   loaded image paints over it. */
.spbwc-saved-designs__thumb {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background-color: var(--nbd-mb-bg-soft, #f9fafb);
    background-image: linear-gradient(100deg, transparent 30%, rgba(0, 0, 0, 0.05) 50%, transparent 70%);
    background-size: 200% 100%;
    background-repeat: no-repeat;
    animation: spbwc-skeleton-shimmer 1.2s ease-in-out 3;
}
@keyframes spbwc-skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
    .spbwc-saved-designs__thumb { animation: none; }
}
