/*
 * Overrides for the Filament panels where Filament has no setting
 * (design/admin-panel.md). Plain CSS, published by filament:assets.
 * Unlayered rules win over Filament's Tailwind layers.
 */

/* Compact tables: about 40px rows, 13px text, numbers in columns line up. */
.fi-ta-table {
    font-variant-numeric: tabular-nums;
}

.fi-ta-table .fi-ta-header-cell {
    padding-block: 0.625rem;
    font-size: 0.8125rem;
    background-color: #fafafa;
}

.fi-ta-table .fi-ta-text,
.fi-ta-table .fi-ta-icon,
.fi-ta-table .fi-ta-cell:has(.fi-ta-actions),
.fi-ta-table .fi-ta-cell:has(.fi-ta-record-checkbox) {
    padding-block: 0.5rem;
}

.fi-ta-table .fi-ta-text-item {
    font-size: 0.8125rem;
}

/* Page titles at 22px rather than Filament's 24 to 30px. */
.fi-header-heading {
    font-size: 1.375rem;
    line-height: 1.75rem;
}

/* The line under a page title: body size and muted, one short line (Filament's is 18px). */
.fi-header-subheading {
    margin-top: 0.25rem;
    max-width: 42rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #6b6b73;
}

/* Shell: full-height sidebar, slim top bar beside it (Filament's own top bar is off). */
.cz-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3.5rem;
    padding: 0.5rem 1.5rem;
    background-color: #ffffff;
    border-bottom: 1px solid #e4e4e7;
}

/* Filament's own menu row (shown below lg) is replaced by .cz-topbar-menu inside the bar. */
.fi-layout-sidebar-toggle-btn-ctn {
    display: none;
}

.cz-topbar-menu {
    flex-shrink: 0;
    margin-inline-start: -0.5rem;
}

@media (min-width: 64rem) {
    .cz-topbar-menu {
        display: none;
    }
}

.cz-topbar-start {
    flex: 1 1 auto;
    min-width: 0;
}

.cz-topbar-end {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cz-topbar .fi-global-search {
    width: 20rem;
    max-width: 50vw;
}

/* Phones: the menu button, search and account menu on one line. The page heading below says where you are. */
@media (max-width: 39.99rem) {
    .cz-topbar {
        padding-inline: 1rem;
    }

    .cz-topbar-start {
        display: none;
    }

    .cz-topbar-end {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: flex-end;
    }

    .cz-topbar .fi-global-search {
        width: auto;
        max-width: none;
        flex: 1 1 auto;
        min-width: 0;
    }
}


/* The page header no longer repeats the breadcrumb shown in the top bar. */
.fi-header .fi-breadcrumbs {
    display: none;
}

/* Sidebar: brand mark when collapsed, our toggle at the foot instead of Filament's in the header. */
.fi-sidebar-open-collapse-sidebar-btn,
.fi-sidebar-close-collapse-sidebar-btn {
    display: none !important;
}

.fi-sidebar {
    background-color: #ffffff;
    border-inline-end: 1px solid #e4e4e7;
}

.cz-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-inline: auto;
    border-radius: 0.5rem;
    background-color: #9c2f83;
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
}

.cz-sidebar-toggle-ctn {
    padding: 0.75rem;
}

.cz-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    height: 2.5rem;
    padding: 0 0.625rem;
    border-radius: 0.5rem;
    color: #4b4b52;
    font-size: 0.875rem;
}

.fi-main-ctn-sidebar-open .cz-sidebar-toggle,
.fi-sidebar.fi-sidebar-open .cz-sidebar-toggle {
    justify-content: flex-start;
}

.cz-sidebar-toggle:hover {
    background-color: #f7f7f8;
}

@media (max-width: 1023px) {
    .cz-sidebar-toggle-ctn {
        display: none;
    }
}

.cz-topbar .fi-simple-user-menu-ctn {
    position: static;
    inset: auto;
}

/* Breadcrumb in the top bar: "Sales / Orders". */
.cz-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #6b6b73;
}

.cz-crumbs li + li::before {
    content: "/";
    margin-inline-end: 0.5rem;
    color: #85858d;
}

.cz-crumbs [aria-current="page"] {
    color: #323237;
    font-weight: 500;
}

.cz-crumbs a:hover {
    color: #9c2f83;
}

/* List tabs as an underlined row, left aligned (design: status tabs above the table). */
.fi-resource-list-records-page .fi-tabs,
.fi-page .fi-tabs.fi-contained,
.fi-tabs {
    justify-content: flex-start;
    margin-inline: 0;
    padding: 0;
    gap: 0.25rem;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    border-bottom: 1px solid #e4e4e7;
}

.fi-tabs .fi-tabs-item {
    border-radius: 0;
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid transparent;
    background: transparent;
}

.fi-tabs .fi-tabs-item.fi-active {
    border-bottom-color: #9c2f83;
    background: transparent;
}

.fi-tabs .fi-tabs-item.fi-active .fi-tabs-item-label {
    color: #9c2f83;
    font-weight: 600;
}

