.smart-section-runtime,
.smart-sections-elementor-widget {
    position: relative;
}

.smart-sections-empty {
    padding: 32px;
    border: 1px dashed #a7aaad;
    background: #f6f7f7;
    color: #50575e;
    text-align: center;
}

.smart-sections-hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.smart-sections-form-status {
    margin-top: .75rem;
}

.elementor-editor-active .smart-sections-editable {
    cursor: text;
    outline: 1px dashed transparent;
    outline-offset: 3px;
    transition: outline-color .12s ease, box-shadow .12s ease;
}

.elementor-editor-active .smart-sections-editable:hover {
    outline-color: #6d5dfc;
}

.elementor-editor-active img.smart-sections-editable {
    cursor: pointer;
}

.elementor-editor-active .smart-sections-editable:focus {
    outline: 2px solid #6d5dfc;
    outline-offset: 3px;
    box-shadow: 0 0 0 3px rgba(109, 93, 252, .12);
}

.smart-sections-link-popover {
    z-index: 999999;
    width: 320px;
    padding: 10px;
    border: 1px solid #d5d8dc;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
    color: #1d2327;
    font: 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.smart-sections-link-popover label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.smart-sections-link-input {
    width: 100%;
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    background: #fff;
    color: #1d2327;
}

.smart-sections-link-actions {
    display: flex;
    gap: 7px;
    justify-content: flex-end;
    margin-top: 8px;
}

.smart-sections-link-actions button {
    min-height: 30px;
    padding: 4px 10px;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    background: #f6f7f7;
    cursor: pointer;
}

.smart-sections-link-save {
    border-color: #6d5dfc !important;
    background: #6d5dfc !important;
    color: #fff !important;
}


/* ================================================================
   Elementor Client Content Editor
   ================================================================ */

.smart-sections-import-status {
    padding: 8px 10px;
    border-radius: 5px;
    background: var(--e-a-bg-hover, #f6f7f7);
    color: var(--e-a-color-txt-muted, #50575e);
    font-size: 12px;
    line-height: 1.55;
}

.smart-sections-error {
    color: #d63638;
}

.smart-sections-native-control {
    --ss-ui-accent: var(--e-a-color-accent, #6d5dfc);
    --ss-ui-bg: var(--e-a-bg-default, #ffffff);
    --ss-ui-bg-soft: var(--e-a-bg-hover, #f6f7f7);
    --ss-ui-border: var(--e-a-border-color, #d5d8dc);
    --ss-ui-text: var(--e-a-color-txt, #1d2327);
    --ss-ui-muted: var(--e-a-color-txt-muted, #69727d);
    --ss-ui-success: #3d8b37;
    --ss-ui-danger: #d63638;

    display: grid;
    gap: 10px;
    color: var(--ss-ui-text);
    container-type: inline-size;
}

.smart-sections-client-hero {
    padding: 12px;
    border: 1px solid var(--ss-ui-border);
    border-radius: 8px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--ss-ui-accent) 8%, transparent), transparent 62%),
        var(--ss-ui-bg);
}

.smart-sections-client-hero__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.smart-sections-client-hero__title {
    display: block;
    color: var(--ss-ui-text);
    font-size: 13px;
    line-height: 1.3;
}

.smart-sections-client-hero__subtitle {
    margin-top: 3px;
    color: var(--ss-ui-muted);
    font-size: 10.5px;
    line-height: 1.4;
}

.smart-sections-field-count {
    display: inline-flex;
    min-width: 25px;
    height: 25px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--ss-ui-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.smart-sections-client-toolbar {
    display: grid;
    gap: 7px;
}

.smart-sections-client-search-wrap {
    position: relative;
}

.smart-sections-client-search-icon {
    position: absolute;
    top: 50%;
    left: 10px;
    width: 10px;
    height: 10px;
    transform: translateY(-58%);
    border: 1.5px solid var(--ss-ui-muted);
    border-radius: 50%;
    pointer-events: none;
}

.smart-sections-client-search-icon::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 1.5px;
    right: -4px;
    bottom: -2px;
    transform: rotate(45deg);
    transform-origin: left center;
    border-radius: 1px;
    background: var(--ss-ui-muted);
}

.smart-sections-client-search {
    box-sizing: border-box;
    width: 100%;
    min-height: 34px;
    padding: 7px 10px 7px 30px;
    border: 1px solid var(--ss-ui-border);
    border-radius: 6px;
    outline: none;
    background: var(--ss-ui-bg);
    color: var(--ss-ui-text);
    font: inherit;
    font-size: 11px;
}

.smart-sections-client-search:focus {
    border-color: var(--ss-ui-accent);
    box-shadow: 0 0 0 1px var(--ss-ui-accent);
}

.smart-sections-client-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.smart-sections-toolbar-button,
.smart-sections-refresh-button {
    min-height: 29px;
    padding: 5px 8px;
    border: 1px solid var(--ss-ui-border);
    border-radius: 5px;
    background: var(--ss-ui-bg);
    color: var(--ss-ui-text);
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
}

.smart-sections-toolbar-button:hover,
.smart-sections-refresh-button:hover {
    border-color: var(--ss-ui-accent);
    color: var(--ss-ui-accent);
}

.smart-sections-editor-state {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 6px 8px;
    border: 1px solid var(--ss-ui-border);
    border-radius: 5px;
    background: var(--ss-ui-bg-soft);
    color: var(--ss-ui-muted);
    font-size: 10px;
    line-height: 1.35;
}

.smart-sections-editor-state::before {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: currentColor;
}

.smart-sections-editor-state.is-ready {
    border-color: color-mix(in srgb, var(--ss-ui-success) 42%, var(--ss-ui-border));
    background: color-mix(in srgb, var(--ss-ui-success) 8%, var(--ss-ui-bg));
    color: var(--ss-ui-success);
}

.smart-sections-editor-state.is-loading {
    color: var(--ss-ui-muted);
}

.smart-sections-editor-state.is-error {
    border-color: color-mix(in srgb, var(--ss-ui-danger) 42%, var(--ss-ui-border));
    background: color-mix(in srgb, var(--ss-ui-danger) 8%, var(--ss-ui-bg));
    color: var(--ss-ui-danger);
}

.smart-sections-client-editor {
    min-width: 0;
}

.smart-sections-client-empty,
.smart-sections-client-no-results {
    padding: 14px 12px;
    border: 1px dashed var(--ss-ui-border);
    border-radius: 7px;
    background: var(--ss-ui-bg-soft);
    color: var(--ss-ui-muted);
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}

.smart-sections-client-group-list {
    display: grid;
    gap: 8px;
}

.smart-sections-client-group {
    overflow: hidden;
    border: 1px solid var(--ss-ui-border);
    border-radius: 8px;
    background: var(--ss-ui-bg);
    box-shadow: 0 1px 1px rgba(0, 0, 0, .025);
}

.smart-sections-client-group-header {
    display: flex;
    width: 100%;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border: 0;
    background: transparent;
    color: var(--ss-ui-text);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.smart-sections-client-group-header:hover {
    background: var(--ss-ui-bg-soft);
}

.smart-sections-client-group-copy {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
}

.smart-sections-client-group-title {
    overflow: hidden;
    font-size: 11.5px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.smart-sections-client-group-count {
    display: inline-flex;
    min-width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--ss-ui-bg-soft);
    color: var(--ss-ui-muted);
    font-size: 9px;
    font-weight: 700;
}

.smart-sections-client-chevron {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    transform: rotate(45deg);
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    color: var(--ss-ui-muted);
    transition: transform .16s ease;
}

.smart-sections-client-group.is-open .smart-sections-client-chevron {
    transform: rotate(225deg) translate(-1px, -1px);
}

.smart-sections-client-group-body[hidden] {
    display: none !important;
}

.smart-sections-client-group-body {
    padding: 0 9px 9px;
}

.smart-sections-client-subgroup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 8px;
}

.smart-sections-client-subgroup {
    min-width: 0;
    padding: 8px;
    border: 1px solid color-mix(in srgb, var(--ss-ui-border) 82%, transparent);
    border-radius: 7px;
    background: var(--ss-ui-bg-soft);
}

.smart-sections-client-subgroup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: -1px 0 7px;
    color: var(--ss-ui-text);
    font-size: 10.5px;
}

.smart-sections-client-subgroup-header strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.smart-sections-client-subgroup-header span {
    display: inline-flex;
    min-width: 17px;
    height: 17px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--ss-ui-bg);
    color: var(--ss-ui-muted);
    font-size: 8.5px;
    font-weight: 700;
}

.smart-sections-client-field-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: 7px;
}

.smart-sections-client-field {
    min-width: 0;
    padding: 9px;
    border: 1px solid var(--ss-ui-border);
    border-radius: 6px;
    background: var(--ss-ui-bg);
}

.smart-sections-client-field-heading {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 7px;
    color: var(--ss-ui-text);
}

.smart-sections-client-field-title {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.smart-sections-client-field-title strong {
    overflow: hidden;
    max-width: 100%;
    font-size: 10.5px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.smart-sections-client-type-badge {
    display: inline-flex;
    height: 16px;
    align-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ss-ui-accent) 9%, var(--ss-ui-bg));
    color: var(--ss-ui-accent);
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
}

.smart-sections-client-field-key {
    overflow: hidden;
    max-width: 44%;
    flex: 0 1 auto;
    padding: 1px 4px;
    border-radius: 3px;
    background: var(--ss-ui-bg-soft);
    color: var(--ss-ui-muted);
    font-size: 8px;
    font-weight: 400;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.smart-sections-client-input,
.smart-sections-client-richtext {
    box-sizing: border-box;
    width: 100%;
    min-height: 33px;
    padding: 6px 8px;
    border: 1px solid var(--ss-ui-border);
    border-radius: 5px;
    outline: none;
    background: var(--ss-ui-bg);
    color: var(--ss-ui-text);
    font: inherit;
    font-size: 10.5px;
    transition: border-color .12s ease, box-shadow .12s ease;
}

.smart-sections-client-richtext {
    min-height: 72px;
    overflow-y: auto;
    line-height: 1.48;
}

.smart-sections-client-richtext:empty::before {
    content: 'Enter content';
    color: var(--ss-ui-muted);
    pointer-events: none;
}

.smart-sections-client-richtext:focus,
.smart-sections-client-input:focus {
    border-color: var(--ss-ui-accent);
    box-shadow: 0 0 0 1px var(--ss-ui-accent);
}

.smart-sections-client-control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 7px;
}

.smart-sections-client-control-block {
    min-width: 0;
}

.smart-sections-client-sub-label {
    display: block;
    margin: 0 0 4px;
    color: var(--ss-ui-muted);
    font-size: 9px;
    font-weight: 600;
    line-height: 1.35;
}

.smart-sections-client-image-picker {
    position: relative;
    display: block;
    width: 100%;
    margin: 0 0 8px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--ss-ui-border);
    border-radius: 6px;
    background: var(--ss-ui-bg-soft);
    cursor: pointer;
}

.smart-sections-client-image-preview {
    display: flex;
    width: 100%;
    min-height: 90px;
    max-height: 138px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--ss-ui-muted);
    font-size: 9px;
}

.smart-sections-client-image-preview img {
    display: block;
    width: 100%;
    height: 112px;
    object-fit: contain;
    background: var(--ss-ui-bg-soft);
}

.smart-sections-client-image-empty {
    padding: 28px 8px;
}

.smart-sections-client-image-overlay {
    position: absolute;
    left: 7px;
    right: 7px;
    bottom: 7px;
    display: flex;
    min-height: 26px;
    align-items: center;
    justify-content: center;
    padding: 4px 7px;
    border-radius: 4px;
    background: rgba(20, 20, 22, .76);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    opacity: 0;
    transition: opacity .14s ease;
}

.smart-sections-client-image-picker:hover .smart-sections-client-image-overlay,
.smart-sections-client-image-picker:focus .smart-sections-client-image-overlay {
    opacity: 1;
}

.smart-sections-client-note {
    margin: 0 0 7px;
    padding: 6px 7px;
    border-left: 2px solid var(--ss-ui-accent);
    border-radius: 3px;
    background: var(--ss-ui-bg-soft);
    color: var(--ss-ui-muted);
    font-size: 9px;
    line-height: 1.45;
}

.smart-sections-client-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 2px;
    color: var(--ss-ui-muted);
    font-size: 8.5px;
    line-height: 1.35;
}

