.seating-plan-widget,
.seating-plan-widget * {
    box-sizing: border-box;
}

.seating-plan-widget {
    border: 1px solid #d8d8d8;
    border-radius: 4px;
    margin: 18px 0 28px;
    overflow: hidden;
}

.seating-plan-toolbar {
    align-items: center;
    background: #f2f2f2;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 16px;
}

.seating-plan-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}

.seating-plan-tools {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.seating-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.seating-category-button {
    align-items: center;
    background: #fff;
    border: 1px solid #c9c9c9;
    border-radius: 4px;
    color: #333;
    display: inline-flex;
    font-size: 13px;
    gap: 6px;
    line-height: 1.2;
    min-height: 32px;
    padding: 5px 9px;
}

.seating-category-button:hover,
.seating-category-button:focus {
    border-color: #777;
}

.seating-category-button.is-active {
    border-color: #333;
    box-shadow: inset 0 0 0 1px #333;
}

.seating-category-swatch {
    border: 1px solid rgba(0, 0, 0, .25);
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
    height: 13px;
    width: 13px;
}

.seating-zoom-controls {
    display: inline-flex;
    white-space: nowrap;
}

.seating-map-frame .seating-zoom-controls {
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 3;
}

.seating-zoom-button {
    min-width: 36px;
}

.seating-zoom-reset {
    min-width: 54px;
}

.seating-plan-layout {
    background: #fff;
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr);
    min-height: 560px;
}

.seating-plan-map {
    min-width: 0;
    padding: 16px;
}

.seating-map-frame {
    min-height: 360px;
    position: relative;
}

.seating-map-scroll {
    background: #fff;
    max-height: min(74vh, 760px);
    max-width: 100%;
    overflow: auto;
    position: relative;
}

.seating-map-loading {
    align-items: center;
    background: rgba(255, 255, 255, .92);
    color: #555;
    display: flex;
    font-size: 15px;
    font-weight: 600;
    inset: 0;
    justify-content: center;
    min-height: 360px;
    padding: 24px;
    position: absolute;
    text-align: center;
    z-index: 2;
}

.seating-map-loading[hidden] {
    display: none;
}

.seating-map-loading.is-error {
    color: #a94442;
}

.seating-canvas-scale {
    min-height: 360px;
    position: relative;
}

.seating-map-background {
    height: 100%;
    left: 0;
    object-fit: contain;
    object-position: left top;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 0;
}

#myCanvas {
    display: block;
    position: relative;
    transform-origin: 0 0;
    z-index: 1;
}

.seating-plan-selection {
    background: #fff;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 18px 20px;
}

.seating-plan-selection-header {
    align-items: baseline;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.seating-plan-selection-header h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}

.seating-selection-count {
    color: #555;
    flex: 0 0 auto;
    font-size: 13px;
}

.seating-selection-empty {
    align-items: center;
    border: 1px dashed #d5d5d5;
    color: #777;
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    min-height: 150px;
    padding: 18px;
    text-align: center;
}

.seating-selection-empty[hidden] {
    display: none;
}

.seating-selection-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 18px;
}

.seating-selection-list:empty {
    display: none;
}

.seating-selected-seat {
    border-bottom: 1px solid #e3e3e3;
    padding: 12px 0;
}

.seating-selected-seat:first-child {
    padding-top: 0;
}

.seating-selected-seat-main {
    align-items: start;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.seating-selected-seat-name {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
}

.seating-selected-seat-category {
    color: #777;
    font-size: 13px;
    line-height: 1.3;
    margin-top: 2px;
}

.seating-selected-seat-price {
    font-weight: 700;
    line-height: 1.25;
    text-align: right;
    white-space: nowrap;
}

.seating-selected-seat-actions {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.seating-remove-seat {
    background: #fff;
    border: 1px solid #c8c8c8;
    border-radius: 3px;
    color: #333;
    height: 28px;
    line-height: 1;
    padding: 0;
    width: 28px;
}

.seating-remove-seat:hover,
.seating-remove-seat:focus {
    border-color: #777;
}

.seating-ticket-select {
    margin-top: 9px;
    width: 100%;
}

.seating-plan-add-to-cart {
    margin-top: auto;
    padding-top: 18px;
}

.seating-plan-add-to-cart .btn[disabled] {
    cursor: not-allowed;
    opacity: .55;
}

@media (max-width: 991px) {
    .seating-plan-layout {
        grid-template-columns: 1fr;
    }

    .seating-plan-selection {
        border-left: 0;
        border-top: 1px solid #e0e0e0;
    }
}

@media (max-width: 600px) {
    .seating-plan-toolbar {
        align-items: stretch;
    }

    .seating-plan-tools,
    .seating-category-filter {
        justify-content: flex-start;
        width: 100%;
    }

    .seating-plan-selection-header {
        align-items: start;
        flex-direction: column;
        gap: 4px;
    }
}
