/* ── Content Marketing OS — Audit Widget ────────────────── */
@keyframes cmosapin { to { transform: rotate(360deg); } }
@keyframes cmosfadein { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }

.cmos-audit-wrap {
    max-width: 820px;
    margin: 0 auto;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Hero */
.cmos-audit-hero {
    text-align: center;
    padding: 56px 24px 48px;
}
.cmos-audit-badge {
    display: inline-block;
    background: #ede9fb;
    color: #534AB7;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 18px;
    letter-spacing: 0.02em;
}
#cmos-audit-heading {
    font-size: 38px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 14px;
    line-height: 1.2;
}
.cmos-audit-sub {
    font-size: 16px;
    color: #555;
    max-width: 560px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

/* Audit bar */
#cmos-audit-bar {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto 12px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 14px;
    padding: 6px 6px 6px 16px;
    align-items: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}
#cmos-audit-bar:focus-within {
    border-color: #534AB7;
    box-shadow: 0 0 0 4px rgba(83,74,183,0.08);
}
#cmos-audit-url {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #1a1a1a;
    outline: none;
}
#cmos-audit-url::placeholder { color: #aaa; }
#cmos-audit-btn {
    background: #534AB7;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.1s;
}
#cmos-audit-btn:hover  { background: #3C3489; }
#cmos-audit-btn:active { transform: scale(0.97); }
#cmos-audit-btn:disabled { background: #ccc; cursor: not-allowed; }

#cmos-audit-email-row {
    max-width: 600px;
    margin: 0 auto;
}
#cmos-audit-email {
    width: 100%;
    background: #f4f4f4;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #1a1a1a;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
#cmos-audit-email:focus { border-color: #534AB7; }

/* Loading */
.cmos-audit-loading {
    text-align: center;
    padding: 56px 24px;
}
.cmos-audit-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #e0e0e0;
    border-top-color: #534AB7;
    border-radius: 50%;
    animation: cmosapin 0.8s linear infinite;
    margin: 0 auto 16px;
}
.cmos-audit-loading p {
    color: #888;
    font-size: 14px;
}

/* Results */
.cmos-audit-results {
    animation: cmosfadein 0.4s ease;
}
.cmos-audit-score-card {
    display: flex;
    gap: 24px;
    align-items: center;
    background: #fff;
    border: 1.5px solid #e8e8e8;
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.cmos-audit-score-ring {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}
.cmos-score-number {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 800;
    color: #534AB7;
}
.cmos-audit-score-info { flex: 1; min-width: 200px; }
.cmos-audit-score-info h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1a1a1a;
}

/* Sections */
.cmos-audit-section {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    padding: 22px 24px;
    margin-bottom: 16px;
}
.cmos-audit-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 14px;
    color: #1a1a1a;
}
.cmos-audit-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cmos-audit-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #444;
    line-height: 1.5;
    padding: 10px 14px;
    background: #f8f8f8;
    border-radius: 10px;
}
.cmos-audit-wins .cmos-audit-item {
    background: #e8f5e9;
    color: #0F6E56;
}
.cmos-audit-opps .cmos-audit-item {
    background: #ede9fb;
    color: #3C3489;
    font-weight: 500;
}
.cmos-audit-item::before {
    content: '•';
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}
.cmos-audit-wins .cmos-audit-item::before { content: '✓'; font-weight: 700; }
.cmos-audit-opps .cmos-audit-item::before { content: '→'; }

/* Topic clusters */
.cmos-clusters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.cmos-cluster-card {
    background: #f4f4f4;
    border-radius: 10px;
    padding: 14px;
}
.cmos-cluster-title {
    font-size: 13px;
    font-weight: 700;
    color: #534AB7;
    margin-bottom: 8px;
}
.cmos-cluster-subtopics { list-style: none; padding: 0; margin: 0; }
.cmos-cluster-subtopics li {
    font-size: 12px;
    color: #555;
    padding: 3px 0;
    border-bottom: 1px solid #e8e8e8;
}
.cmos-cluster-subtopics li:last-child { border-bottom: none; }

/* Calendar */
.cmos-calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.cmos-cal-week {
    background: #f8f8f8;
    border-radius: 10px;
    padding: 14px;
}
.cmos-cal-week-label {
    font-size: 12px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.cmos-cal-topics { list-style: none; padding: 0; margin: 0; }
.cmos-cal-topics li {
    font-size: 12px;
    color: #444;
    padding: 4px 0;
    border-bottom: 1px solid #e8e8e8;
}
.cmos-cal-topics li:last-child { border-bottom: none; }

/* CTA */
.cmos-audit-cta {
    background: linear-gradient(135deg, #534AB7 0%, #3C3489 100%);
    border-radius: 16px;
    padding: 40px 36px;
    text-align: center;
    color: #fff;
    margin-top: 24px;
}
.cmos-audit-cta h2 {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 10px;
}
.cmos-audit-cta p {
    font-size: 15px;
    opacity: 0.85;
    margin: 0 0 24px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}
.cmos-cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cmos-audit-cta .cmos-btn-primary {
    background: #fff;
    color: #534AB7;
}
.cmos-audit-cta .cmos-btn-primary:hover { background: #ede9fb; color: #534AB7; }
.cmos-audit-cta .cmos-btn-outline {
    border-color: rgba(255,255,255,0.6);
    color: #fff;
    background: transparent;
}
.cmos-audit-cta .cmos-btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* Focus fix for URL input */
#cmos-audit input[type="url"]:focus,
#cmos-audit input:focus,
#cmos-audit input:active {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
}
#cmos-audit-bar:focus-within {
    border-color: #534AB7 !important;
    box-shadow: 0 0 0 4px rgba(83,74,183,0.08) !important;
}

@media (max-width: 640px) {
    #cmos-audit-heading { font-size: 26px !important; }
    #cmos-audit-bar { flex-direction: column; border-radius: 14px; padding: 10px; gap: 8px; }
    #cmos-audit-url { text-align: center; }
    #cmos-audit-btn { width: 100%; border-radius: 10px; }
    .cmos-audit-score-card { flex-direction: column; align-items: center; text-align: center; }
    .cmos-audit-hero { padding: 36px 16px 32px; }
}
