/* ================================================================
   Klyvora Website + AI Search Audit - shared widget styles
   Used on both the homepage "Free Website Audit" section and the
   full /seo-audit page. Built entirely from the site's existing
   design tokens (obsidian/navy/cyan/mint/cloud, radii, container).
   ================================================================ */

.audit-widget { max-width: 760px; margin: 0 auto; }
.audit-widget * { box-sizing: border-box; }

.aw-panel { background: var(--navy-soft); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 24px; }
.aw-scan-row { display: flex; gap: 12px; flex-wrap: wrap; }
.aw-field { flex: 1 1 220px; display: flex; flex-direction: column; gap: 6px; }
.aw-field label { font-size: 12px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; color: var(--muted); }
.aw-field input { background: var(--navy); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 14px 16px; color: var(--cloud); font-family: var(--font-body); font-size: 15px; outline: none; width: 100%; }
.aw-field input::placeholder { color: var(--muted); }
.aw-field input:focus { border-color: var(--cyan); }
.aw-field input.aw-invalid { border-color: #d03b3b; }
.aw-scan-actions { flex: 0 0 auto; display: flex; align-items: flex-end; }
.aw-scan-actions .btn { white-space: nowrap; }
.aw-scan-actions .btn:disabled { opacity: .6; cursor: default; }

.aw-consent { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--muted); cursor: pointer; line-height: 1.5; }
.aw-consent input { margin-top: 3px; accent-color: var(--cyan); flex: 0 0 auto; }

.aw-microcopy { font-size: 13px; color: var(--muted); margin: 14px 0 0; text-align: center; }
.aw-microcopy-sub { font-size: 12px; color: var(--muted); margin: 4px 0 0; text-align: center; opacity: .8; }
.aw-open-full { display: block; text-align: center; margin-top: 14px; font-size: 13px; color: var(--cyan); text-decoration: none; }
.aw-open-full:hover { text-decoration: underline; }

.aw-error { display: none; margin-top: 16px; background: rgba(208,59,59,0.14); border: 1px solid rgba(208,59,59,0.4); color: #ffb4b4; border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14px; }
.aw-error.show { display: block; }

/* Ready-to-scan placeholder state */
.aw-ready { margin-top: 22px; text-align: center; border: 1px dashed var(--border-soft); border-radius: var(--radius-lg); padding: 30px 20px; }
.aw-ready-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--cloud); margin-bottom: 8px; }
.aw-ready p { font-size: 14px; color: var(--muted); margin: 0 0 4px; max-width: 420px; margin-left: auto; margin-right: auto; }
.aw-ready-sub { font-size: 12px !important; opacity: .75; }

/* Scanning / progress state */
.aw-progress { display: none; margin-top: 22px; text-align: center; padding: 34px 20px; }
.aw-progress.show { display: block; }
.aw-spinner { width: 34px; height: 34px; margin: 0 auto 18px; border-radius: 50%; border: 3px solid var(--border-soft); border-top-color: var(--cyan); animation: aw-spin 0.9s linear infinite; }
@keyframes aw-spin { to { transform: rotate(360deg); } }
.aw-progress-text { font-size: 14px; color: var(--cloud); font-weight: 500; min-height: 20px; transition: opacity .25s ease; }