.fi-tabs .fi-tabs-item .fi-badge {
    background-color: #f1f1f3;
    color: #4b4b52;
}

/* Links between records (App\Filament\Support\Link). */
.cz-link {
    color: #9c2f83;
    font-weight: 500;
}

.cz-link:hover {
    text-decoration: underline;
}

/*
 * Motion: short, quiet transitions so the panel feels smooth. Off for anyone whose
 * system asks for reduced motion.
 */
@media (prefers-reduced-motion: no-preference) {
    .fi-main {
        animation: cz-enter 180ms ease-out;
    }

    @keyframes cz-enter {
        from {
            opacity: 0;
            transform: translateY(4px);
        }

        to {
            opacity: 1;
            transform: none;
        }
    }

    .fi-btn,
    .fi-icon-btn,
    .fi-link,
    .fi-badge,
    .fi-input-wrp,
    .fi-tabs-item,
    .fi-sidebar-item-btn,
    .fi-dropdown-list-item,
    .fi-pagination-item-btn,
    .fi-ta-row,
    .fi-ta-cell,
    .cz-link,
    .cz-crumbs a,
    .cz-sidebar-toggle,
    .cz-roles-card,
    .cz-roles-card label {
        transition:
            background-color 150ms ease,
            color 150ms ease,
            border-color 150ms ease,
            box-shadow 150ms ease,
            opacity 150ms ease,
            transform 150ms ease;
    }

    .fi-btn:active,
    .fi-icon-btn:active,
    .cz-sidebar-toggle:active {
        transform: scale(0.97);
    }

    .fi-sidebar,
    .fi-main-ctn {
        transition: width 200ms ease, margin 200ms ease, padding 200ms ease;
    }

    /*
     * Backwards, not both: an animation still applied after it ends keeps each card its own
     * stacking layer, so the next card covered an open dropdown (the shipping country list).
     */
    .fi-section,
    .fi-ta-ctn,
    .fi-wi-stats-overview-stat {
        animation: cz-enter 220ms ease-out backwards;
    }
}

.cz-sidebar-toggle:hover {
    background-color: #f7f7f8;
}

/* Role page permissions (roles/permissions.blade.php): a section per sidebar group, a card per area. */
.cz-roles {
    display: grid;
    gap: 1.5rem;
}

.cz-roles-section > summary {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    list-style: none;
}

.cz-roles-section > summary::-webkit-details-marker {
    display: none;
}

.cz-roles-section > summary::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid #6b6b73;
    border-bottom: 2px solid #6b6b73;
    transform: translateY(-0.15rem) rotate(-45deg);
    transition: transform 150ms ease;
}

.cz-roles-section[open] > summary::before {
    transform: translateY(-0.25rem) rotate(45deg);
}

.cz-roles-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #323237;
}

.cz-roles-section-hint {
    font-size: 0.8125rem;
    color: #6b6b73;
}

.cz-roles-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}

.cz-roles-card {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 1px solid #e4e4e7;
    border-radius: 0.75rem;
    background-color: #ffffff;
    overflow: hidden;
}

.cz-roles-card-head {
    float: left;
    width: 100%;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e4e4e7;
    background-color: #fafafa;
    font-size: 0.875rem;
    font-weight: 600;
    color: #323237;
}

.cz-roles-card-body {
    clear: both;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    padding: 0.75rem 1rem 1rem;
    font-size: 0.875rem;
    color: #323237;
}

.cz-roles-card label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.cz-roles-card input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #b24598;
}

.cz-roles-card input[type="checkbox"]:disabled,
.cz-roles-card input[type="checkbox"]:disabled + span {
    cursor: default;
}

.cz-roles-card:hover {
    border-color: #d4d4d8;
}

/*
 * Page editor: the language switch (language-switch.blade.php) stays in view while
 * scrolling a long page. Sticky goes on its grid cell, whose containing block is the form.
 */
.fi-grid-col:has(.cz-language-bar) {
    position: sticky;
    top: 4rem;
    z-index: 15;
}

.cz-language-bar {
    box-shadow: 0 4px 12px rgba(50, 50, 55, 0.06);
}

