@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

#smack-easyinv-popover {
    display: none;
    /* position: absolute; */
    /* background: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px; */
    width: 120px;
    flex-direction: column;
    gap: 8px;
}

.woocommerce-embed-page .wrap {
    position: relative !important;
    width: 95%;
    overflow-x: hidden !important;
    overflow-y: scroll;
}

@media (min-width: 1336px) {
    .woocommerce-embed-page .wrap {
        width: 98%;
    }
}

.woocommerce-admin-page #wpcontent,
.woocommerce-admin-page.woocommerce_page_wc-admin #wpbody-content,
.woocommerce-embed-page #wpbody-content,
.woocommerce-embed-page #wpcontent {
    overflow-x: visible !important;
}

.wp-list-table {
    width: 100%;
    overflow-x: auto;
    display: block;
    table-layout: fixed;
}

.widefat thead tr,
.widefat thead tr,
.widefat tfoot tr,
.widefat tfoot tr {
    background: #fff !important;
}

.widefat.posts thead th:not(.check-column):not(.column-featured),
.widefat.posts thead td:not(.check-column):not(.column-featured),
.widefat.posts tbody th:not(.check-column):not(.column-featured),
.widefat.posts tbody td:not(.check-column):not(.column-featured),
.widefat.posts tfoot th:not(.check-column):not(.column-featured),
.widefat.posts tfoot td:not(.check-column):not(.column-featured) {
    min-width: 90px;
}

.widefat thead tr th,
.widefat thead tr th a span,
.widefat thead tr td,
.widefat tfoot tr th,
.widefat tfoot tr td {
    text-wrap: nowrap;
}

.widefat thead tr th a {
    display: flex;
}

.updates-table tbody td.check-column,
.widefat tbody th.check-column,
.widefat tfoot td.check-column,
.widefat thead td.check-column {
    padding: 11px 0 0 3px;
    position: sticky;
    left: 0;
    background: inherit !important;
    z-index: 1;
}

table.wp-list-table .column-name,
table.wp-list-table th .column-name {
    position: sticky;
    left: 27px;
    min-width: 160px !important;
    background: inherit !important;
    z-index: 1;
}

table.wp-list-table .column-is_in_stock {
    position: sticky;
    left: 206px;
    background: inherit !important;
    z-index: 1;
}

table.wp-list-table .column-is_in_stock.sticky-left {
    box-shadow: 4px 0 8px rgba(0, 0, 0, 0.1) !important;
}


.alternate,
.striped>tbody>:nth-child(even),
ul.striped>:nth-child(even) {
    background-color: #fff;
}

#smack-easyinv-popover-rollback {
    position: relative;
}

#smack-easyinv-popover-rollback:hover::after {
    content: 'Rollback';
    position: absolute;
    font-size: 8px;
    text-wrap: nowrap;
    right: -6px;
    bottom: -12px;
}

#smack-easyinv-popover-set .spinner,
#smack-easyinv-popover-cancel .spinner,
#smack-easyinv-popover-rollback .spinner {
    margin: 0;
}

.smack-easyinv-edit-column::before {
    color: #888;
}

.smack-easyinv-edit-column::after {
    content: 'Edit All';
    font-size: 12px;
    font-weight: 600;
    font-family: system-ui;
    color: #888;
    margin-left: 4px;
    white-space: nowrap;
}

