/* Pretix Seating Chart for WooCommerce & FooEvents */
body.pfs-has-seatmap form.cart,
body.pfs-has-seatmap .wp-block-add-to-cart-form form.cart,
body.pfs-has-seatmap .woocommerce-variation-add-to-cart {
    display: none !important;
}

.pfs-frontend-app {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
    margin: 20px 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.pfs-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13px;
    color: #334155;
    align-items: center;
}

.pfs-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 4px;
}
.pfs-dot-free { background: #48A6FF; }
.pfs-dot-selected { background: #16a34a; }
.pfs-dot-taken { background: #cbd5e1; }
.pfs-dot-blocked { background: #2c3338; }
.pfs-dot-booked { background: #d63638; }
.pfs-dot-cart { background: #dba617; }

.pfs-map-stage {
    position: relative;
    width: 100%;
    height: 520px;
    background: #ffffff;
    overflow: hidden;
    user-select: none;
    touch-action: none;
    cursor: grab;
}
.pfs-map-stage:active {
    cursor: grabbing;
}

@media (max-width: 640px) {
    .pfs-map-stage {
        height: 380px;
    }
}

.pfs-svg-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.pfs-loading, .pfs-empty-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #64748b;
    font-size: 14px;
}

.pfs-row-label {
    fill: #64748b;
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 500;
    pointer-events: none;
}

.pfs-seat {
    cursor: pointer;
    transition: opacity 0.15s ease;
}
.pfs-seat-pending {
    opacity: 0.45;
    pointer-events: none;
}
.pfs-seat-circle {
    stroke: rgba(0, 0, 0, 0.12);
    stroke-width: 1;
    transition: stroke-width 0.12s ease;
}
.pfs-seat-free:hover .pfs-seat-circle {
    stroke: #0f172a;
    stroke-width: 2;
}
.pfs-seat-selected .pfs-seat-circle {
    stroke: #14532d;
    stroke-width: 2.5;
}
.pfs-seat-taken {
    cursor: not-allowed;
    opacity: 0.65;
}
.pfs-seat-mine {
    cursor: default;
}
.pfs-seat-num {
    fill: #1e293b;
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 600;
    pointer-events: none;
}
.pfs-seat-selected .pfs-seat-num,
.pfs-seat-booked .pfs-seat-num,
.pfs-seat-blocked .pfs-seat-num,
.pfs-seat-mine .pfs-seat-num {
    fill: #ffffff;
}
.pfs-seat-taken .pfs-seat-num {
    fill: #64748b;
}

.pfs-tooltip {
    position: absolute;
    z-index: 20;
    background: #0f172a;
    color: #ffffff;
    font-size: 12px;
    line-height: 1.3;
    padding: 5px 10px;
    border-radius: 6px;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

/* Selection Panel (hidden until first seat is selected) */
.pfs-selection-panel {
    padding: 14px 16px 16px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.pfs-selection-header {
    margin-bottom: 10px;
    font-size: 13px;
    color: #475569;
    letter-spacing: 0.01em;
}

.pfs-selected-list {
    list-style: none !important;
    margin: 0 0 14px 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.pfs-seat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    margin: 0 !important;
}
.pfs-seat-row:last-child {
    border-bottom: none;
}

.pfs-seat-row-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.pfs-seat-row-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pfs-seat-row-text {
    font-size: 14px;
    color: #0f172a;
    font-weight: 500;
}

.pfs-seat-row-remove {
    all: unset;
    box-sizing: border-box !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 50% !important;
    background: #f1f5f9 !important;
    color: #64748b !important;
    font-size: 16px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: background-color 0.15s ease, color 0.15s ease !important;
}
.pfs-seat-row-remove:hover,
.pfs-seat-row-remove:focus {
    background: #ef4444 !important;
    color: #ffffff !important;
    outline: none !important;
}

.pfs-feedback {
    padding: 10px 14px;
    font-size: 13px;
    border-top: 1px solid #e2e8f0;
}
.pfs-feedback-success {
    background: #dcfce7;
    color: #166534;
}
.pfs-feedback-error {
    background: #fee2e2;
    color: #991b1b;
}
.pfs-feedback-links {
    margin-left: 10px;
    display: inline-flex;
    gap: 12px;
}
.pfs-feedback-links a {
    font-weight: 600;
    text-decoration: underline;
    color: inherit;
}

.pfs-actions {
    margin-top: 2px;
}

.pfs-submit-btn {
    width: 100% !important;
    padding: 12px 18px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    cursor: pointer;
    margin: 0 !important;
}
.pfs-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
