/* Webshoptiger Catalog Sync for WooCommerce – Admin Styles */

.webshoptigercatalogsync-sync-wrap { max-width: 1100px; }
.webshoptigercatalogsync-sync-wrap h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Site type toggle bar */
.sc-sitetype-bar {
    background: #fff8e1; border: 1px solid #ffe082; border-radius: 4px;
    padding: 10px 16px; margin: 12px 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.sc-sitetype-hint { font-size: 12px; color: #888; }

/* Badges */
.webshoptigercatalogsync-sync-badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 12px; vertical-align: middle; }
.badge-source  { background: #d1fae5; color: #065f46; }
.badge-dest    { background: #dbeafe; color: #1e40af; }

/* Tabs */
.webshoptigercatalogsync-sync-tabs { display: flex; gap: 2px; margin: 16px 0 0; border-bottom: 2px solid #ddd; flex-wrap: wrap; }
.webshoptigercatalogsync-sync-tabs a {
    padding: 8px 18px; text-decoration: none; color: #444; border: 1px solid transparent;
    border-bottom: none; border-radius: 4px 4px 0 0; font-weight: 500;
}
.webshoptigercatalogsync-sync-tabs a.active { background: #fff; border-color: #ddd; margin-bottom: -2px; color: #2271b1; }
.webshoptigercatalogsync-sync-tabs a:hover:not(.active) { background: #f6f7f7; }

/* Card */
.webshoptigercatalogsync-sync-content { margin-top: 0; }
.webshoptigercatalogsync-sync-card {
    background: #fff; border: 1px solid #ddd; border-radius: 0 4px 4px 4px;
    padding: 24px 28px;
}
.webshoptigercatalogsync-sync-card h2 { margin-top: 0; color: #1d2327; }
.webshoptigercatalogsync-sync-card h3 { border-bottom: 1px solid #f0f0f0; padding-bottom: 8px; }

/* Form */
.sc-form {
    border: 1px solid #e2e8f0; border-radius: 6px; padding: 20px 24px;
    margin: 16px 0; background: #fafbfc;
}
.sc-form h3 { margin-top: 0; }

.sc-categories {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px; max-height: 200px; overflow-y: auto;
    border: 1px solid #ddd; padding: 10px; border-radius: 4px; background: #fff;
}
.sc-cat-label { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.sc-form-actions { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* Feedback */
.sc-feedback {
    display: inline-block; font-size: 13px; padding: 4px 10px;
    border-radius: 4px; vertical-align: middle;
}
.sc-feedback.success { background: #d1fae5; color: #065f46; }
.sc-feedback.error   { background: #fee2e2; color: #991b1b; }
.sc-feedback.loading { color: #555; font-style: italic; background: none; }

/* Tables */
.sc-sites-table th, .sc-log-table th, .sc-desc-table th { font-weight: 600; }
.sc-log-error td { background: #fff5f5 !important; }
.sc-empty { color: #888; font-style: italic; margin-top: 16px; }

/* Status badges */
.sc-badge-ok, .sc-badge-off, .sc-badge-success, .sc-badge-error {
    display: inline-block; font-size: 11px; font-weight: 600;
    padding: 2px 8px; border-radius: 10px;
}
.sc-badge-ok, .sc-badge-success { background: #d1fae5; color: #065f46; }
.sc-badge-off    { background: #f3f4f6; color: #6b7280; }
.sc-badge-error  { background: #fee2e2; color: #991b1b; }

/* Info box */
.sc-info-box {
    background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 6px;
    padding: 12px 16px; margin-top: 16px; font-size: 13px; color: #1e40af;
}

/* Descriptions tab */
.sc-desc-preview { font-size: 12px; color: #555; line-height: 1.5; }
.sc-desc-preview a { font-size: 11px; margin-left: 4px; }
.sc-desc-table td { vertical-align: top; }

/* Modal */
.sc-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    z-index: 99999; display: flex; align-items: center; justify-content: center;
}
.sc-modal-inner {
    background: #fff; border-radius: 8px; padding: 28px 32px;
    max-width: 680px; width: 90%; max-height: 80vh; overflow-y: auto;
    position: relative;
}
.sc-modal-close {
    position: absolute; top: 12px; right: 16px;
    background: none; border: none; font-size: 18px; cursor: pointer; color: #555;
}
.sc-modal-inner h3 { margin-top: 0; }

/* ---- Job voortgang ---- */
.sc-jobs-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }

.sc-job-row {
    border: 1px solid #e2e8f0; border-radius: 6px;
    padding: 14px 16px; margin-bottom: 12px; background: #fafbfc;
}
.sc-job-header {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px;
}
.sc-job-label  { font-weight: 600; font-size: 14px; flex: 1; }
.sc-job-meta   { font-size: 11px; color: #888; }
.sc-job-stats  { font-size: 12px; color: #555; margin-top: 6px; }
.sc-job-errors { color: #b91c1c; font-weight: 600; }

.sc-progress-wrap {
    height: 10px; background: #e5e7eb; border-radius: 5px; overflow: hidden;
}
.sc-progress-bar {
    height: 100%; border-radius: 5px; transition: width .4s ease;
    min-width: 2px;
}
.sc-bar-running   { background: #3b82f6; }
.sc-bar-done      { background: #22c55e; }
.sc-bar-cancelled { background: #9ca3af; }

.sc-badge-running {
    display: inline-block; font-size: 11px; font-weight: 600;
    padding: 2px 8px; border-radius: 10px;
    background: #dbeafe; color: #1e40af;
}

/* Sync actions row */
.webshoptigercatalogsync-sync-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }

/* Job statistieken */
.sc-job-stats  { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: #374151; margin-top: 6px; }
.sc-stat       { font-size: 13px; }
.sc-stat strong { color: #1d2327; font-size: 15px; }
.sc-stat-sep   { color: #d1d5db; }
.sc-job-time   { font-size: 11px; color: #9ca3af; margin-top: 4px; }

/* Vastgelopen job */
.sc-stuck-warning {
    font-size: 12px; color: #b45309; background: #fef3c7;
    border: 1px solid #fcd34d; border-radius: 4px;
    padding: 2px 8px; margin-left: 4px;
}
.sc-resume-job { background: #2271b1 !important; color: #fff !important; border-color: #135e96 !important; }

/* Runner info */
.sc-runner-info {
    background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 6px;
    padding: 12px 16px; margin-bottom: 16px; font-size: 13px;
}
.sc-runner-info code { font-size: 12px; word-break: break-all; }
.sc-runner-info .description { margin: 8px 0 0; color: #555; }

/* Setup notice */
.sc-setup-notice {
    background: #fff8e1; border: 1px solid #f59e0b; border-radius: 6px;
    padding: 12px 16px; margin: 8px 0 16px; font-size: 13px; color: #92400e;
}

/* Log details opmaak */
.sc-log-main    { display: block; font-weight: 500; color: #991b1b; }
.sc-log-details { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sc-log-details span {
    font-size: 11px; background: #f3f4f6; border: 1px solid #e5e7eb;
    border-radius: 3px; padding: 1px 6px; color: #374151; white-space: nowrap;
}

/* Productkiezer */
.sc-product-picker {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 16px;
}
.sc-product-picker #sc-product-search { min-width: 320px; }
.sc-product-picker select { min-width: 220px; }

.sc-product-results-list {
    border: 1px solid #e2e8f0; border-radius: 6px; overflow: hidden; background: #fff;
}
.sc-product-result-row {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 12px; border-bottom: 1px solid #f1f5f9;
}
.sc-product-result-row:last-child { border-bottom: none; }
.sc-product-result-row:hover { background: #f8fafc; }
.sc-product-result-thumb {
    width: 36px; height: 36px; border-radius: 4px; object-fit: cover;
    background: #f1f5f9; border: 1px solid #e2e8f0; flex-shrink: 0;
}
.sc-product-result-info { flex: 1; min-width: 0; }
.sc-product-result-name { font-weight: 500; font-size: 13px; display: block; }
.sc-product-result-meta { font-size: 11px; color: #888; }
.sc-product-result-row .button { flex-shrink: 0; }

.sc-product-search-empty { padding: 10px 12px; color: #888; font-size: 13px; font-style: italic; }

/* -------------------------------------------------------------------------
   Webshoptiger Catalog Sync for WooCommerce — Lite/Pro editie-indicatoren
   ------------------------------------------------------------------------- */

.sc-edition-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 3px 9px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
    text-transform: uppercase;
}
.sc-edition-pro  { background: #1d2b4f; color: #fff; }
.sc-edition-lite { background: #e7e9ee; color: #4a5568; }

.sc-lite-limits-card {
    border-left: 4px solid #c8941f;
}

.sc-limit-row {
    margin: 14px 0;
}
.sc-limit-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #2c3338;
}
.sc-limit-bar-wrap {
    background: #ebedf0;
    border-radius: 6px;
    height: 12px;
    overflow: hidden;
}
.sc-limit-bar {
    height: 100%;
    background: #2271b1;
    border-radius: 6px;
    transition: width 0.3s ease;
}
.sc-limit-bar.sc-limit-full {
    background: #c0392b;
}

.sc-upgrade-notice {
    margin-top: 14px;
    padding: 12px 14px;
    background: #fdf2e9;
    border: 1px solid #f0c987;
    border-radius: 6px;
    font-size: 13px;
    color: #6e4a0e;
}
.sc-upgrade-notice.sc-upgrade-soft {
    background: #eef6fc;
    border-color: #b6dcf0;
    color: #1c4a63;
}
.sc-upgrade-notice a {
    font-weight: 600;
}

.sc-pro-only-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: #1d2b4f;
    color: #fff;
    padding: 2px 7px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}
.sc-pro-only-disabled {
    opacity: 0.55;
}

/* Statistics dashboard */
.sc-stats-summary {
    display: flex;
    gap: 16px;
    margin: 16px 0;
    flex-wrap: wrap;
}
.sc-stat-card {
    background: #f4f6f8;
    border: 1px solid #dfe4ea;
    border-radius: 6px;
    padding: 16px 24px;
    min-width: 140px;
    text-align: center;
}
.sc-stat-card--error {
    background: #fdf2f2;
    border-color: #f5c6c6;
}
.sc-stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #1d2b4f;
    line-height: 1.2;
}
.sc-stat-card--error .sc-stat-number {
    color: #c0392b;
}
.sc-stat-label {
    font-size: 12px;
    color: #5b6470;
    margin-top: 4px;
}

/* Sync fields checkboxes */
.sc-sync-fields label {
    cursor: pointer;
}
#sc-field-checkboxes {
    border-left: 2px solid #dfe4ea;
    padding-left: 12px;
    margin-top: 8px;
}