.smack-easyinv-edit-column {
    margin-left: 8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.save-cancel-buttons {
    display: 'flex';
    padding: 0 8px;
    gap: 4px;
    margin-bottom: 4px;
}



/* INVENTORY LOGS */

.inventory-logs.wrap,
.backup-restore-logs.wrap {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.inventory-logs-table,
.backup-restore-logs-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.inventory-logs-table th,
.backup-restore-logs-table th {
    background-color: #fff;
    color: #2c3338 !important;
    padding: 10px;
    text-align: center !important;
}

.inventory-logs-table th,
.inventory-logs-table td .backup-restore-logs-table th,
.backup-restore-logs-table td {
    padding: 8px;
    text-align: center;
}

.inventory-logs-table td.actions .dashicons,
.backup-restore-logs-table td.actions .dashicons {
    color: #888;

    border-radius: 50px;
    padding: 5px;
    scale: 0.9;
    margin-right: 4px;
}

.inventory-logs-table td.actions .dashicons:hover,
.backup-restore-logs-table td.actions .dashicons:hover {
/* 
    color: #fff; */
    cursor: pointer;
}







/* BACKUP RESTORE */
.smack-easyinv-backup-popover {
    position: absolute;
    right: 1rem;
    top: 100%;
    background-color: #fff;
    z-index: 1;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 2px -5px 28px #0000001a;
    width: 250px;
    padding: 8px 8px 1rem 1rem;
}

.smack-easyinv-backup-popover:before {
    content: '';
    border: 8px solid #fff;
    position: absolute;
    top: -16px;
    right: 1.2rem;
    border-left-color: transparent;
    border-top-color: transparent;
    border-right-color: transparent;
}

.smack-easyinv-backup-popover.rollback:before {
    right: 5.7rem;
}

#inventoryLogTable_wrapper select.dt-input,
#backupRestoreTable_wrapper select.dt-input {
    min-width: 48px;
    line-height: 1.5;
}

table.dataTable thead>tr>th.dt-orderable-asc,
table.dataTable thead>tr>th.dt-orderable-desc,
table.dataTable thead>tr>th.dt-ordering-asc,
table.dataTable thead>tr>th.dt-ordering-desc,
table.dataTable thead>tr>td.dt-orderable-asc,
table.dataTable thead>tr>td.dt-orderable-desc,
table.dataTable thead>tr>td.dt-ordering-asc,
table.dataTable thead>tr>td.dt-ordering-desc {
    padding: 1rem;
}

table.dataTable>tbody>tr>th,
table.dataTable>tbody>tr>td {
    padding: 8px !important;
    height: 40px;
}

td.dt-empty {
    width: 100vw;
}


#inventoryLogTable_wrapper table.widefat,
#backupRestoreTable_wrapper table.widefat {
    border: none;
    box-shadow: none;
}

#inventoryLogTable_wrapper .dt-paging,
#backupRestoreTable_wrapper .dt-paging {
    /* margin: 20px 0; */
}

#inventoryLogTable_wrapper .dt-paging nav,
#backupRestoreTable_wrapper .dt-paging nav {
    display: flex;
    gap: 4px;
}

#inventoryLogTable_wrapper .dt-paging-button,
#backupRestoreTable_wrapper .dt-paging-button {
    display: inline-block;
    padding: 6px 11px;
    font-size: 13px;
    color: #007cba;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#inventoryLogTable_wrapper .dt-paging-button:hover,
#backupRestoreTable_wrapper .dt-paging-button:hover {
    border: 1px solid #007cba;
    color: #007cba !important;
    background: transparent;
}

#inventoryLogTable_wrapper .dt-paging-button.disabled,
#inventoryLogTable_wrapper .dt-paging-button.disabled:hover,
#backupRestoreTable_wrapper .dt-paging-button.disabled,
#backupRestoreTable_wrapper .dt-paging-button.disabled:hover {
    color: #aaa;
    background-color: #f7f7f7;
    cursor: not-allowed;
    border-color: #ddd;
}

#inventoryLogTable_wrapper .dt-paging-button.current,
#backupRestoreTable_wrapper .dt-paging-button.current {
    background-color: #007cba;
    color: #fff !important;
    border-color: #007cba;
    cursor: default;
}

#inventoryLogTable_wrapper .dt-paging-button.current:hover,
#backupRestoreTable_wrapper .dt-paging-button.current:hover {
    background-color: #007cba;
}

#inventoryLogTable_wrapper .dt-paging-button.first,
#inventoryLogTable_wrapper .dt-paging-button.last,
#backupRestoreTable_wrapper .dt-paging-button.first,
#backupRestoreTable_wrapper .dt-paging-button.last {
    font-size: 13px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

/* Hide the default checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

/* The circle inside the slider */
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

/* When the checkbox is checked */
.switch input:checked+.slider {
    background-color: #2271b1;
}

