/* Affinsy branding notice */
#buce-editor-wrap .buce-branding-notice {
    border-left-color: #0f5c5a;
    background: #f3f8f7;
}

#buce-editor-wrap .buce-branding-notice p .dashicons {
    margin-right: 8px;
    vertical-align: middle;
}

#buce-editor-wrap .buce-controls {
    margin: 15px 0;
    display: flex;
    gap: 10px;
    align-items: center;
}

#buce-editor-wrap #buce-search {
    width: 250px;
}

#buce-editor-wrap .buce-controls .spinner {
    float: none;
    margin-left: 10px;
    vertical-align: middle;
}

#buce-editor-wrap .wp-list-table th.product-name {
    width: 25%;
}

#buce-editor-wrap tr.is-dirty {
    background-color: #fffbe5 !important;
}

#buce-message-container {
    margin-bottom: 15px;
    height: 45px;
}
#buce-message-container .notice {
    margin: 0;
}

.buce-pagination {
    margin-top: 15px;
}

.buce-pagination .page-numbers {
    padding: 5px 10px;
    text-decoration: none;
    border: 1px solid #ccc;
    margin: 0 2px;
    display: inline-block !important;
}

.buce-pagination .page-numbers.current {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

.buce-tag-container {
    border: 1px solid #ddd;
    padding: 5px;
    background-color: #fff;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    position: relative;
    min-height: 38px;
}

.buce-tag-container input[type="text"] {
    border: none;
    box-shadow: none;
    flex-grow: 1;
    min-width: 150px;
    padding: 2px;
    outline: none;
}

.buce-tag {
    background-color: #e0e0e0; 
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 3px 6px;
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    white-space: nowrap;
    height: 28px;
    box-sizing: border-box;
}

.buce-tag .buce-discount-wrapper {
    margin-left: 8px;
    font-size: 12px;
    color: #444;
    display: inline-flex;
    align-items: center;
}

.buce-tag .buce-discount-input {
    width: 45px;
    text-align: center;
    border: 1px solid #b4b4b4;
    border-radius: 2px;
    padding: 1px 2px;
    font-size: 12px;
    height: 20px;
    margin: 0 4px;
    -moz-appearance: textfield;
}
.buce-tag .buce-discount-input::-webkit-outer-spin-button,
.buce-tag .buce-discount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.buce-remove-tag {
    margin-left: 5px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 2px;
    color: #555;
    opacity: 0.7;
}
.buce-remove-tag:hover {
    color: #d00;
    opacity: 1;
}

.buce-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 100;
    list-style: none;
    margin: 2px 0 0;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}

.buce-search-results li {
    padding: 8px 12px;
    cursor: pointer;
    margin: 0;
}

.buce-search-results li:hover {
    background-color: #0073aa;
    color: #fff;
}

.cross-sell-discount-badge {
    background-color: #ff6b35 !important;
    color: white !important;
}

tr.buce-variation-row > td:first-child {
    padding-left: 28px;
}

.buce-variation-indicator {
    color: #999;
    font-size: 14px;
    margin-right: 2px;
}

.buce-parent-name {
    color: #555;
    font-weight: normal;
}

.buce-variation-attrs {
    display: inline;
    font-size: 12px;
    color: #0073aa;
    margin-left: 2px;
}

tr.buce-variation-row {
    background-color: #f9f9f9 !important;
}

tr.buce-variation-row.is-dirty {
    background-color: #fffbe5 !important;
}

.buce-row-actions {
    margin-top: 5px;
    font-size: 0.9em;
}

.buce-row-actions .button-small {
    margin-right: 2px;
    padding: 0 5px 1px;
}

.buce-row-actions .dashicons {
    font-size: 14px;
    line-height: 24px;
    vertical-align: middle;
}
/* ==========================================================================
   Copy / paste source highlight
   ========================================================================== */

#buce-editor-wrap tr.buce-copied-from > td:first-child {
    box-shadow: inset 3px 0 0 #0f5c5a;
}

/* ==========================================================================
   CSV import preview modal
   ========================================================================== */

body.buce-modal-open {
    overflow: hidden;
}

.buce-modal[hidden] {
    display: none;
}

.buce-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.buce-modal-dialog {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: min(1100px, 100%);
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    padding: 0 24px 16px;
}

.buce-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #ddd;
    margin: 0 -24px 12px;
    padding: 12px 24px;
}

.buce-modal-header h2 {
    margin: 0;
    font-size: 1.3em;
}

.buce-modal-close {
    border: 0;
    background: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #555;
}

.buce-modal-scroll {
    overflow: auto;
    flex: 1 1 auto;
    min-height: 0;
    border: 1px solid #ddd;
}

.buce-diff-table {
    border: 0;
}

.buce-diff-table th:first-child,
.buce-diff-table td:first-child {
    width: 28%;
}

.buce-diff-table ul {
    margin: 0;
}

.buce-diff-table li {
    margin: 0 0 3px;
    padding-left: 14px;
    position: relative;
}

.buce-diff-table li::before {
    position: absolute;
    left: 0;
    font-weight: bold;
}

.buce-diff-add { color: #1a7f37; }
.buce-diff-table .buce-diff-add::before { content: "+"; }
.buce-diff-remove { color: #b42318; }
.buce-diff-table .buce-diff-remove { text-decoration: line-through; }
.buce-diff-table .buce-diff-remove::before { content: "−"; text-decoration: none; }
.buce-diff-change { color: #8a6100; }
.buce-diff-table .buce-diff-change::before { content: "~"; }
.buce-diff-none { color: #999; padding-left: 0 !important; }

.buce-diff-legend span {
    margin-right: 14px;
}

.buce-import-warnings {
    background: #fcf9e8;
    border-left: 4px solid #dba617;
    padding: 6px 12px;
    margin-bottom: 12px;
}

.buce-import-warnings ul {
    max-height: 120px;
    overflow: auto;
    margin: 6px 0 0;
    list-style: disc;
    padding-left: 18px;
}

.buce-modal-empty {
    padding: 24px;
    text-align: center;
    color: #555;
}

.buce-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid #ddd;
}