.smart-sections-refresh-button {
    min-height: 25px;
    flex: 0 0 auto;
    padding: 4px 7px;
    font-size: 9px;
}

@container (min-width: 420px) {
    .smart-sections-client-subgroup-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .smart-sections-client-chevron,
    .smart-sections-client-image-overlay,
    .smart-sections-client-input,
    .smart-sections-client-richtext {
        transition: none;
    }
}

/* ================================================================
   v0.3.0 · Repeatable groups
   ================================================================ */

.smart-sections-repeat-group-list {
    display: grid;
    gap: 10px;
    margin-bottom: 10px;
}

.smart-sections-repeat-group {
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--ss-ui-accent) 32%, var(--ss-ui-border));
    border-radius: 9px;
    background: var(--ss-ui-bg);
}

.smart-sections-repeat-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px;
    border-bottom: 1px solid var(--ss-ui-border);
    background: color-mix(in srgb, var(--ss-ui-accent) 6%, var(--ss-ui-bg));
}

.smart-sections-repeat-group-title {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.smart-sections-repeat-group-title strong {
    overflow: hidden;
    color: var(--ss-ui-text);
    font-size: 11.5px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.smart-sections-repeat-group-title span {
    color: var(--ss-ui-muted);
    font-size: 8.5px;
}

.smart-sections-repeat-add {
    flex: 0 0 auto;
    min-height: 27px;
    padding: 4px 8px;
    border: 1px solid var(--ss-ui-accent);
    border-radius: 5px;
    background: var(--ss-ui-accent);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 9px;
    font-weight: 700;
}

.smart-sections-repeat-items {
    display: grid;
    gap: 8px;
    padding: 8px;
}

.smart-sections-repeat-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--ss-ui-border);
    border-radius: 7px;
    background: var(--ss-ui-bg-soft);
    transition: border-color .12s ease, opacity .12s ease, transform .12s ease;
}

