/* Enhanced Variation Selection and Bulk Edit UI */

/* Variation toolbar */
.variation-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 15px;
    background-color: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.selection-stats {
    font-size: 0.9rem;
    font-weight: 500;
    color: #4b5563;
}

.selection-actions {
    display: flex;
    gap: 8px;
}

/* Bulk Edit Panel */
.bulk-edit-panel {
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.bulk-edit-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f1f5f9;
    cursor: pointer;
}

.bulk-edit-panel .panel-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.bulk-edit-panel .toggle-icon {
    color: #6b7280;
    transition: transform 0.2s ease;
}

.bulk-edit-panel.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.bulk-edit-panel .panel-content {
    padding: 15px;
    border-top: 1px solid #e5e7eb;
    background-color: #f8fafc;
}

.bulk-edit-panel.collapsed .panel-content {
    display: none;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
    margin-bottom: 15px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 10px;
}

.stock-toggle-group {
    display: flex;
    gap: 8px;
    margin-top: 5px;
}

.bulk-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

/* Selected variation styles */
.variation-item.selected {
    border-left: 4px solid #7c3aed !important;
    background-color: #f5f3ff !important;
}

.variation-item.selected .variation-header {
    background-color: #ede9fe !important;
}

/* Checkboxes for variation selection */
.variation-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

/* Variation attributes pill */
.variation-attribute-pill {
    display: inline-block;
    padding: 2px 8px;
    background-color: #e5e7eb;
    color: #4b5563;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Variation attribute button styling */
.variation-attribute {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.variation-attribute label {
    min-width: 120px;
    font-weight: 600;
}

.variation-attribute input[type="text"] {
    flex-grow: 1;
    margin-right: 10px;
}

.variation-attribute .remove-btn {
    padding: 3px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
    margin-left: 10px;
}

.hidden-attribute {
    display: none;
}

.restore-attribute-btn {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    margin: 5px 0;
    background-color: #f0f9ff;
    border: 1px dashed #7dd3fc;
    border-radius: 4px;
    color: #0284c7;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.restore-attribute-btn:hover {
    background-color: #e0f2fe;
    border-color: #38bdf8;
}

.restore-attribute-btn .dashicons {
    margin-right: 5px;
}

/* Animation for selection changes */
@keyframes highlight-selection {
    0% { background-color: rgba(124, 58, 237, 0.1); }
    50% { background-color: rgba(124, 58, 237, 0.2); }
    100% { background-color: transparent; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.selection-highlight {
    animation: highlight-selection 0.8s ease;
}

/* Bulk selection counter badge */
#selection-counter {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background-color: #7c3aed;
    color: white;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

#selection-counter:empty {
    display: none;
}

/* Button styles for the bulk actions */
.btn-outline-primary {
    color: #7c3aed;
    border: 1px solid #7c3aed;
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: #7c3aed;
    color: white;
}

.btn-outline-secondary {
    color: #6b7280;
    border: 1px solid #6b7280;
    background-color: transparent;
}

.btn-outline-secondary:hover {
    background-color: #6b7280;
    color: white;
}

.btn-outline-info {
    color: #0ea5e9;
    border: 1px solid #0ea5e9;
    background-color: transparent;
}

.btn-outline-info:hover {
    background-color: #0ea5e9;
    color: white;
}

.btn-outline-success {
    color: #10b981;
    border: 1px solid #10b981;
    background-color: transparent;
}

.btn-outline-success:hover {
    background-color: #10b981;
    color: white;
}

.btn-outline-danger {
    color: #ef4444;
    border: 1px solid #ef4444;
    background-color: transparent;
}

.btn-outline-danger:hover {
    background-color: #ef4444;
    color: white;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.85rem;
}