.wpil-prepublish-panel .wpil-prepublish-review,
.wpil-classic-prepublish-reminder p:last-child {
    margin-top: 12px;
}

.components-notice .wpil-post-save-title {
    order: 1;
    grid-row: 1;
    display: block;
    margin-bottom: 8px;
}

.wpil-classic-prepublish-reminder p,
.wpil-classic-post-save-reminder p,
.components-notice .wpil-post-save-content p {
    margin: 0 0 8px;
    line-height: 1.5;
}

.wpil-prepublish-panel > p {
    margin-bottom: 0;
    line-height: 1.5;
}

.components-notice .wpil-post-save-content p:last-child {
    margin-bottom: 0;
}

.wpil-classic-post-save-reminder .wpil-reminder-actions,
.components-notice:has(.wpil-post-save-content) .components-notice__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.components-notice:has(.wpil-post-save-content) .components-notice__actions > .components-button {
    margin: 0;
}

.editor-post-publish-panel__prepublish:has(> .wpil-prepublish-panel) {
    display: flex;
    flex-direction: column;
}

.editor-post-publish-panel__prepublish:has(> .wpil-prepublish-panel) > .components-panel__body {
    order: 2;
}

.editor-post-publish-panel__prepublish:has(> .wpil-prepublish-panel) > .wpil-prepublish-panel {
    order: 1;
}

@keyframes wpil-prepublish-panel-attention {
    0%,
    100% {
        background-color: #fff8e5;
        box-shadow: inset 4px 0 0 #dba617;
    }

    25%,
    65% {
        background-color: #ffedb1;
        box-shadow: inset 0 0 0 2px #dba617;
    }
}

.wpil-prepublish-panel {
    background-color: #fff8e5;
    box-shadow: inset 4px 0 0 #dba617;
    animation: wpil-prepublish-panel-attention 1.8s ease-out 1;
}

.wpil-classic-prepublish-reminder {
    margin: 8px 0;
    padding: 8px 10px;
    background-color: #fff8e5;
    box-shadow: inset 4px 0 0 #dba617;
    animation: wpil-prepublish-panel-attention 1.8s ease-out 1;
}

.wpil-classic-prepublish-reminder p:last-child,
.wpil-classic-post-save-reminder p:last-child {
    margin-bottom: 0;
}

@keyframes wpil-inbound-link-reminder-attention {
    0% {
        background-color: #ffedb1;
        box-shadow: 0 0 0 3px rgba(219, 166, 23, 0.24);
    }

    100% {
        background-color: #fff8e5;
        box-shadow: 0 0 0 0 rgba(219, 166, 23, 0);
    }
}

.components-notice:has(.wpil-inbound-link-reminder-action) {
    background-color: #fff8e5;
    animation: wpil-inbound-link-reminder-attention 1.2s ease-out 1;
}

.notice.wpil-classic-post-save-reminder {
    padding: 12px 16px;
    animation: wpil-inbound-link-reminder-attention 1.2s ease-out 1;
}

.wpil-classic-post-save-reminder,
.components-notice:has(.wpil-post-save-content) {
    container-type: inline-size;
    container-name: wpil-save-notice;
}

.wpil-post-save-layout,
.components-notice:has(.wpil-post-save-content) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px 24px;
    width: 100%;
}

.components-notice .wpil-post-save-content,
.components-notice:has(.wpil-post-save-content) .components-notice__content,
.components-notice__content > div:has(> .wpil-post-save-content) {
    display: contents;
}

.components-notice:has(.wpil-post-save-content) {
    position: relative;
    box-sizing: border-box;
    padding: 16px 40px 16px 16px;
}

.components-notice:has(.wpil-post-save-content) .components-notice__dismiss {
    position: absolute;
    right: 4px;
    top: 8px;
}

.wpil-post-save-layout > .wpil-post-save-title,
.components-notice .wpil-post-save-title {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
}

.wpil-post-save-layout > .wpil-post-save-message,
.components-notice .wpil-post-save-content > .wpil-post-save-message {
    order: 2;
    grid-row: 2;
    margin: 0;
    max-width: 65ch;
}

.wpil-stat-rail {
    order: 3;
    grid-row: 3;
    padding: 16px 20px;
    background: #f0f0f1;
    border-radius: 3px;
    min-width: 0;
}

.wpil-stat-rail > p {
    color: #50575e;
}

.wpil-stat-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.wpil-stat-values > div + div {
    border-left: 1px solid #dcdcde;
    padding-left: 16px;
}

.wpil-stat-values strong {
    display: block;
    font-size: 32px;
    line-height: 1.2;
    margin-bottom: 4px;
    color: #1d2327;
}

.wpil-stat-values strong.wpil-stat-zero {
    color: #b91c1c;
}