.cz-lang {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.cz-lang-label {
    font-size: 0.8125rem;
    font-weight: 600;
}

.cz-lang-options {
    display: inline-flex;
    padding: 0.1875rem;
    border: 1px solid #d4d4d8;
    border-radius: 0.5rem;
    background-color: #ffffff;
}

.cz-lang-option {
    height: 1.875rem;
    padding: 0 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #4b4b52;
}

.cz-lang-option:hover {
    background-color: #f7f7f8;
}

.cz-lang-option.cz-lang-active {
    background-color: #b24598;
    color: #ffffff;
    font-weight: 600;
}

.cz-lang-hint {
    font-size: 0.75rem;
    color: #6b6b73;
}

/* Inside the section side panel the switch sits on a light band above the fields. */
.fi-modal .cz-lang {
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    background-color: #f7f7f8;
}

/*
 * Sections list: each section a distinct card. Spacing stays Filament's own (1rem): the
 * "Insert between blocks" button overlaps the next card's top edge so the mouse can reach
 * it without losing hover; any extra gap leaves a dead zone and the button vanishes.
 * It also shows while the card above is hovered, so it can be reached from either side.
 */
.fi-fo-builder .fi-fo-builder-item:hover + .fi-fo-builder-add-between-items-ctn {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
}

.fi-fo-builder-item {
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px rgba(50, 50, 55, 0.06);
}

.fi-fo-builder-item:hover {
    box-shadow: 0 6px 18px rgba(50, 50, 55, 0.1);
}

.fi-fo-builder-item-header {
    background-color: #fafafa;
    border-radius: 0.75rem 0.75rem 0 0;
}

.fi-fo-builder-item-header-label {
    font-weight: 600;
}

.fi-fo-builder-item-header-icon {
    padding: 0.25rem;
    border-radius: 0.375rem;
    background-color: #f9eef6;
    color: #9c2f83;
    box-sizing: content-box;
}

.fi-fo-builder-item-preview {
    cursor: pointer;
    padding: 0.875rem 1rem 1rem;
}

.fi-fo-builder-item {
    border: 1px solid #e4e4e7;
    background-color: #ffffff;
}

/* Preview cards (page-blocks/_card.blade.php): a sketch of each section, not the real site. */
.cz-pb {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.25rem 0;
    font-size: 0.8125rem;
    color: #323237;
}

.cz-pb-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
}

.cz-pb-group,
.cz-pb-chip {
    padding: 0.0625rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.cz-pb-group-merch {
    background-color: #f9eef6;
    color: #9c2f83;
}

.cz-pb-group-content {
    background-color: #dbeafe;
    color: #1e40af;
}

.cz-pb-chip {
    background-color: #f1f1f3;
    color: #4b4b52;
}

.cz-pb-edit-hint {
    margin-inline-start: auto;
    font-size: 0.75rem;
    color: #6b6b73;
    opacity: 0;
}

.fi-fo-builder-item:hover .cz-pb-edit-hint {
    opacity: 1;
}

.cz-pb-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cz-pb-theme-primary { background-color: #9c2f83; color: #ffffff; }
.cz-pb-theme-dark { background-color: #323237; color: #ffffff; }
.cz-pb-theme-gold { background-color: #edb900; color: #322400; }
.cz-pb-theme-light { background-color: #f7f7f8; color: #323237; }

.cz-pb-has-image {
    position: relative;
    background-size: cover;
    background-position: center;
    color: #ffffff;
}

.cz-pb-has-image::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-color: rgba(29, 29, 33, 0.55);
}

.cz-pb-has-image > * {
    position: relative;
}

.cz-pb-hero {
    display: flex;
    align-items: center;
    min-height: 8.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: 0.625rem;
}

.cz-pb-hero-text {
    max-width: 32rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.cz-pb-eyebrow {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cz-pb-hero-heading {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
}

.cz-pb-hero-copy {
    font-size: 0.75rem;
}

.cz-pb-button {
    margin-top: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background-color: #edb900;
    color: #322400;
    font-size: 0.75rem;
    font-weight: 600;
}

.cz-pb-theme-gold .cz-pb-button {
    background-color: #323237;
    color: #ffffff;
}

.cz-pb-button-sm {
    font-size: 0.6875rem;
    padding: 0.125rem 0.625rem;
}

.cz-pb-slide-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    font-size: 0.75rem;
    color: #4b4b52;
}

.cz-pb-banners {
    display: grid;
    grid-template-columns: repeat(var(--cz-cols, 2), minmax(0, 1fr));
    gap: 0.5rem;
}

.cz-pb-banner {
    min-height: 4.5rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
}

.cz-pb-banner-heading {
    font-weight: 700;
}

.cz-pb-heading-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.cz-pb-heading {
    font-size: 0.9375rem;
    font-weight: 700;
}

.cz-pb-link {
    color: #9c2f83;
    font-weight: 600;
    font-size: 0.75rem;
}

.cz-pb-source {
    font-size: 0.75rem;
    color: #6b6b73;
}

.cz-pb-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(5.5rem, 6.5rem));
    gap: 0.5rem;
}

.cz-pb-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.375rem;
    border: 1px solid #e4e4e7;
    border-radius: 0.5rem;
}

.cz-pb-card-img,
.cz-pb-tile-img {
    aspect-ratio: 1;
    border-radius: 0.375rem;
    background-color: #f1f1f3;
}

.cz-pb-line {
    display: block;
    height: 0.375rem;
    border-radius: 999px;
    background-color: #e4e4e7;
}

.cz-pb-line-short {
    width: 45%;
    background-color: #e8bcd9;
}

.cz-pb-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(5rem, 6rem));
    gap: 0.5rem;
}

.cz-pb-tile {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 0.375rem;
    border: 1px solid #e4e4e7;
    border-radius: 0.5rem;
    text-align: center;
}

.cz-pb-tile-name {
    font-size: 0.6875rem;
    font-weight: 500;
}