.smart-sections-repeat-card.is-dragging {
    opacity: .52;
    transform: scale(.995);
    border-color: var(--ss-ui-accent);
}

.smart-sections-repeat-card.is-drop-target {
    border-color: var(--ss-ui-accent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--ss-ui-accent) 55%, transparent);
}

.smart-sections-repeat-card-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 7px;
    border-bottom: 1px solid color-mix(in srgb, var(--ss-ui-border) 78%, transparent);
    background: var(--ss-ui-bg);
}

.smart-sections-repeat-card-header > strong {
    overflow: hidden;
    color: var(--ss-ui-text);
    font-size: 10px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.smart-sections-repeat-drag {
    display: inline-flex;
    width: 21px;
    height: 21px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: var(--ss-ui-muted);
    cursor: grab;
    font-size: 12px;
    letter-spacing: -2px;
    user-select: none;
}

.smart-sections-repeat-drag:hover {
    background: var(--ss-ui-bg-soft);
    color: var(--ss-ui-accent);
}

.smart-sections-repeat-actions {
    display: inline-flex;
    gap: 4px;
}

.smart-sections-repeat-actions button {
    min-height: 22px;
    padding: 3px 5px;
    border: 1px solid var(--ss-ui-border);
    border-radius: 4px;
    background: var(--ss-ui-bg);
    color: var(--ss-ui-muted);
    cursor: pointer;
    font: inherit;
    font-size: 7.8px;
    font-weight: 600;
}

.smart-sections-repeat-actions button:hover {
    border-color: var(--ss-ui-accent);
    color: var(--ss-ui-accent);
}

.smart-sections-repeat-actions button.is-danger:hover {
    border-color: var(--ss-ui-danger);
    color: var(--ss-ui-danger);
}

.smart-sections-repeat-card-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
    gap: 7px;
    padding: 7px;
}