.wpil-stat-values span {
    display: block;
    overflow-wrap: anywhere;
}

.wpil-post-save-layout > .wpil-report-freshness,
.components-notice .wpil-post-save-content > .wpil-report-freshness {
    grid-column: 1 / -1;
    order: 5;
    grid-row: 5;
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid #dcdcde;
    color: #50575e;
    font-size: 12px;
}

.wpil-post-save-layout > .wpil-reminder-actions,
.components-notice:has(.wpil-post-save-content) .components-notice__actions {
    order: 4;
    grid-row: 4;
    margin: 0;
    align-items: center;
}

.wpil-post-save-layout:not(:has(.wpil-stat-rail)) > .wpil-reminder-actions,
.components-notice:has(.wpil-post-save-content):not(:has(.wpil-stat-rail)) > .components-notice__actions {
    grid-row: 3;
}

@container wpil-save-notice (min-width: 700px) {
    .wpil-post-save-layout:has(.wpil-stat-rail) {
        grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr);
    }

    .wpil-post-save-layout > .wpil-stat-rail {
        grid-column: 2;
        grid-row: 1 / 4;
    }

    .wpil-post-save-layout > .wpil-post-save-title,
    .wpil-post-save-layout > .wpil-post-save-message,
    .wpil-post-save-layout > .wpil-reminder-actions {
        grid-column: 1;
    }

    .wpil-post-save-layout:has(.wpil-stat-rail) > .wpil-reminder-actions {
        grid-row: 3;
    }

    .wpil-post-save-layout:has(.wpil-stat-rail) > .wpil-report-freshness {
        grid-row: 4;
    }
}

@media (min-width: 1024px) {
    .components-notice:has(.wpil-stat-rail) {
        grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr);
    }

    .wpil-post-save-content > .wpil-stat-rail {
        grid-column: 2;
        grid-row: 1 / 4;
    }

    .wpil-post-save-content > .wpil-post-save-title,
    .wpil-post-save-content > .wpil-post-save-message,
    .components-notice:has(.wpil-stat-rail) > .components-notice__actions {
        grid-column: 1;
    }

    .components-notice:has(.wpil-stat-rail) > .components-notice__actions {
        grid-row: 3;
    }

    .components-notice .wpil-post-save-content:has(.wpil-stat-rail) > .wpil-report-freshness {
        grid-row: 4;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wpil-prepublish-panel,
    .wpil-classic-prepublish-reminder,
    .notice.wpil-classic-post-save-reminder {
        animation: none;
    }

    .components-notice:has(.wpil-inbound-link-reminder-action) {
        animation: none;
    }
}

.wpil-elementor-reminder {
    position: fixed;
    bottom: 64px;
    right: 16px;
    z-index: 10000;
    width: 320px;
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
    padding: 16px;
    background: #fff8e5;
    color: #1d2327;
    box-shadow: inset 4px 0 0 #dba617, 0 2px 12px rgba(0, 0, 0, 0.18);
    text-align: left;
    animation: wpil-inbound-link-reminder-attention 1.2s ease-out 1;
}

.wpil-elementor-reminder [hidden],
.wpil-elementor-reminder[hidden] {
    display: none !important;
}

.wpil-elementor-reminder p {
    margin: 12px 0;
    line-height: 1.5;
}

.wpil-elementor-reminder-review {
    padding: 8px 12px;
    background: #1d2327;
    color: #fff;
    border: 1px solid #1d2327;
    border-radius: 3px;
    cursor: pointer;
}

.wpil-elementor-reminder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wpil-elementor-reminder-dismiss {
    flex: 0 0 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0;
    line-height: 1;
    border: 0;
    background: transparent;
    color: #1d2327;
    font-size: 22px;
    cursor: pointer;
}

.wpil-elementor-reminder-publish {
    margin-top: 8px;
    padding: 8px 12px;
    border: 1px solid #1d2327;
    border-radius: 3px;
    background: transparent;
    color: #1d2327;
    cursor: pointer;
}

.wpil-elementor-reminder button:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.wpil-elementor-reminder button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.wpil-elementor-reminder-review.wpil-reminder-secondary {
    margin-top: 8px;
    background: transparent;
    color: #1d2327;
    border: 1px solid #1d2327;
}

.wpil-elementor-native-reminder {
    top: 64px;
    bottom: auto;
    right: 12px;
    width: 340px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    border: 1px solid #51565d;
    border-radius: 4px;
    background: #26292c;
    color: #f3f3f3;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
    animation: none;
}