/* Results */
.aw-results { display: none; margin-top: 26px; }
.aw-results.show { display: block; animation: aw-fadein .4s ease; }
@keyframes aw-fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.aw-complete-flag { text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--mint); margin-bottom: 10px; }
.aw-hero { text-align: center; background: var(--navy-soft); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 28px; margin-bottom: 18px; }
.aw-hero-url { font-size: 13px; color: var(--muted); word-break: break-all; margin-bottom: 10px; }
.aw-hero-value { font-family: var(--font-display); font-size: 56px; font-weight: 700; line-height: 1; }
.aw-hero-value span { font-size: 22px; color: var(--muted); font-weight: 600; }
.aw-hero-label { font-size: 13px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); margin: 8px 0 16px; }
.aw-meter { height: 10px; border-radius: 999px; background: var(--navy); overflow: hidden; }
.aw-hero .aw-meter { max-width: 320px; margin: 0 auto; }
.aw-meter-fill { height: 100%; width: 0; border-radius: 999px; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.aw-sent-line { font-size: 12.5px; color: var(--muted); margin-top: 14px; }

.aw-cats { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 22px; }
@media (min-width: 720px) { .aw-cats { grid-template-columns: repeat(3,1fr); } }
.aw-cat-card { background: var(--navy-soft); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 16px 18px; }
.aw-cat-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.aw-cat-name { font-weight: 600; font-size: 13.5px; color: var(--cloud); }
.aw-cat-score { font-weight: 700; font-size: 15px; }
.aw-cat-note { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.4; }

.aw-section-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--cloud); margin: 26px 0 12px; }

.aw-priority { display: flex; gap: 12px; padding: 16px 18px; background: var(--navy-soft); border: 1px solid var(--border-soft); border-radius: var(--radius-md); margin-bottom: 10px; text-align: left; }
.aw-priority-icon { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: var(--obsidian); margin-top: 1px; }
.aw-priority-body { flex: 1; min-width: 0; }
.aw-priority-badge { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; margin-bottom: 6px; }
.aw-priority-label { font-weight: 600; font-size: 14.5px; margin-bottom: 4px; color: var(--cloud); }
.aw-priority-why { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 6px; }
.aw-priority-fix { font-size: 13px; color: var(--cloud); line-height: 1.5; }
.aw-priority-fix b { color: var(--cyan); }

.aw-doing-well { background: var(--navy-soft); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 18px 20px; margin-bottom: 10px; }
.aw-doing-well ul { list-style: none; margin: 0; padding: 0; columns: 1; }
@media (min-width: 640px) { .aw-doing-well ul { columns: 2; column-gap: 24px; } }
.aw-doing-well li { font-size: 13.5px; color: var(--cloud); padding: 6px 0; break-inside: avoid; }
.aw-doing-well li::before { content: "\2713"; color: var(--mint); font-weight: 800; margin-right: 8px; }

.aw-details { margin-top: 18px; }
.aw-details-toggle { width: 100%; text-align: left; background: var(--navy-soft); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 14px 18px; color: var(--cloud); font-family: var(--font-body); font-size: 14px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.aw-details-toggle .aw-chevron { transition: transform .2s ease; color: var(--muted); }
.aw-details-toggle[aria-expanded="true"] .aw-chevron { transform: rotate(180deg); }
.aw-details-panel { display: none; padding: 6px 18px 16px; }
.aw-details-panel.show { display: block; }
.aw-detail-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.aw-detail-row:last-child { border-bottom: none; }
.aw-detail-row-label { color: var(--cloud); flex: 1; }
.aw-detail-row-status { flex: 0 0 auto; font-weight: 600; }
.aw-detail-row-status.pass { color: #0ca30c; }
.aw-detail-row-status.warn { color: #fab219; }
.aw-detail-row-status.fail { color: #d03b3b; }
.aw-detail-row-note { font-size: 12px; color: var(--muted); width: 100%; margin-top: 3px; }

/* Fix-It CTA block */
.aw-cta-block { margin-top: 36px; text-align: center; background: var(--navy-soft); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 32px 24px; }
.aw-cta-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--cyan); margin-bottom: 10px; }
.aw-cta-headline { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--cloud); margin: 0 0 12px; }
.aw-cta-copy { font-size: 14px; color: var(--muted); max-width: 520px; margin: 0 auto 20px; line-height: 1.6; }
.aw-cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.aw-cta-note { font-size: 12.5px; color: var(--muted); margin-top: 16px; opacity: .85; }

@media (max-width: 640px) {
  .aw-hero-value { font-size: 44px; }
  .aw-cta-actions { flex-direction: column; align-items: stretch; }
}
