/* Page header — push "Documentation" (page-title-action) to the far right */
.wrap > h1 {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wrap > h1 .page-title-action {
    margin-left: auto;
}

/* Disabled tab style */
.nav-tab-disabled {
    color: #a7aaad;
    cursor: not-allowed;
    pointer-events: none;
}

/* Sections (card) */
.datalumo-section {
    margin-top: 20px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    padding: 20px;
}

.datalumo-section__header {
    margin: -4px 0 16px;
}

.datalumo-section__title {
    margin: 0 0 4px;
    padding: 0;
    border: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: #1d2327;
}

.datalumo-section__description {
    margin: 0;
    color: #646970;
    font-size: 13px;
    line-height: 1.5;
}

/* Tighten the first form-table row against the card header */
.datalumo-section > .form-table {
    margin-top: 0;
}

.datalumo-section > .form-table > tbody > tr:first-child > th,
.datalumo-section > .form-table > tbody > tr:first-child > td {
    padding-top: 8px;
}

/* Shortcode sub-cards — keep code blocks visually anchored */
.datalumo-section > p > code {
    font-size: 13px;
    background: #f6f7f7;
    padding: 3px 8px;
    border-radius: 3px;
    border: 1px solid #dcdcde;
}

#datalumo-test-result,
#datalumo-sync-status {
    margin-left: 10px;
    font-style: italic;
}

/* Sync list */
.datalumo-sync-list {
    border: 1px solid #dcdcde;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.datalumo-sync-list--empty {
    border-style: dashed;
    background: #f6f7f7;
}

.datalumo-sync-list-footer {
    margin-top: 12px;
}

/* Sync blocks */
.datalumo-sync-block + .datalumo-sync-block {
    border-top: 1px solid #dcdcde;
}

.datalumo-sync-block {
    transition: background-color 120ms ease;
}

.datalumo-sync-block--open {
    background: #fbfbfc;
}

.datalumo-sync-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
}

.datalumo-sync-block:not(.datalumo-sync-block--open) .datalumo-sync-header:hover {
    background-color: #f6f7f7;
}

.datalumo-sync-toggle {
    color: #646970;
    flex-shrink: 0;
    transition: transform 150ms ease;
}

.datalumo-sync-block--open .datalumo-sync-toggle {
    color: #1d2327;
}

.datalumo-sync-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
    min-width: 0;
}

.datalumo-sync-title {
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.datalumo-sync-meta {
    color: #646970;
    font-size: 12px;
    line-height: 1.2;
}

.datalumo-sync-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Destructive button — red border + red text, matches the blue Sync Now weight */
.datalumo-sync-actions .button.button-link-delete,
.datalumo-section .button.button-link-delete {
    border-color: #d63638;
    color: #b32d2e;
    box-shadow: none;
}

.datalumo-sync-actions .button.button-link-delete:hover,
.datalumo-sync-actions .button.button-link-delete:focus,
.datalumo-section .button.button-link-delete:hover,
.datalumo-section .button.button-link-delete:focus {
    background: #fcf0f1;
    border-color: #b32d2e;
    color: #8a1f21;
    box-shadow: 0 0 0 1px #b32d2e;
}

.datalumo-sync-status {
    color: #646970;
    font-size: 12px;
    font-style: italic;
    margin-left: 0;
}

.datalumo-sync-status:empty {
    display: none;
}

/* Expanded body */
.datalumo-sync-body {
    padding: 4px 16px 16px;
    border-top: 1px solid #dcdcde;
    background: #fff;
}

.datalumo-sync-body .form-table {
    margin-top: 0;
}

.datalumo-sync-body .form-table th {
    width: 160px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.datalumo-sync-body .form-table td {
    padding-top: 14px;
    padding-bottom: 14px;
}

/* Inline checkboxes */
.datalumo-inline-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}

.datalumo-inline-checkboxes label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Empty state */
.datalumo-sync-empty {
    text-align: center;
    padding: 36px 20px;
    color: #646970;
}

.datalumo-sync-empty .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    color: #8c8f94;
    margin-bottom: 8px;
}

.datalumo-sync-empty h3 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.datalumo-sync-empty p {
    margin: 0;
    font-size: 13px;
}

/* Meta mapping rows — light polish */
.datalumo-meta-mapping-row {
    padding: 4px 0;
}