.smart-sections-repeat-card-fields .smart-sections-client-field {
    background: var(--ss-ui-bg);
}

/* ================================================================
   v0.3.0 · Template diff and version history
   ================================================================ */

.smart-sections-version-panel {
    display: grid;
    gap: 8px;
    margin-top: 6px;
}

.smart-sections-diff-card,
.smart-sections-history-card {
    overflow: hidden;
    border: 1px solid var(--e-a-border-color, #d5d8dc);
    border-radius: 7px;
    background: var(--e-a-bg-default, #fff);
}

.smart-sections-diff-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--e-a-border-color, #d5d8dc);
}

.smart-sections-diff-stat {
    display: grid;
    gap: 1px;
    padding: 7px 3px;
    text-align: center;
}

.smart-sections-diff-stat + .smart-sections-diff-stat {
    border-left: 1px solid var(--e-a-border-color, #d5d8dc);
}

.smart-sections-diff-stat strong {
    color: var(--e-a-color-txt, #1d2327);
    font-size: 12px;
}

.smart-sections-diff-stat span {
    color: var(--e-a-color-txt-muted, #69727d);
    font-size: 7.5px;
}

.smart-sections-diff-stat.is-added strong { color: #24823d; }
.smart-sections-diff-stat.is-removed strong { color: #b32d2e; }
.smart-sections-diff-stat.is-changed strong { color: #9a6700; }

.smart-sections-diff-change-list {
    display: grid;
    gap: 3px;
    max-height: 145px;
    overflow: auto;
    padding: 7px;
}

.smart-sections-diff-change {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 4px;
    align-items: center;
    min-width: 0;
    font-size: 8px;
}

.smart-sections-diff-change code {
    overflow: hidden;
    color: var(--e-a-color-txt-muted, #69727d);
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.smart-sections-diff-symbol {
    font-weight: 800;
    text-align: center;
}

.smart-sections-diff-change.is-added .smart-sections-diff-symbol { color: #24823d; }
.smart-sections-diff-change.is-removed .smart-sections-diff-symbol { color: #b32d2e; }
.smart-sections-diff-change.is-changed .smart-sections-diff-symbol { color: #9a6700; }

.smart-sections-diff-more,
.smart-sections-diff-flags {
    padding: 5px 7px;
    color: var(--e-a-color-txt-muted, #69727d);
    font-size: 8px;
}

.smart-sections-diff-flags {
    border-top: 1px solid var(--e-a-border-color, #d5d8dc);
}

.smart-sections-history-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 8px;
    border-bottom: 1px solid var(--e-a-border-color, #d5d8dc);
}

.smart-sections-history-title strong {
    font-size: 10px;
}

.smart-sections-history-title span {
    color: var(--e-a-color-txt-muted, #69727d);
    font-size: 8px;
}

.smart-sections-history-empty {
    padding: 9px 8px;
    color: var(--e-a-color-txt-muted, #69727d);
    font-size: 8.5px;
    line-height: 1.45;
}

.smart-sections-history-list {
    display: grid;
    max-height: 190px;
    overflow: auto;
}

.smart-sections-history-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 6px 7px;
}

.smart-sections-history-row + .smart-sections-history-row {
    border-top: 1px solid color-mix(in srgb, var(--e-a-border-color, #d5d8dc) 72%, transparent);
}

.smart-sections-history-copy {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.smart-sections-history-copy strong {
    font-size: 9px;
}

.smart-sections-history-copy span {
    overflow: hidden;
    color: var(--e-a-color-txt-muted, #69727d);
    font-size: 7.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.smart-sections-history-actions {
    display: inline-flex;
    gap: 3px;
}

.smart-sections-history-actions button {
    min-height: 22px;
    padding: 3px 5px;
    border: 1px solid var(--e-a-border-color, #d5d8dc);
    border-radius: 4px;
    background: var(--e-a-bg-default, #fff);
    color: var(--e-a-color-txt, #1d2327);
    cursor: pointer;
    font: inherit;
    font-size: 7.5px;
}

.smart-sections-history-actions button:hover {
    border-color: var(--e-a-color-accent, #6d5dfc);
    color: var(--e-a-color-accent, #6d5dfc);
}

/* Full-screen comparison intentionally lives outside the Elementor panel. */
.smart-sections-compare-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 24px;
    background: rgba(18, 18, 23, .76);
    backdrop-filter: blur(5px);
}

.smart-sections-compare-modal {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    width: min(1500px, 100%);
    min-height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #f5f6f8;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .36);
    color: #1d2327;
}

.smart-sections-compare-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 16px;
    background: #fff;
    border-bottom: 1px solid #dcdcde;
}

.smart-sections-compare-header > div {
    display: grid;
    gap: 2px;
}

.smart-sections-compare-header strong {
    font-size: 14px;
}

.smart-sections-compare-header span {
    color: #646970;
    font-size: 10px;
}

.smart-sections-compare-close {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #dcdcde;
    border-radius: 7px;
    background: #fff;
    color: #1d2327;
    cursor: pointer;
    font-size: 23px;
    line-height: 1;
}

.smart-sections-compare-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid #dcdcde;
    background: #fbfbfc;
}

.smart-sections-compare-summary span {
    padding: 4px 7px;
    border: 1px solid #dcdcde;
    border-radius: 999px;
    background: #fff;
    color: #50575e;
    font-size: 9px;
    font-weight: 600;
}

.smart-sections-compare-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 0;
    gap: 1px;
    background: #c3c4c7;
}

.smart-sections-compare-pane {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-width: 0;
    min-height: 0;
    background: #fff;
}

.smart-sections-compare-pane-label {
    padding: 8px 10px;
    border-bottom: 1px solid #e2e4e7;
    background: #fff;
    font-size: 10px;
    font-weight: 700;
}

.smart-sections-compare-pane iframe {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    background: #fff;
}

@media (max-width: 800px) {
    .smart-sections-compare-overlay { padding: 10px; }
    .smart-sections-compare-grid { grid-template-columns: 1fr; overflow: auto; }
    .smart-sections-compare-pane { min-height: 520px; }
}

@media (prefers-reduced-motion: reduce) {
    .smart-sections-repeat-card { transition: none; }
}
.smart-sections-repeat-actions button:disabled {
    opacity: .42;
    cursor: not-allowed;
}