/* Move the circle inside the slider */
.switch input:checked+.slider:before {
    transform: translateX(26px);
}

.easyinv-spinner-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(15, 23, 42, 0.35) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 99999 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.easyinv-loading-card {
    background-color: #ffffff !important;
    padding: 24px 32px !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #e2e8f0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px !important;
    min-width: 220px !important;
    box-sizing: border-box !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.easyinv-loading-spinner {
    width: 32px !important;
    height: 32px !important;
    border: 3px solid #e2e8f0 !important;
    border-top: 3px solid #007cba !important;
    border-radius: 50% !important;
    animation: easyinv-spin 0.8s linear infinite !important;
}

.easyinv-loading-text {
    font-size: 14px !important;
    color: #475569 !important;
    font-weight: 500 !important;
    letter-spacing: -0.01em !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.easyinv-loading-card button.smack-easyinv-cancelall-btn {
    margin-top: 4px !important;
    background-color: #f1f5f9 !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 8px 16px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    height: auto !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.easyinv-loading-card button.smack-easyinv-cancelall-btn:hover {
    background-color: #e2e8f0 !important;
    color: #334155 !important;
    border-color: #cbd5e1 !important;
}

@keyframes easyinv-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

div.dt-container .dt-search input {
    line-height: 1;
}

.table-view-list {
    width: 104%;
}

@media (min-width: 1336px) {
    .table-view-list {
        width: 100%;
    }
}

#backupRestoreTable_wrapper {
    width: 100% !important;
}

#backupRestoreTable {
    width: 100% !important;
    table-layout: fixed;
    /* Optional: Ensures equal spacing */
}

/* --- PREMIUM UI STYLING FOR INVENTORY LOGS --- */

/* Font Family and Page Container */
.inventory-logs {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.inventory-logs h2 {
    font-family: 'Inter Tight', 'Inter', sans-serif !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    border-bottom: 2px solid #f1f5f9 !important;
    padding-bottom: 16px !important;
    margin-bottom: 24px !important;
    letter-spacing: -0.02em !important;
}

/* Card Wrapper container for the Log Table & Controls */
#inventoryLogTable_wrapper {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 24px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    margin-top: 20px !important;
    box-sizing: border-box !important;
}

/* Controls layout styling (Length / Search) */
#inventoryLogTable_wrapper .dt-length,
#inventoryLogTable_wrapper .dt-search {
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    color: #64748b !important;
    font-weight: 500 !important;
    margin-bottom: 20px !important;
}

#inventoryLogTable_wrapper select.dt-input {
    padding: 8px 30px 8px 12px !important;
    min-width: 75px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    color: #334155 !important;
    background-color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

#inventoryLogTable_wrapper input.dt-input {
    padding: 8px 12px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    color: #334155 !important;
    background-color: #ffffff !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

#inventoryLogTable_wrapper select.dt-input:focus,
#inventoryLogTable_wrapper input.dt-input:focus {
    border-color: #007cba !important;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.15) !important;
    outline: none !important;
}

/* Premium Table Layout */
.inventory-logs-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    border: 1px solid #e2e8f0 !important;
    margin-bottom: 20px !important;
}

.inventory-logs-table th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    padding: 14px 16px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-top: none !important;
    text-align: center !important;
}

.inventory-logs-table td {
    padding: 14px 16px !important;
    font-size: 14px !important;
    color: #334155 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle !important;
    text-align: center !important;
}

.inventory-logs-table tr:hover td {
    background-color: #f8fafc !important;
}

.inventory-logs-table tr:last-child td {
    border-bottom: none !important;
}

/* Stock Status Pill Badges */
.eism-status-badge {
    display: inline-block !important;
    padding: 6px 12px !important;
    border-radius: 9999px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    text-align: center !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.eism-status-badge.status-instock {
    background-color: #ecfdf5 !important;
    color: #065f46 !important;
    border: 1px solid #a7f3d0 !important;
}

.eism-status-badge.status-outofstock {
    background-color: #fef2f2 !important;
    color: #991b1b !important;
    border: 1px solid #fca5a5 !important;
}

.eism-status-badge.status-onbackorder {
    background-color: #fffbeb !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
}

/* Premium Pagination Styling */
#inventoryLogTable_wrapper .dt-paging {
    margin-top: 20px !important;
}

