/* Admin CSS - Matrix Layout */

/* Container */
#buzzpct-builder-container {
    background: #fff;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    margin-top: 20px;
    padding: 0;
    /* Remove padding to let table maximize */
    overflow-x: auto;
    /* Allow horizontal scroll */
}

/* The Matrix Table */
.buzzpct-matrix-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.buzzpct-matrix-table th,
.buzzpct-matrix-table td {
    padding: 10px;
    border: 1px solid #e5e5e5;
    vertical-align: top;
    position: relative;
    /* For controls */
}

/* Sticky First Column (Labels) */
.buzzpct-matrix-table th:first-child,
.buzzpct-matrix-table td:first-child {
    position: sticky;
    left: 0;
    background: #f9f9f9;
    z-index: 10;
    width: 250px;
    min-width: 250px;
    border-right: 2px solid #ddd;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

.buzzpct-matrix-table th:first-child {
    z-index: 20;
    /* Keep header above body first cell */
}

/* Header Section (Products) */
.buzzpct-matrix-table thead th {
    background: #f0f0f1;
    color: #1d2327;
    font-weight: 600;
    text-align: left;
}

/* Product Property Rows in Head */
.buzzpct-matrix-prop-label {
    font-weight: 600;
    color: #50575e;
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
}

/* Inputs */
.buzzpct-matrix-table input[type="text"],
.buzzpct-matrix-table input[type="url"],
.buzzpct-matrix-table select {
    width: 100%;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 13px;
    background: #fff;
}

.buzzpct-matrix-table input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

/* Feature Rows */
.buzzpct-matrix-table tbody tr:hover td {
    background: #fafafa;
}

.buzzpct-feature-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.buzzpct-drag-handle {
    cursor: move;
    color: #aaa;
}

/* Action Buttons */
.buzzpct-action-bar {
    padding: 15px;
    background: #f0f0f1;
    border-top: 1px solid #ccd0d4;
    display: flex;
    gap: 10px;
}

.buzzpct-remove-btn {
    color: #d63638;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin-top: 5px;
    display: inline-block;
}

.buzzpct-remove-btn:hover {
    color: #b32d2e;
    text-decoration: underline;
}

/* Bool Toggle */
.buzzpct-bool-toggle {
    display: flex;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    overflow: hidden;
    width: fit-content;
}

.buzzpct-bool-btn {
    border: none;
    background: #f6f7f7;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.buzzpct-bool-btn.buzzpct-bool-yes {
    color: #ccc;
    border-right: 1px solid #8c8f94;
}

.buzzpct-bool-btn.buzzpct-bool-no {
    color: #ccc;
}

.buzzpct-bool-btn.active.buzzpct-bool-yes {
    background: #00a32a;
    color: #fff;
}

.buzzpct-bool-btn.active.buzzpct-bool-no {
    background: #d63638;
    color: #fff;
}

/* ==========================================================================
   v1.1.0 NEW STYLES
   ========================================================================== */

/* Toolbar (Export / Import) */
.buzzpct-toolbar {
    padding: 10px 15px;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    gap: 8px;
    align-items: center;
}

.buzzpct-import-label {
    cursor: pointer;
}

/* Column action buttons (move left/right + remove) */
.buzzpct-matrix-col-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

/* Product image upload area */
.buzzpct-product-image-wrap {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Group / section divider rows */
.buzzpct-group-row .buzzpct-group-cell {
    background: #f0f6fc;
    border-left: 3px solid #2271b1;
    padding: 8px 12px;
}

/* Star rating number input */
.buzzpct-rating-input {
    width: 70px !important;
}

/* Tooltip input */
.buzzpct-feature-tooltip {
    width: 100% !important;
    font-style: italic;
}

/* Sortable placeholder */
.buzzpct-matrix-table tbody tr.ui-sortable-placeholder {
    visibility: visible !important;
    background: #e8f0fe !important;
    border: 2px dashed #2271b1 !important;
}