.cz-pb-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.cz-pb-pill {
    min-width: 4.5rem;
    padding: 0.3125rem 0.75rem;
    border: 1px solid #d4d4d8;
    border-radius: 999px;
    font-size: 0.75rem;
}

.cz-pb-prose {
    max-width: 48rem;
    line-height: 1.55;
    color: #323237;
}

.cz-pb-prose-muted {
    color: #4b4b52;
    font-family: ui-monospace, Menlo, monospace;
    font-size: 0.75rem;
}

.cz-pb-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 7rem;
    max-height: 12rem;
    overflow: hidden;
    border-radius: 0.5rem;
    background-color: #f1f1f3;
}

.cz-pb-image img {
    width: 100%;
    max-height: 12rem;
    object-fit: cover;
}

.cz-pb-image-sm {
    min-height: 5.5rem;
}

.cz-pb-image-empty {
    font-size: 0.75rem;
    color: #6b6b73;
}

.cz-pb-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 0.75rem;
    align-items: center;
}

.cz-pb-split-right > :first-child {
    order: 2;
}

.cz-pb-faq {
    display: flex;
    flex-direction: column;
}

.cz-pb-faq li {
    display: flex;
    justify-content: space-between;
    padding: 0.375rem 0;
    border-bottom: 1px solid #f0f0f2;
}

.cz-pb-video {
    position: relative;
    width: 14rem;
    aspect-ratio: 16 / 9;
    border-radius: 0.5rem;
    background-color: #323237;
    background-size: cover;
    background-position: center;
}

.cz-pb-play {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 2.25rem;
    height: 2.25rem;
    margin: -1.125rem 0 0 -1.125rem;
    border-radius: 999px;
    background-color: #b24598;
}

.cz-pb-play::after {
    content: "";
    position: absolute;
    left: 0.875rem;
    top: 0.625rem;
    border-style: solid;
    border-width: 0.5rem 0 0.5rem 0.75rem;
    border-color: transparent transparent transparent #ffffff;
}

.cz-pb-empty {
    font-size: 0.75rem;
    color: #6b6b73;
}

.cz-pb-hero-row {
    display: grid;
    gap: 0.5rem;
}

.cz-pb-hero-split {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}

.cz-pb-side-tiles {
    display: grid;
    gap: 0.5rem;
}

.cz-pb-side-tiles .cz-pb-banner {
    min-height: 0;
}

.cz-pb-banners-card .cz-pb-banner {
    justify-content: flex-start;
    min-height: 5.5rem;
    border-bottom: 2.25rem solid #ffffff;
    box-shadow: 0 0 0 1px #e4e4e7;
}

.cz-pb-card-img {
    position: relative;
}

.cz-pb-card-badge {
    position: absolute;
    top: 0.25rem;
    left: 0.25rem;
    padding: 0 0.3125rem;
    border-radius: 0.25rem;
    background-color: #991b1b;
    color: #ffffff;
    font-size: 0.625rem;
    font-weight: 700;
}

.cz-pb-card-note {
    font-size: 0.625rem;
    font-weight: 600;
    color: #4b4b52;
}

.cz-pb-card-note-deal {
    color: #991b1b;
}

.cz-pb-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background-color: #f9eef6;
}

.cz-pb-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #9c2f83;
}

.cz-pb-trust-icon {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background-color: #b24598;
}

.cz-pb-sellers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 11rem));
    gap: 0.5rem;
}

.cz-pb-seller {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 0.375rem;
    border: 1px solid #e4e4e7;
    border-radius: 0.5rem;
}

.cz-pb-seller-photos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.25rem;
}

.cz-pb-seller-photos span {
    aspect-ratio: 1;
    border-radius: 0.25rem;
    background-color: #f1f1f3;
}

.cz-pb-seller-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.cz-pb-seller-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background-color: #9c2f83;
    color: #ffffff;
    font-size: 0.6875rem;
    font-weight: 700;
}

.cz-pb-seller-row .cz-pb-line {
    flex: 1 1 auto;
}

.cz-pb-collection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 0.5rem;
}

.cz-pb-collection .cz-pb-banner {
    min-height: 7rem;
}

.cz-pb-collection-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem;
}

.cz-pb-button-outline {
    background-color: transparent;
    border: 1px solid #323237;
    color: #323237;
}

.cz-pb-band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
}

@media (prefers-reduced-motion: no-preference) {
    .fi-fo-builder-item,
    .cz-pb-edit-hint,
    .cz-lang-option {
        transition: box-shadow 150ms ease, opacity 150ms ease, background-color 150ms ease, color 150ms ease;
    }
}

/* Translatable fields: a language that is not being edited takes no space at all. */
.fi-grid-col:has(> .fi-sc-component > .fi-fo-field[style*="display: none"]) {
    display: none;
}

/* Character counters under translatable fields (Translatable::withCounter). */
.cz-counter {
    display: block;
    width: 100%;
    margin-inline-start: auto;
    text-align: end;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    color: #6b6b73;
}

.cz-counter.cz-counter-near {
    color: #854d0e;
    font-weight: 600;
}