#inventoryLogTable_wrapper .dt-paging nav {
    display: flex !important;
    gap: 6px !important;
    justify-content: flex-end !important;
}

#inventoryLogTable_wrapper .dt-paging-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #475569 !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin: 0 !important;
}

#inventoryLogTable_wrapper .dt-paging-button:hover {
    border-color: #007cba !important;
    color: #007cba !important;
    background-color: #f0f9ff !important;
}

#inventoryLogTable_wrapper .dt-paging-button.current {
    background-color: #007cba !important;
    color: #ffffff !important;
    border-color: #007cba !important;
    font-weight: 600 !important;
}

#inventoryLogTable_wrapper .dt-paging-button.current:hover {
    background-color: #005a87 !important;
    color: #ffffff !important;
    border-color: #005a87 !important;
}

#inventoryLogTable_wrapper .dt-paging-button.disabled,
#inventoryLogTable_wrapper .dt-paging-button.disabled:hover {
    color: #94a3b8 !important;
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    cursor: not-allowed !important;
}
/* Inventory summary bar (product list) */
.notice.eism-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
    border-left-color: #2271b1;
}
.eism-summary-item {
    display: flex;
    flex-direction: column;
    min-width: 130px;
    padding: 8px 12px;
    background: #f6f7f7;
    border-radius: 4px;
}
.eism-summary-label {
    font-size: 12px;
    color: #50575e;
}
.eism-summary-value {
    font-size: 18px;
    line-height: 1.4;
    color: #1d2327;
}

/* Inline variation rows (product list) */
/* On the row: sticky columns use background: inherit. */
.wp-list-table tr.eism-variation-row {
    background: #f6f7f7;
}
.wp-list-table tr.eism-variation-row td.column-name::before {
    content: "\21B3\00a0";
    color: #8c8f94;
}

/* Bulk edit preview dialog */
.eism-bulk-preview {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
}
.eism-bulk-preview-card {
    width: min(640px, calc(100vw - 32px));
    max-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.eism-bulk-preview-card h2 {
    margin: 0 0 4px;
}
.eism-bulk-preview-list {
    overflow: auto;
    margin: 8px 0;
}
.eism-bulk-preview-list table.widefat {
    display: table;
}
.eism-bulk-preview-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 8px;
}

/* Stock -/+ buttons */
.eism-stepper {
    display: inline-flex;
    gap: 2px;
    margin-left: 6px;
    vertical-align: middle;
}
.eism-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    background: #fff;
    color: #2c3338;
    cursor: pointer;
}
.eism-step:hover,
.eism-step:focus {
    border-color: #2271b1;
    color: #2271b1;
}
.eism-step .dashicons {
    width: 14px;
    height: 14px;
    font-size: 14px;
}

/* Rollback history menu */
.eism-rollback-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 4px;
    border-top: 1px solid #dcdcde;
}
.eism-rollback-option {
    padding: 2px 4px;
    border: 0;
    background: none;
    color: #2271b1;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}
.eism-rollback-option:hover,
.eism-rollback-option:focus {
    background: #f0f6fc;
}

/* Sticky header (product list). The table is already its own scroll box (overflow-x: auto),
   so it gets a height and the header sticks inside it. */
@media screen and (min-width: 783px) {
    .post-type-product .wp-list-table.posts {
        max-height: calc(100vh - 140px);
        overflow: auto;
    }
    .post-type-product .wp-list-table.posts thead th,
    .post-type-product .wp-list-table.posts thead td {
        position: sticky;
        top: 0;
        z-index: 3;
        background: #fff;
    }
    .post-type-product .wp-list-table.posts thead .check-column,
    .post-type-product .wp-list-table.posts thead .column-name,
    .post-type-product .wp-list-table.posts thead .column-is_in_stock {
        z-index: 4;
    }
}
