.restro-3d {
    position: relative;
    min-height: 420px;
    overflow: hidden;
    border: 1px solid #dfe7df;
    border-radius: 10px;
    background: linear-gradient(180deg, #fbfdfb 0%, #f3f7f2 100%);
    box-shadow: 0 18px 46px rgba(15, 23, 42, .08);
}

.restro-3d--multi-floor {
    min-height: 560px;
}

.restro-3d__scene,
.restro-3d__scene canvas,
.restro-3d__labels {
    position: absolute;
    inset: 0;
}

.restro-3d__floor-switcher {
    position: absolute;
    z-index: 5;
    top: 14px;
    left: 14px;
    display: flex;
    max-width: calc(100% - 28px);
    gap: 7px;
    overflow-x: auto;
    padding: 3px;
    scrollbar-width: thin;
}

.restro-3d-floor-button {
    flex: 0 0 auto;
    display: grid;
    gap: 1px;
    min-width: 124px;
    padding: 9px 11px;
    border: 1px solid rgba(33, 52, 42, .14);
    border-radius: 7px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 5px 16px rgba(28, 50, 38, .08);
    color: #34443b;
    text-align: left;
    backdrop-filter: blur(10px);
}

.restro-3d-floor-button strong {
    overflow: hidden;
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.restro-3d-floor-button span {
    color: #718078;
    font-size: 10px;
}

.restro-3d-floor-button.is-active {
    border-color: #2d7653;
    background: #edf8f1;
    box-shadow: 0 6px 20px rgba(31, 119, 78, .15);
    color: #1d6645;
}

.restro-3d__scene canvas {
    width: 100% !important;
    height: 100% !important;
}

.restro-3d__labels {
    pointer-events: none;
    z-index: 3;
}

.restro-3d-label {
    position: absolute;
    display: grid;
    min-width: 86px;
    max-width: 138px;
    gap: 1px;
    padding: 7px 9px 8px;
    transform: translate(-50%, -115%);
    border: 1px solid color-mix(in srgb, var(--table-status-color, #10b981) 52%, white);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .16);
    color: #111827;
    font: inherit;
    text-align: left;
    pointer-events: auto;
    transition: opacity .18s ease, transform .18s ease, box-shadow .18s ease;
}

.restro-3d-label::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    border-radius: 8px 0 0 8px;
    background: var(--table-status-color, #10b981);
}

.restro-3d-label:hover {
    transform: translate(-50%, -118%) scale(1.03);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .2);
}

.restro-3d-label[aria-pressed="true"] {
    border-color: #d99a17;
    box-shadow: 0 0 0 3px rgba(217, 154, 23, .2), 0 8px 22px rgba(39, 48, 43, .15);
}

.restro-3d-label:disabled {
    cursor: not-allowed;
    opacity: .82;
}

.restro-3d--mode-setup .restro-3d-label {
    min-width: 66px;
    max-width: 88px;
    padding: 5px 7px 6px;
}

.restro-3d--mode-setup .restro-3d-label strong {
    font-size: 11px;
}

.restro-3d--mode-setup .restro-3d-label span,
.restro-3d--mode-setup .restro-3d-label small {
    font-size: 8px;
}

.restro-3d-label strong,
.restro-3d-label span,
.restro-3d-label em,
.restro-3d-label small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.restro-3d-label strong {
    color: #111827;
    font-size: 13px;
    font-weight: 900;
}

.restro-3d-label span,
.restro-3d-label small {
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
}

.restro-3d-label__coverage {
    color: #176546 !important;
}

.restro-3d-label em {
    width: fit-content;
    margin-top: 3px;
    padding: 2px 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--table-status-color, #10b981) 14%, white);
    color: color-mix(in srgb, var(--table-status-color, #10b981) 76%, #111827);
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
    text-transform: uppercase;
}

.restro-3d-label--reserved em {
    color: #5b21b6;
    background: #ede9fe;
}

.restro-3d-label i {
    position: absolute;
    right: 7px;
    top: 7px;
    color: #0f766e;
    font-size: 12px;
}

.restro-3d-label.is-hidden,
.restro-3d-label.is-colliding {
    opacity: 0 !important;
    pointer-events: none;
}

.restro-3d-fallback {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 12px;
    padding: 16px;
}

.restro-3d-fallback-floor {
    padding: 14px;
    border-bottom: 1px solid #e2e8e4;
}

.restro-3d-fallback-floor > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #28372f;
}

.restro-3d-fallback-floor > header span {
    color: #75827b;
    font-size: 12px;
}

.restro-3d-card {
    position: relative;
    display: grid;
    gap: 4px;
    min-height: 104px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--table-status-color, #10b981) 46%, white);
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78)),
        color-mix(in srgb, var(--table-status-color, #10b981) 10%, white);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
    color: #111827;
    text-align: left;
}

.restro-3d-card::after {
    content: "";
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--table-status-color, #10b981);
    box-shadow:
        -26px 0 0 color-mix(in srgb, var(--table-status-color, #10b981) 62%, white),
        0 -26px 0 color-mix(in srgb, var(--table-status-color, #10b981) 62%, white);
    opacity: .24;
}

.restro-3d-card strong {
    font-size: 18px;
    font-weight: 900;
}

.restro-3d-card span,
.restro-3d-card small {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.restro-3d-card em {
    width: fit-content;
    padding: 3px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--table-status-color, #10b981) 14%, white);
    color: color-mix(in srgb, var(--table-status-color, #10b981) 72%, #111827);
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}

.restro-3d-mount--setup {
    min-height: 590px;
}

.restro-3d-mount--qr {
    min-height: 650px;
}

.restro-3d-mount--pos {
    min-height: 510px;
}

.restro-3d-mount--waiter {
    min-height: 420px;
}

.restro-3d-mount--lab {
    min-height: 360px;
}

@media (max-width: 768px) {
    .restro-3d,
    .restro-3d--multi-floor {
        min-height: 480px;
    }

    .restro-3d-label {
        min-width: 74px;
        max-width: 112px;
        padding: 6px 8px;
    }

    .restro-3d-label strong {
        font-size: 12px;
    }

    .restro-3d-floor-button {
        min-width: 110px;
        padding: 8px 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .restro-3d *,
    .restro-3d *::before,
    .restro-3d *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
