/*
 * Restaurant structure pattern presentation.
 *
 * Native fixture CSS owns geometry/base artwork. This module owns only the
 * optional Pattern overlay so the venue editor, live board and public picker
 * render the same clean texture without competing background-image rules.
 */
.pxab-restaurant-floor-object--fixture > .pxab-restaurant-structure-pattern,
.pxab-restaurant-board-fixture > .pxab-restaurant-structure-pattern,
.pxab-restaurant-public-fixture > .pxab-restaurant-structure-pattern {
    --pxab-restaurant-structure-pattern-ink: color-mix(in srgb, var(--pxab-fixture-color, #64748b) 62%, var(--pxab-fixture-accent, #fff) 38%);
    --pxab-restaurant-structure-pattern-soft: color-mix(in srgb, var(--pxab-restaurant-structure-pattern-ink) 42%, transparent);
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    background-position: 0 0;
    background-repeat: repeat;
    background-size: var(--pxab-fixture-pattern-size, 12px) var(--pxab-fixture-pattern-size, 12px);
    pointer-events: none;
}

.pxab-restaurant-floor-object--fixture > .pxab-restaurant-floor-object__label,
.pxab-restaurant-board-fixture > .pxab-restaurant-board-fixture__label,
.pxab-restaurant-public-fixture > .pxab-restaurant-public-fixture__label {
    position: relative;
    z-index: 2;
}

.pxab-restaurant-floor-object--fixture[data-pxab-pattern="none"] > .pxab-restaurant-structure-pattern,
.pxab-restaurant-board-fixture[data-pxab-pattern="none"] > .pxab-restaurant-structure-pattern,
.pxab-restaurant-public-fixture[data-pxab-pattern="none"] > .pxab-restaurant-structure-pattern {
    background-image: none;
}

/* Fine architectural grid: one quiet 1px line per selected pattern size. */
.pxab-restaurant-floor-object--fixture[data-pxab-pattern="grid"] > .pxab-restaurant-structure-pattern,
.pxab-restaurant-board-fixture[data-pxab-pattern="grid"] > .pxab-restaurant-structure-pattern,
.pxab-restaurant-public-fixture[data-pxab-pattern="grid"] > .pxab-restaurant-structure-pattern {
    background-image:
        linear-gradient(var(--pxab-restaurant-structure-pattern-soft) 1px, transparent 1px),
        linear-gradient(90deg, var(--pxab-restaurant-structure-pattern-soft) 1px, transparent 1px);
}

/* Broad decorative bands, deliberately softer than warning stripes. */
.pxab-restaurant-floor-object--fixture[data-pxab-pattern="stripes"] > .pxab-restaurant-structure-pattern,
.pxab-restaurant-board-fixture[data-pxab-pattern="stripes"] > .pxab-restaurant-structure-pattern,
.pxab-restaurant-public-fixture[data-pxab-pattern="stripes"] > .pxab-restaurant-structure-pattern {
    background-image: linear-gradient(
        135deg,
        color-mix(in srgb, var(--pxab-restaurant-structure-pattern-ink) 30%, transparent) 0 24%,
        transparent 24% 50%,
        color-mix(in srgb, var(--pxab-restaurant-structure-pattern-ink) 30%, transparent) 50% 74%,
        transparent 74% 100%
    );
}

/* Thin single-direction hatch. This is intentionally not a second stripe fill. */
.pxab-restaurant-floor-object--fixture[data-pxab-pattern="diagonal"] > .pxab-restaurant-structure-pattern,
.pxab-restaurant-board-fixture[data-pxab-pattern="diagonal"] > .pxab-restaurant-structure-pattern,
.pxab-restaurant-public-fixture[data-pxab-pattern="diagonal"] > .pxab-restaurant-structure-pattern {
    background-image: linear-gradient(
        135deg,
        transparent 46%,
        color-mix(in srgb, var(--pxab-restaurant-structure-pattern-ink) 58%, transparent) 47% 53%,
        transparent 54%
    );
}

.pxab-restaurant-floor-object--fixture[data-pxab-pattern="crosshatch"] > .pxab-restaurant-structure-pattern,
.pxab-restaurant-board-fixture[data-pxab-pattern="crosshatch"] > .pxab-restaurant-structure-pattern,
.pxab-restaurant-public-fixture[data-pxab-pattern="crosshatch"] > .pxab-restaurant-structure-pattern {
    background-image:
        linear-gradient(45deg, transparent 47%, var(--pxab-restaurant-structure-pattern-soft) 48% 52%, transparent 53%),
        linear-gradient(135deg, transparent 47%, var(--pxab-restaurant-structure-pattern-soft) 48% 52%, transparent 53%);
}

.pxab-restaurant-floor-object--fixture[data-pxab-pattern="dots"] > .pxab-restaurant-structure-pattern,
.pxab-restaurant-board-fixture[data-pxab-pattern="dots"] > .pxab-restaurant-structure-pattern,
.pxab-restaurant-public-fixture[data-pxab-pattern="dots"] > .pxab-restaurant-structure-pattern {
    background-image: radial-gradient(circle, color-mix(in srgb, var(--pxab-restaurant-structure-pattern-ink) 58%, transparent) 0 1.5px, transparent 1.6px);
}

.pxab-restaurant-floor-object--fixture[data-pxab-pattern="checker"] > .pxab-restaurant-structure-pattern,
.pxab-restaurant-board-fixture[data-pxab-pattern="checker"] > .pxab-restaurant-structure-pattern,
.pxab-restaurant-public-fixture[data-pxab-pattern="checker"] > .pxab-restaurant-structure-pattern {
    background-image: conic-gradient(
        color-mix(in srgb, var(--pxab-restaurant-structure-pattern-ink) 28%, transparent) 25%,
        transparent 0 50%,
        color-mix(in srgb, var(--pxab-restaurant-structure-pattern-ink) 28%, transparent) 0 75%,
        transparent 0
    );
}

/* Tile lines are kept lighter than Grid so zones read as a surface, not graph paper. */
.pxab-restaurant-floor-object--fixture[data-pxab-pattern="tiles"] > .pxab-restaurant-structure-pattern,
.pxab-restaurant-board-fixture[data-pxab-pattern="tiles"] > .pxab-restaurant-structure-pattern,
.pxab-restaurant-public-fixture[data-pxab-pattern="tiles"] > .pxab-restaurant-structure-pattern {
    background-image:
        linear-gradient(90deg, color-mix(in srgb, var(--pxab-restaurant-structure-pattern-ink) 30%, transparent) 1px, transparent 1px),
        linear-gradient(color-mix(in srgb, var(--pxab-restaurant-structure-pattern-ink) 30%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, transparent 48%, color-mix(in srgb, var(--pxab-restaurant-structure-pattern-ink) 18%, transparent) 49% 51%, transparent 52%);
}

/* Warning is semantic, not decorative: retain crisp high-contrast hazard bars. */
.pxab-restaurant-floor-object--fixture[data-pxab-pattern="warning"] > .pxab-restaurant-structure-pattern,
.pxab-restaurant-board-fixture[data-pxab-pattern="warning"] > .pxab-restaurant-structure-pattern,
.pxab-restaurant-public-fixture[data-pxab-pattern="warning"] > .pxab-restaurant-structure-pattern {
    background-image: linear-gradient(135deg, #facc15 0 25%, #111827 25% 50%, #facc15 50% 75%, #111827 75% 100%);
}

/* Pattern overlays must follow the intentionally open L-shaped seating footprint. */
.pxab-restaurant-floor-object--built_in_corner_seating > .pxab-restaurant-structure-pattern,
.pxab-restaurant-board-fixture--built_in_corner_seating > .pxab-restaurant-structure-pattern,
.pxab-restaurant-public-fixture--built_in_corner_seating > .pxab-restaurant-structure-pattern {
    clip-path: polygon(0 0, 100% 0, 100% 22%, 22% 22%, 22% 100%, 0 100%);
}