/* Google result preview (pages/seo-preview.blade.php). Google's own colours, all AA on white. */
.cz-serp-label {
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #323237;
}

.cz-serp-result {
    padding: 1rem;
    border: 1px solid #e4e4e7;
    border-radius: 0.75rem;
    background-color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
}

.cz-serp-site {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.cz-serp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    background-color: #9c2f83;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.8125rem;
}

.cz-serp-name {
    display: block;
    font-size: 0.875rem;
    color: #202124;
}

.cz-serp-url {
    display: block;
    font-size: 0.75rem;
    color: #4d5156;
    word-break: break-all;
}

.cz-serp-title {
    margin-top: 0.5rem;
    font-size: 1.25rem;
    line-height: 1.3;
    color: #1a0dab;
}

.cz-serp-description {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #4d5156;
}

.cz-serp-fallback span:first-child {
    font-style: italic;
}

.cz-serp-note {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #6b6b73;
}

/* Below a field, Filament's inline row sizes the counter to its text; let it span the row. */
.fi-sc.fi-inline > div:has(.cz-counter) {
    flex: 1 1 auto;
}

/* Order page: History as a timeline, latest first (filament/staff/orders/history.blade.php). */
.cz-quiet {
    font-size: 0.875rem;
    color: #6b6b73;
}

.cz-timeline {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cz-timeline-item {
    position: relative;
    display: flex;
    gap: 0.875rem;
    padding-bottom: 1rem;
}

.cz-timeline-item:last-child {
    padding-bottom: 0;
}

/* The line joining the dots, stopping at the last one. */
.cz-timeline-item:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 0.875rem;
    bottom: 0;
    left: 0.3125rem;
    width: 1px;
    background-color: #e4e4e7;
}

.cz-timeline-dot {
    position: relative;
    flex: none;
    width: 0.6875rem;
    height: 0.6875rem;
    margin-top: 0.3125rem;
    border: 2px solid #85858d;
    border-radius: 999px;
    background-color: #ffffff;
}

.cz-timeline-latest .cz-timeline-dot {
    border-color: #b24598;
    background-color: #b24598;
    box-shadow: 0 0 0 3px #f9eef6;
}

.cz-timeline-body {
    flex: 1 1 auto;
    min-width: 0;
}

.cz-timeline-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.25rem 1rem;
}

.cz-timeline-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #323237;
}

.cz-timeline-time {
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    color: #6b6b73;
}

.cz-timeline-detail {
    margin-top: 0.125rem;
    font-size: 0.8125rem;
    color: #4b4b52;
    overflow-wrap: anywhere;
}

.cz-timeline-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: #6b6b73;
}

.cz-chip {
    padding: 0.0625rem 0.5rem;
    border: 1px solid #e4e4e7;
    border-radius: 999px;
    background-color: #f7f7f8;
    color: #4b4b52;
    font-variant-numeric: tabular-nums;
}

/* Order page: Journey, one folding panel per visit (filament/staff/orders/journey.blade.php). */
.cz-journey {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cz-visit {
    border: 1px solid #e4e4e7;
    border-radius: 0.5rem;
    background-color: #ffffff;
    overflow: hidden;
}

.cz-visit-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: start;
    color: #323237;
    background-color: #ffffff;
    cursor: pointer;
}

.cz-visit-head:hover {
    background-color: #f7f7f8;
}

.cz-visit-head:focus-visible {
    outline: 2px solid #b24598;
    outline-offset: -2px;
}

.cz-visit-chevron {
    flex: none;
    width: 1.125rem;
    height: 1.125rem;
    color: #4b4b52;
}

.cz-visit-chevron-open {
    transform: rotate(90deg);
}

.cz-visit-main {
    display: flex;
    flex: 1 1 16rem;
    flex-direction: column;
    min-width: 0;
}

.cz-visit-when {
    font-size: 0.875rem;
    font-weight: 600;
}

.cz-visit-touch {
    font-size: 0.8125rem;
    color: #6b6b73;
    overflow-wrap: anywhere;
}

.cz-visit-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.cz-visit-count {
    margin-inline-start: auto;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    color: #6b6b73;
    white-space: nowrap;
}

.cz-visit-body {
    padding: 0 1rem 0.75rem;
    border-top: 1px solid #e4e4e7;
    overflow-x: auto;
}