.wpil-elementor-native-reminder .wpil-elementor-reminder-review {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.wpil-elementor-native-reminder .wpil-elementor-reminder-review.wpil-reminder-secondary {
    margin-top: 0;
    background: transparent;
    border-color: #60a5fa;
    color: #60a5fa;
}

.wpil-elementor-publish-confirmation .wpil-elementor-reminder-publish {
    margin-top: 0;
    border-color: #8d939a;
    color: #f3f3f3;
}

.wpil-elementor-confirmation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wpil-elementor-confirmation-actions > button {
    flex: 1 1 140px;
    white-space: normal;
    min-width: max-content;
    max-width: 100%;
    overflow-wrap: anywhere;
    box-sizing: border-box;
}

.wpil-post-save-stats {
    margin: 16px 0;
}

.wpil-elementor-native-reminder .wpil-post-save-stats-caption {
    margin: 0 0 8px;
    color: #c5c8cd;
    font-size: 12px;
}

.wpil-post-save-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.wpil-post-save-stats-grid > div {
    padding: 12px;
    border: 1px solid #51565d;
    border-radius: 4px;
    background: #303438;
}

.wpil-post-save-stats-grid strong {
    display: block;
    color: #60a5fa;
    font-size: 28px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.wpil-post-save-stats-grid span {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #c5c8cd;
}

@media (max-width: 380px) {
    .wpil-elementor-confirmation-actions {
        flex-direction: column;
    }

    .wpil-elementor-confirmation-actions > button {
        flex: auto;
        min-width: 0;
        width: 100%;
    }
}

.wpil-elementor-native-reminder .wpil-elementor-reminder-dismiss {
    color: #f3f3f3;
}

.wpil-elementor-publish-confirmation .wpil-elementor-confirmation-hint {
    margin-bottom: 0;
    color: #c5c8cd;
    font-size: 12px;
}

.wpil-elementor-native-reminder .wpil-elementor-review-handoff,
.wpil-elementor-native-reminder .wpil-post-save-freshness {
    margin-bottom: 0;
    color: #afb4bc;
    font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {
    .wpil-elementor-reminder {
        animation: none;
    }
}

/* Longer experiment labels still fit narrow editor panels. */
.wpil-classic-prepublish-reminder .button,
.wpil-classic-post-save-reminder .button,
.wpil-prepublish-panel .wpil-prepublish-review {
    white-space: normal;
    max-width: 100%;
    height: auto;
}

/* Use Link Whisper's blue for review actions in every editor. */
.wpil-prepublish-panel .wpil-prepublish-review,
.wpil-classic-prepublish-reminder .wpil-classic-reminder-review,
.wpil-classic-post-save-reminder .button-primary,
.components-notice:has(.wpil-post-save-content) .components-button.is-primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.wpil-prepublish-panel .wpil-prepublish-review:hover,
.wpil-classic-prepublish-reminder .wpil-classic-reminder-review:hover,
.wpil-classic-post-save-reminder .button-primary:hover,
.components-notice:has(.wpil-post-save-content) .components-button.is-primary:hover,
.wpil-elementor-native-reminder .wpil-elementor-reminder-review:not(.wpil-reminder-secondary):hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.wpil-classic-post-save-reminder .wpil-classic-reminder-review:not(.button-primary),
.components-notice:has(.wpil-post-save-content) .components-button.is-secondary {
    background: transparent;
    border-color: #2563eb;
    color: #2563eb;
}

.wpil-classic-post-save-reminder .wpil-classic-reminder-review:not(.button-primary):hover,
.components-notice:has(.wpil-post-save-content) .components-button.is-secondary:hover {
    background: #eff6ff;
    border-color: #1d4ed8;
    color: #1d4ed8;
}

.wpil-elementor-native-reminder .wpil-elementor-reminder-review.wpil-reminder-secondary:hover {
    background: #303438;
    border-color: #93c5fd;
    color: #93c5fd;
}

.wpil-elementor-native-reminder .wpil-post-save-stats-grid strong.wpil-stat-zero {
    color: #ff6b6b;
}

/* WordPress floats its publish panel over the content, including notices. */
@media (min-width: 783px) {
    .interface-interface-skeleton:has(.editor-post-publish-panel) .components-notice:has(.wpil-post-save-content) {
        max-width: calc(100% - 280px);
    }
}

/* Logo */
.wpil-post-save-layout > .wpil-post-save-title,
.components-notice .wpil-post-save-title,
.wpil-classic-prepublish-reminder strong,
.wpil-elementor-reminder-header strong {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wpil-post-save-layout > .wpil-post-save-title::before,
.components-notice .wpil-post-save-title::before,
.wpil-classic-prepublish-reminder strong::before,
.wpil-elementor-reminder-header strong::before {
    content: '';
    flex: 0 0 20px;
    height: 22px;
    background: url('../images/lw-icon.png') center / contain no-repeat;
}
