/* ==================================================
   Nuclear Fancy Pants Edition™ — NUCLEAR+++
   File: /assets/css/content-freshness.css
   Description: Content Health dashboard styles
   Last Edited: 2026-04-26
   ================================================== */

@import url('fonts.css');

#wpcontent,
#wpbody,
#wpbody-content {
    background: #F9FAFB !important;
}

#amai-content-health-wrap {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    max-width: 100%;
    padding-top: 24px;
}

.amai-ch-subtitle {
    font-size: 14px;
    color: #78716C;
    margin: 4px 0 0;
}

/* ── Section ────────────────────────────────────────── */
.amai-ch-section {
    background: #fff;
    border: 1.5px solid #E7DDD5;
    border-radius: 16px;
    margin-bottom: 28px;
    overflow: hidden;
}

.amai-ch-section-header {
    padding: 20px 24px 16px;
    border-bottom: 1.5px solid #E7DDD5;
}

.amai-ch-section-title {
    font-family: 'Nunito', sans-serif;
    font-size: 17px;
    font-weight: 800;
    color: #1C1917;
    margin-bottom: 3px;
}

.amai-ch-section-desc {
    font-size: 13px;
    color: #78716C;
}

/* ── Empty state ────────────────────────────────────── */
.amai-ch-empty {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 28px 24px;
    color: #78716C;
    font-size: 14px;
}

.amai-ch-empty-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #F0FDF4;
    color: #16A34A;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Table ──────────────────────────────────────────── */
.amai-ch-table-head {
    display: flex;
    align-items: center;
    padding: 10px 24px;
    background: #FAFAF9;
    border-bottom: 1px solid #F0EDE9;
    font-size: 11px;
    font-weight: 700;
    color: #A8A29E;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.amai-ch-row {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid #F0EDE9;
    transition: background 0.1s;
}

.amai-ch-row:last-child {
    border-bottom: none;
}

.amai-ch-row:hover {
    background: #FAFAF9;
}

/* ── Columns ────────────────────────────────────────── */
.amai-ch-col {
    display: flex;
    align-items: center;
}

.amai-ch-col--title {
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.amai-ch-col--score {
    width: 110px;
    justify-content: center;
    flex-shrink: 0;
}

.amai-ch-col--issues {
    width: 200px;
    gap: 6px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.amai-ch-col--stale {
    width: 140px;
    flex-shrink: 0;
}

.amai-ch-col--action {
    width: 140px;
    gap: 8px;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* ── Post title + date ──────────────────────────────── */
.amai-ch-post-title {
    font-size: 14px;
    font-weight: 600;
    color: #1C1917;
    line-height: 1.3;
}

.amai-ch-post-date {
    font-size: 12px;
    color: #A8A29E;
}

/* ── Score dials ────────────────────────────────────── */
.amai-ch-dial {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 800;
    border: 2.5px solid #E7DDD5;
    background: #fff;
    color: #A8A29E;
}

.amai-ch-dial--good { border-color: #22C55E; color: #16A34A; background: #F0FDF4; }
.amai-ch-dial--ok   { border-color: #F59E0B; color: #D97706; background: #FFFBEB; }
.amai-ch-dial--poor { border-color: #EF4444; color: #DC2626; background: #FEF2F2; }

/* ── Badges ─────────────────────────────────────────── */
.amai-ch-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.amai-ch-badge--error      { background: #FEE2E2; color: #DC2626; }
.amai-ch-badge--warning    { background: #FEF3C7; color: #D97706; }
.amai-ch-badge--suggestion { background: #EFF6FF; color: #2563EB; }

/* ── Stale badge ────────────────────────────────────── */
.amai-ch-stale-badge {
    font-size: 12px;
    font-weight: 600;
    color: #D97706;
    background: #FEF3C7;
    padding: 2px 8px;
    border-radius: 20px;
}

/* ── Buttons ────────────────────────────────────────── */
.amai-ch-edit-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: transparent;
    color: #D97757;
    border: 1.5px solid #D97757;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.amai-ch-edit-btn:hover {
    background: #D97757;
    color: #fff;
}

.amai-ch-refresh-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #D97757;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    white-space: nowrap;
}

.amai-ch-refresh-btn:hover    { background: #C4663F; }
.amai-ch-refresh-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Refresh status ─────────────────────────────────── */
.amai-ch-row-status {
    font-size: 12px;
    color: #78716C;
    margin-top: 4px;
    width: 100%;
}

.amai-ch-row-status--success { color: #16A34A; }
.amai-ch-row-status--error   { color: #DC2626; }
/* ── Page header row ────────────────────────────────── */
.amai-ch-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 28px;
}

/* ── Re-analyze button ──────────────────────────────── */
.amai-ch-rescan-btn {
    padding: 8px 18px;
    background: transparent;
    color: #D97757;
    border: 1.5px solid #D97757;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.amai-ch-rescan-btn:hover    { background: #D97757; color: #fff; }
.amai-ch-rescan-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.amai-ch-rescan-status {
    font-size: 12.5px;
    color: #78716C;
    margin-bottom: 16px;
    min-height: 18px;
}

.amai-ch-rescan-status--success { color: #16A34A; }
.amai-ch-rescan-status--error   { color: #DC2626; }

/* ── Section count pill ─────────────────────────────── */
.amai-ch-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F0EDE9;
    color: #78716C;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    padding: 1px 7px;
    margin-left: 8px;
    vertical-align: middle;
}

/* ── Section header toggle ──────────────────────────── */
.amai-ch-section-header--toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.amai-ch-section-chevron {
    font-size: 10px;
    color: #A8A29E;
    transition: transform 0.2s;
}

.amai-ch-section-chevron--collapsed {
    transform: rotate(180deg);
}

.amai-ch-section-all-good {
    font-size: 12px;
    font-weight: 600;
    color: #16A34A;
}

/* ── Collapsed section ──────────────────────────────── */
.amai-ch-section--collapsed {
    border-color: #F0EDE9;
}

/* ── Auto-Optimize button (primary CTA in Needs Attention) ── */
.amai-ch-optimize-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #D97757;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
    white-space: nowrap;
    cursor: pointer;
}

.amai-ch-optimize-btn:hover { background: #C4663F; color: #fff; }

/* ── Action column wider for two buttons ────────────── */
.amai-ch-col--action {
    width: 180px;
}

/* ── Muted section title (empty stale) ─────────────── */
.amai-ch-section-title--muted {
    color: #A8A29E;
    font-size: 15px;
}