.cz-visit-events {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.cz-visit-events th {
    padding: 0.5rem 0.75rem 0.5rem 0;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: start;
    color: #4b4b52;
    border-bottom: 1px solid #e4e4e7;
}

.cz-visit-events td {
    padding: 0.4375rem 0.75rem 0.4375rem 0;
    color: #4b4b52;
    border-bottom: 1px solid #f0f0f2;
    vertical-align: top;
}

.cz-visit-events tr:last-child td {
    border-bottom: 0;
}

.cz-visit-time {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.cz-visit-type {
    font-weight: 600;
    color: #323237 !important;
    white-space: nowrap;
}

.cz-visit-path {
    overflow-wrap: anywhere;
}

.cz-visit-more {
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

@media (prefers-reduced-motion: no-preference) {
    .cz-visit-head,
    .cz-visit-chevron {
        transition: background-color 150ms ease, transform 200ms ease;
    }
}

/* Staff signed in as a seller (resources/views/filament/seller/impersonating.blade.php): a full-width
   strip above the panel, gold fill with dark text (CLAUDE.md "Colour and contrast": #322400 on #edb900). */
.cz-impersonating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 16px;
    padding: 8px 16px;
    background: #edb900;
    color: #322400;
    font-size: 13px;
}
.cz-impersonating form { margin: 0; }
.cz-impersonating button {
    height: 28px;
    padding: 0 12px;
    border: 1px solid #322400;
    border-radius: 8px;
    background: #ffffff;
    color: #322400;
    font-weight: 600;
    cursor: pointer;
}
@media (prefers-reduced-motion: no-preference) {
    .cz-impersonating button { transition: background-color 150ms ease, transform 150ms ease; }
    .cz-impersonating button:hover { background: #fff8e1; }
    .cz-impersonating button:active { transform: scale(0.97); }
}

/* The seller closed their store (seller panel, every page). Brand purple, white text 6.7:1. */
.cz-store-closed {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 16px;
    padding: 8px 16px;
    background: #9c2f83;
    color: #ffffff;
    font-size: 13px;
}
.cz-store-closed a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Logo area: the storefront's logo on the storefront header's purple (primary-700), so its light
   letters read as they do on the site; 56px like our top bar, so their borders line up. */
.fi-sidebar-header {
    height: 3.5rem;
    background-color: #9c2f83;
    border-bottom: 1px solid #7d2369;
}
.fi-sidebar-header .fi-logo {
    height: 2.25rem;
}
/* The collapsed mark sits on the purple too: white tile, purple letter (6.7:1). */
.fi-sidebar-header .cz-mark {
    background-color: #ffffff;
    color: #9c2f83;
}

/* A long product description scrolls inside its editor, so the page under it stays in reach. */
.cz-editor-long .fi-fo-rich-editor-content {
    max-height: 18rem;
    overflow-y: auto;
}

/* Folding guides (bulk upload) open and close smoothly, where the browser can animate to auto height. */
.cz-guide {
    interpolate-size: allow-keywords;
}

.cz-guide::details-content {
    height: 0;
    overflow: clip;
    transition: height 0.25s ease, content-visibility 0.25s allow-discrete;
}

.cz-guide[open]::details-content {
    height: auto;
}

@media (prefers-reduced-motion: reduce) {
    .cz-guide::details-content {
        transition: none;
    }
}

/* Product gallery cards slide when one is made main or removed (view transitions). */
::view-transition-group(*) {
    animation-duration: 0.25s;
}

/* Seller onboarding once sent (Seller\Pages\Onboarding): every step shows its tick as completed, the open one too. */
.cz-wizard-sent .fi-sc-wizard-header-step .fi-sc-wizard-header-step-btn .fi-sc-wizard-header-step-icon-ctn {
    background-color: var(--primary-600);
    border-color: var(--primary-600);
}
.cz-wizard-sent .fi-sc-wizard-header-step .fi-sc-wizard-header-step-btn .fi-sc-wizard-header-step-icon-ctn .fi-icon {
    color: var(--color-white);
}
.dark .cz-wizard-sent .fi-sc-wizard-header-step .fi-sc-wizard-header-step-btn .fi-sc-wizard-header-step-icon-ctn {
    background-color: var(--primary-500);
    border-color: var(--primary-500);
}

/*
 * Loading skeletons for lazy dashboard widgets (filament/staff/widgets/*-placeholder.blade.php):
 * grey shapes where the content will be, with a soft shimmer (still for reduced motion).
 */
.cz-skeleton-stats {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .cz-skeleton-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.cz-skeleton-card {
    border-radius: 0.75rem;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    outline: 1px solid rgba(9, 9, 11, 0.05);
}

.cz-skeleton-tile {
    display: grid;
    gap: 0.875rem;
    padding: 1.5rem;
    min-height: 8.25rem;
    align-content: start;
}

.cz-skeleton-head {
    display: grid;
    gap: 0.625rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f1f3;
}

.cz-skeleton-row {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.875rem 1.5rem;
    border-bottom: 1px solid #f4f4f5;
}

.cz-skeleton-row:last-child {
    border-bottom: 0;
}

.cz-skeleton {
    min-width: 0;
    overflow: hidden;
}

.cz-skeleton-bar {
    display: block;
    max-width: 100%;
    height: 0.75rem;
    border-radius: 999px;
    background: #ececef linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0) 100%) no-repeat;
    background-size: 40% 100%;
    background-position: -150% 0;
}

.cz-skeleton-bar-lg {
    height: 1.5rem;
    border-radius: 0.5rem;
}

@media (prefers-reduced-motion: no-preference) {
    .cz-skeleton-bar {
        animation: cz-shimmer 1.4s ease-in-out infinite;
    }
}

@keyframes cz-shimmer {
    to {
        background-position: 250% 0;
    }
}

/* Menu editor (filament/content/menu-tree-level.blade.php): a card per item, dragged by its handle, its items
   nested under it. Text pairs pass 4.5:1 (purple #9c2f83, green #166534 on #dcfce7, grey #52525b on #f4f4f5). */
.cz-menu-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
}

.cz-menu-text-btn {
    color: #9c2f83;
    font-weight: 600;
}

.cz-menu-text-btn:hover {
    text-decoration: underline;
}

.cz-menu-hint {
    color: #6b6b73;
}

.cz-menu-level {
    display: grid;
    gap: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Under a card: indented, and a drop target even when empty. */
.cz-menu-children > .cz-menu-level {
    margin-top: 0.5rem;
    margin-inline-start: 2rem;
}

.cz-menu-children.is-folded > .cz-menu-level:not(.is-empty) {
    display: none;
}

.cz-menu-children:not(.is-folded) > .cz-menu-level:not(.is-empty) {
    animation: cz-menu-unfold 150ms ease-out;
}

@keyframes cz-menu-unfold {
    from {
        opacity: 0;
        transform: translateY(-0.25rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cz-menu-children:not(.is-folded) > .cz-menu-level:not(.is-empty) {
        animation: none;
    }
}

.cz-menu-children > .cz-menu-level.is-empty {
    margin-top: 0;
    min-height: 0;
}

.cz-menu-dragging .cz-menu-children > .cz-menu-level.is-empty {
    min-height: 0.75rem;
    margin-top: 0.25rem;
    border: 1px dashed #d4d4d8;
    border-radius: 0.5rem;
}

.cz-menu-card {
    display: flex;
    align-items: center;
    gap: 0.25rem 0.75rem;
    min-height: 3rem;
    padding: 0.375rem 0.75rem 0.375rem 0.375rem;
    border: 1px solid #d4d4d8;
    border-radius: 0.625rem;
    background-color: #fff;
    transition: border-color 150ms, box-shadow 150ms;
}

.cz-menu-card:hover {
    border-color: #85858d;
}

.cz-menu-card.is-hidden .cz-menu-name {
    color: #6b6b73;
}

/* The card being dragged leaves a faint copy where it will land. */
.cz-menu-ghost > .cz-menu-card {
    border-style: dashed;
    border-color: #b24598;
    background-color: #fdf4fb;
    opacity: 0.7;
}

.cz-menu-handle,
.cz-menu-fold {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.375rem;
    color: #85858d;
}

.cz-menu-handle {
    cursor: grab;
}

.cz-menu-handle:active {
    cursor: grabbing;
}

.cz-menu-handle::before,
.cz-menu-fold::before {
    content: "";
    width: 1.125rem;
    height: 1.125rem;
    background-color: currentColor;
    mask: var(--cz-icon) center / contain no-repeat;
    -webkit-mask: var(--cz-icon) center / contain no-repeat;
}

.cz-menu-handle { --cz-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='black'%3E %3Ccircle cx='7' cy='4.5' r='1.5'/%3E %3Ccircle cx='13' cy='4.5' r='1.5'/%3E %3Ccircle cx='7' cy='10' r='1.5'/%3E %3Ccircle cx='13' cy='10' r='1.5'/%3E %3Ccircle cx='7' cy='15.5' r='1.5'/%3E %3Ccircle cx='13' cy='15.5' r='1.5'/%3E %3C/svg%3E"); }

.cz-menu-fold { --cz-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='black'%3E %3Cpath fill-rule='evenodd' d='M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z' clip-rule='evenodd'/%3E %3C/svg%3E"); }

.cz-menu-fold::before {
    transition: transform 150ms;
}

.cz-menu-fold.is-open::before {
    transform: rotate(90deg);
}

.cz-menu-handle:hover,
.cz-menu-fold:hover {
    background-color: #f1f1f3;
    color: #323237;
}

.cz-menu-handle:focus-visible,
.cz-menu-fold:focus-visible,
.cz-menu-status:focus-visible {
    outline: 2px solid #b24598;
    outline-offset: 1px;
}

.cz-menu-fold-space {
    flex: none;
    width: 1.75rem;
}

/* Name, what it opens and how many under it: shrinks first, a long link cut with "..." (full text on hover). */
.cz-menu-label {
    display: flex;
    flex: 1 1 auto;
    align-items: baseline;
    gap: 0.75rem;
    min-width: 0;
}

.cz-menu-name {
    flex: none;
    max-width: 50%;
    overflow: hidden;
    color: #323237;
    font-size: 0.9375rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cz-menu-count {
    flex: none;
}

.cz-menu-target {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #9c2f83;
    font-size: 0.8125rem;
    font-weight: 600;
}

.cz-menu-target.is-missing {
    color: #b91c1c;
}

.cz-menu-count {
    color: #6b6b73;
    font-size: 0.8125rem;
}

.cz-menu-actions {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 0.25rem;
    margin-inline-start: auto;
}

/* Phones: the label takes its own line above the buttons. */
@media (max-width: 640px) {
    .cz-menu-card {
        flex-wrap: wrap;
    }

    .cz-menu-label {
        flex-basis: calc(100% - 4rem);
        flex-wrap: wrap;
        gap: 0 0.5rem;
    }

    .cz-menu-name {
        max-width: 100%;
    }
}

.cz-menu-status {
    margin-inline-end: 0.25rem;
    padding: 0.125rem 0.625rem;
    border-radius: 999px;
    background-color: #f4f4f5;
    color: #52525b;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: background-color 150ms;
}

.cz-menu-status.is-live {
    background-color: #dcfce7;
    color: #166534;
}

button.cz-menu-status:hover {
    background-color: #e4e4e7;
}

button.cz-menu-status.is-live:hover {
    background-color: #bbf7d0;
}

.cz-menu-btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.375rem;
    color: #6b6b73;
    cursor: pointer;
}

.cz-menu-btn::before {
    content: "";
    display: block;
    width: 1rem;
    height: 1rem;
    margin: auto;
    background-color: currentColor;
    mask: var(--cz-icon) center / contain no-repeat;
}

.cz-menu-btn:hover {
    background-color: #f1f1f3;
    color: #323237;
}

.cz-menu-btn:focus-visible {
    outline: 2px solid #b24598;
    outline-offset: 1px;
}

.cz-menu-btn:disabled {
    opacity: 0.35;
    cursor: default;
    background-color: transparent;
}

.cz-menu-btn[data-a="editItem"] { --cz-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='black'%3E %3Cpath d='m5.433 13.917 1.262-3.155A4 4 0 0 1 7.58 9.42l6.92-6.918a2.121 2.121 0 0 1 3 3l-6.92 6.918c-.383.383-.84.685-1.343.886l-3.154 1.262a.5.5 0 0 1-.65-.65Z'/%3E %3Cpath d='M3.5 5.75c0-.69.56-1.25 1.25-1.25H10A.75.75 0 0 0 10 3H4.75A2.75 2.75 0 0 0 2 5.75v9.5A2.75 2.75 0 0 0 4.75 18h9.5A2.75 2.75 0 0 0 17 15.25V10a.75.75 0 0 0-1.5 0v5.25c0 .69-.56 1.25-1.25 1.25h-9.5c-.69 0-1.25-.56-1.25-1.25v-9.5Z'/%3E %3C/svg%3E"); }

.cz-menu-btn[data-a="addChild"] { --cz-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='black'%3E %3Cpath d='M10.75 4.75a.75.75 0 0 0-1.5 0v4.5h-4.5a.75.75 0 0 0 0 1.5h4.5v4.5a.75.75 0 0 0 1.5 0v-4.5h4.5a.75.75 0 0 0 0-1.5h-4.5v-4.5Z'/%3E %3C/svg%3E"); }

.cz-menu-btn[data-a="removeItem"] {
    color: #b91c1c;
}

.cz-menu-btn[data-a="removeItem"] { --cz-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='black'%3E %3Cpath fill-rule='evenodd' d='M8.75 1A2.75 2.75 0 0 0 6 3.75v.443c-.795.077-1.584.176-2.365.298a.75.75 0 1 0 .23 1.482l.149-.022.841 10.518A2.75 2.75 0 0 0 7.596 19h4.807a2.75 2.75 0 0 0 2.742-2.53l.841-10.52.149.023a.75.75 0 0 0 .23-1.482A41.03 41.03 0 0 0 14 4.193V3.75A2.75 2.75 0 0 0 11.25 1h-2.5ZM10 4c.84 0 1.673.025 2.5.075V3.75c0-.69-.56-1.25-1.25-1.25h-2.5c-.69 0-1.25.56-1.25 1.25v.325C8.327 4.025 9.16 4 10 4ZM8.58 7.72a.75.75 0 0 0-1.5.06l.3 7.5a.75.75 0 1 0 1.5-.06l-.3-7.5Zm4.34.06a.75.75 0 1 0-1.5-.06l-.3 7.5a.75.75 0 1 0 1.5.06l.3-7.5Z' clip-rule='evenodd'/%3E %3C/svg%3E"); }

/* Touch screens: the menu tree's buttons at a size a finger can hit. */
@media (pointer: coarse) {
    .cz-menu-btn,
    .cz-menu-handle,
    .cz-menu-fold {
        width: 2.5rem;
        height: 2.5rem;
    }
}

.cz-menu-orphans {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e4e4e7;
}

.cz-menu-orphans > summary {
    cursor: pointer;
    margin-bottom: 0.5rem;
    color: #52525b;
    font-size: 0.8125rem;
}

/* Code editor (the page builder's old-site HTML block). */
.fi-fo-code-editor .cm-editor {
    max-height: 32rem;
}

/* Wrap long lines: old CMS text often has whole paragraphs on one line. */
.fi-fo-code-editor .cm-content {
    /* As CodeMirror's own lineWrapping option (.cm-lineWrapping). */
    flex-shrink: 1;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}
