.grid-settings {
    margin-bottom: 1.25rem;
    padding: 0.9375rem;
    background: var(--color-surface);
    border-radius: 0.5rem;
    border: 0.0625rem solid var(--color-border);
}

.grid-settings button {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 0.4rem 0.5rem;
    border: none;
    border-radius: 0.6rem;
    font-size: 1em;
    font-weight: bold;
}

.grid-settings button:hover {
    background-color: var(--color-primary-hover);
}

.grid-settings input[type="number"] {
    width: 3.75rem;
}

.grid-settings #input-rows {
    margin-left: 0.625rem;
}

.grid-settings .separator {
    margin: 0 0.625rem;
}

.grid-settings #btn-create-grid {
    margin-left: 0.9375rem;
}

.palette {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
}

.tool-btn {
    padding: 0.5rem 0.75rem;
    border: 0.125rem solid transparent;
    cursor: pointer;
    border-radius: 0.375rem;
    font-weight: bold;
    font-size: 0.9rem;
}

.tool-btn.active {
    border-color: var(--color-black);
    border-width: 0.2rem;
    box-shadow: 0 0 1.1rem var(--shadow-strong);
}

.tool-empty {
    background: var(--color-surface);
    color: var(--color-text-primary);
    border: 0.0625rem solid var(--color-border);
}

.tool-stage {
    background: var(--color-seat-stage);
    color: var(--color-white);
}

.tool-table {
    background: var(--color-seat-table);
    color: var(--color-white);
}

.tool-seat-1 {
    background: var(--interactivity-index-1);
    color: var(--color-white);
}

.tool-seat-2 {
    background: var(--interactivity-index-2);
    color: var(--color-white);
}

.tool-seat-3 {
    background: var(--interactivity-index-3);
    color: var(--color-white);
}

.tool-seat-4 {
    background: var(--interactivity-index-4);
    color: var(--color-white);
}

.tool-seat-5 {
    background: var(--interactivity-index-5);
    color: var(--color-white);
}

.grid-wrapper {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    background: var(--color-white);
    padding: 0.625rem;
    border: 0.0625rem solid var(--color-border);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    margin-top: 1rem;
    box-sizing: border-box;
}

#grid-seating-plan {
    display: inline-grid;
    gap: 0.1875rem;
}

.grid-cell {
    width: 2.18rem;
    height: 2.18rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: crosshair;
    font-size: 1em;
    font-weight: bold;
    user-select: none;
}

.grid-cell.tool-table {
    border-radius: 50%;
}

@media (max-width: 768px) {
    .grid-cell {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.65rem;
    }

    #grid-seating-plan {
        gap: 0.12rem;
    }
}

.seat-map-legend {
    background: var(--color-surface);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.25rem;
    width: 18rem;
}

.seat-map-legend h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.seat-map-legend p {
    margin: 0 0 1rem 0;
}

.legend-scale {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1rem;
    list-style: none;
    padding: 0;
}

.legend-interaction {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--color-white);
}

.legend-interaction.interaction-1 {
    background: var(--interactivity-index-1);
    color: var(--color-text-primary);
}

.legend-interaction.interaction-2 {
    background: var(--interactivity-index-2);
    color: var(--color-text-primary);
}

.legend-interaction.interaction-3 {
    background: var(--interactivity-index-3);
    color: var(--color-text-primary);
}

.legend-interaction.interaction-4 {
    background: var(--interactivity-index-4);
    color: var(--color-text-primary);
}

.legend-interaction.interaction-5 {
    background: var(--interactivity-index-5);
    color: var(--color-text-primary);
}

.legend-labels {
    text-align: center;
    font-size: 1rem;
}

@media (max-width: 900px) {
    .seat-map-legend {
        padding: 1rem;
        width: auto;
    }

    .legend-scale {
        gap: 0.5rem;
    }

    .legend-interaction {
        width: 2.19rem;
        height: 2.19rem;
        font-size: 0.8rem;
    }
}

.legend-desc strong{
    font-weight: bold;
}