.wcpfc-advanced-rule-builder-wrapper {
    background: #fff;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.wcpfc-rule-builder-header h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.wcpfc-rule-builder-container {
    min-height: 150px;
    background: #f9f9f9;
    padding: 20px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    margin: 20px 0;
}

.wcpfc-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #646970;
}

.wcpfc-empty-state p {
    margin: 0;
    font-size: 14px;
}

.wcpfc-rule-group {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    margin-bottom: 15px;
    padding: 15px;
    position: relative;
}

.wcpfc-rule-group .wcpfc-rule-group {
    margin-left: 30px;
    margin-top: 15px;
    border-left: 3px solid #2271b1;
    background: #f0f6fc;
}

.wcpfc-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.wcpfc-group-handle,
.wcpfc-condition-handle {
    cursor: move;
    color: #999;
    flex-shrink: 0;
}

.wcpfc-group-operator {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
}

.wcpfc-operator-select {
    padding: 4px 8px;
    font-weight: 600;
    color: #2271b1;
}

.wcpfc-remove-group,
.wcpfc-remove-condition {
    color: #b32d2e;
    padding: 0;
    margin: 0;
}

.wcpfc-remove-group:hover,
.wcpfc-remove-condition:hover {
    color: #dc3232;
}

.wcpfc-condition {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    padding: 10px;
}

.wcpfc-condition-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.wcpfc-condition-type {
    flex-grow: 1;
    padding: 6px 10px;
}

.wcpfc-condition-body {
    padding-left: 30px;
}

.wcpfc-condition-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.wcpfc-condition-row label {
    font-weight: 600;
    margin: 0;
}

.wcpfc-condition-values select,
.wcpfc-condition-values input {
    width: 100%;
}

.wcpfc-group-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.wcpfc-rule-builder-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.wcpfc-rule-preview {
    margin-top: 20px;
    padding: 15px;
    background: #f0f0f1;
    border-radius: 4px;
}

.wcpfc-rule-preview h4 {
    margin: 0 0 10px 0;
}

.wcpfc-rule-preview-content {
    background: #fff;
    padding: 15px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
}

.wcpfc-group-conditions.ui-sortable-helper {
    opacity: 0.8;
}

.wcpfc-sortable-placeholder {
    background: #fffbcc;
    border: 2px dashed #f0ad4e;
    visibility: visible !important;
    height: 50px;
    margin: 10px 0;
}

/* Drag feedback */
.wcpfc-condition.ui-sortable-helper,
.wcpfc-rule-group.ui-sortable-helper {
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transform: rotate(2deg);
}
