/* ==========================================================================
   Ayush SEO — Website SEO Health Checker (page-specific styles, prefix shc-)
   Builds on the design tokens in styles.css.
   ========================================================================== */

.shc-layout { max-width: 980px; margin-inline: auto; }
.shc-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}
[hidden] { display: none !important; }

/* ---------- Form ---------- */
.shc-label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .5rem; color: var(--color-text); }
.shc-search-row { display: flex; gap: .75rem; flex-wrap: wrap; }
.shc-search-row input {
  flex: 1 1 280px; min-width: 0;
  padding: .95rem 1.05rem;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  font: inherit; font-size: 1rem; color: var(--color-text); background: #fff;
  transition: border-color var(--speed-fast) var(--ease), box-shadow var(--speed-fast) var(--ease);
}
.shc-search-row input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(15,98,254,.12); }
.shc-search-row .btn { flex: 0 0 auto; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
@media (max-width: 560px) { .shc-search-row .btn { flex: 1 1 100%; min-width: 0; white-space: normal; padding-inline: 1rem; } }
@media (max-width: 380px) {
  .shc-tiles { gap: .4rem; }
  .shc-tile { padding: .65rem .55rem; }
  .shc-tile-num { font-size: 1.4rem; }
  .shc-actions .btn { flex: 1 1 100%; white-space: normal; }
}

.shc-usage { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; padding: .65rem .9rem; border-radius: var(--radius-sm); background: var(--color-bg-alt); font-size: .88rem; color: var(--color-text); }
.shc-usage.is-empty { background: rgba(220,38,38,.07); color: #b91c1c; }
.shc-usage-dots { display: inline-flex; gap: .3rem; }
.shc-usage-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--color-secondary); display: block; }
.shc-usage-dots i.is-used { background: #d5dbe5; }
.shc-hint { font-size: .8rem; color: var(--color-text-faint); margin: .75rem 0 0; line-height: 1.55; }

/* ---------- Progress & errors ---------- */
.shc-progress { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 1.25rem; border-radius: var(--radius-md); background: rgba(15,98,254,.06); border: 1px solid rgba(15,98,254,.15); margin-bottom: 1.5rem; }
.shc-spinner { width: 22px; height: 22px; border: 3px solid rgba(15,98,254,.2); border-top-color: var(--color-primary); border-radius: 50%; animation: shc-spin .75s linear infinite; flex-shrink: 0; margin-top: .1rem; }
@keyframes shc-spin { to { transform: rotate(360deg); } }
.shc-progress-title { font-weight: 600; color: var(--color-primary); margin: 0 0 .4rem; }
.shc-progress-steps { margin: 0; padding-left: 1.1rem; font-size: .86rem; color: var(--color-text-faint); line-height: 1.8; }
.shc-progress-steps li.is-done { color: var(--color-secondary-dark); }
.shc-progress-steps li.is-active { color: var(--color-text); font-weight: 600; }

.shc-alert { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem 1.15rem; border-radius: var(--radius-md); background: rgba(220,38,38,.06); border: 1px solid rgba(220,38,38,.2); color: #991b1b; margin-bottom: 1.5rem; }
.shc-alert.is-info { background: rgba(255,184,0,.1); border-color: rgba(255,184,0,.35); color: #7a4f00; }
.shc-alert svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: .1rem; }
.shc-alert p { margin: 0; line-height: 1.55; font-size: .93rem; }
.shc-alert .shc-alert-title { font-weight: 700; margin-bottom: .2rem; font-size: 1rem; }

/* ---------- Overview ---------- */
.shc-overview { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 760px) { .shc-overview { grid-template-columns: 220px 1fr; } }
.shc-score { position: relative; width: 190px; height: 190px; margin-inline: auto; }
.shc-score svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.shc-score-track { fill: none; stroke: var(--color-bg-alt); stroke-width: 14; }
.shc-score-bar { fill: none; stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset 1.1s var(--ease); }
.shc-score-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.shc-score-num { font-family: var(--font-heading); font-weight: 700; font-size: 3rem; line-height: 1; color: var(--color-text); }
.shc-score-num small { font-size: 1rem; color: var(--color-text-faint); font-weight: 600; }
.shc-score-label { font-weight: 700; font-size: .9rem; margin-top: .35rem; }
.shc-score-caption { text-align: center; font-size: .76rem; color: var(--color-text-faint); margin: .6rem auto 0; max-width: 210px; line-height: 1.4; }

.shc-page-url { font-family: var(--font-heading); font-size: clamp(1.15rem, 2.6vw, 1.45rem); font-weight: 600; margin: 0; word-break: break-all; }
.shc-page-title { color: var(--color-text-muted); margin: .25rem 0 0; font-size: .93rem; }
.shc-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.shc-badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 600; padding: .25rem .6rem; border-radius: var(--radius-pill); background: var(--color-bg-alt); color: var(--color-text-muted); border: 1px solid var(--color-border); }
.shc-badge svg { width: 13px; height: 13px; }

.shc-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin-top: 1.1rem; }
.shc-tile { border-radius: var(--radius-sm); padding: .8rem .9rem; border: 1.5px solid var(--color-border); background: #fff; text-align: left; cursor: pointer; font: inherit; color: inherit; transition: border-color var(--speed-fast), transform var(--speed-fast); }
.shc-tile:hover, .shc-tile:focus-visible { transform: translateY(-2px); }
.shc-tile-num { display: block; font-family: var(--font-heading); font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
.shc-tile-label { display: block; font-size: .78rem; font-weight: 600; color: var(--color-text-muted); }
.shc-tile.is-critical .shc-tile-num { color: #dc2626; }
.shc-tile.is-warning .shc-tile-num { color: #d97706; }
.shc-tile.is-passed .shc-tile-num { color: var(--color-secondary-dark); }
.shc-tile.is-critical:hover { border-color: #fca5a5; }
.shc-tile.is-warning:hover { border-color: #fcd34d; }
.shc-tile.is-passed:hover { border-color: #6ee7b7; }

/* ---------- Section titles ---------- */
.shc-h { display: flex; align-items: center; gap: .55rem; font-family: var(--font-heading); font-size: 1.12rem; font-weight: 600; margin: 0 0 1rem; color: var(--color-text); }
.shc-h svg { width: 20px; height: 20px; color: var(--color-primary); flex-shrink: 0; }

/* ---------- Priorities ---------- */
.shc-priorities { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; counter-reset: pri; }
.shc-priority { display: grid; grid-template-columns: 34px 1fr; gap: .85rem; padding: .9rem 1rem; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); counter-increment: pri; }
.shc-priority::before { content: counter(pri); width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-heading); background: rgba(15,98,254,.1); color: var(--color-primary); }
.shc-priority.is-critical::before { background: rgba(220,38,38,.1); color: #dc2626; }
.shc-priority.is-warning::before { background: rgba(217,119,6,.12); color: #b45309; }
.shc-priority-title { font-weight: 600; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.shc-priority-summary { margin: .2rem 0 0; font-size: .9rem; color: var(--color-text-muted); }
.shc-priority-fix { margin: .45rem 0 0; font-size: .88rem; color: var(--color-text); }
.shc-priority-fix strong { color: var(--color-primary); }
.shc-empty-state { color: var(--color-text-muted); margin: 0; }

/* ---------- Status chips & icons ---------- */
.shc-chip { display: inline-flex; align-items: center; font-size: .68rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: .18rem .5rem; border-radius: var(--radius-pill); }
.shc-chip.is-critical { background: rgba(220,38,38,.1); color: #b91c1c; }
.shc-chip.is-warning { background: rgba(217,119,6,.12); color: #b45309; }
.shc-chip.is-passed { background: rgba(0,196,140,.12); color: var(--color-secondary-dark); }
.shc-chip.is-info { background: rgba(15,98,254,.08); color: var(--color-primary); }
.shc-icon { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.shc-icon svg { width: 15px; height: 15px; }
.shc-icon.is-critical { background: #dc2626; color: #fff; }
.shc-icon.is-warning { background: #f59e0b; color: #fff; }
.shc-icon.is-passed { background: var(--color-secondary); color: #fff; }
.shc-icon.is-info { background: rgba(15,98,254,.12); color: var(--color-primary); }

/* ---------- Filters ---------- */
.shc-filters { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1.1rem; }
.shc-filter { font: inherit; font-size: .85rem; font-weight: 600; padding: .45rem .95rem; border-radius: var(--radius-pill); border: 1.5px solid var(--color-border); background: #fff; color: var(--color-text-muted); cursor: pointer; }
.shc-filter[aria-pressed="true"] { background: var(--color-text); color: #fff; border-color: var(--color-text); }
.shc-filter:focus-visible { outline: 3px solid rgba(15,98,254,.35); outline-offset: 2px; }

/* ---------- Category & checks ---------- */
.shc-cat-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .9rem; }
.shc-cat-head .shc-h { margin: 0; }
.shc-cat-counts { display: flex; gap: .35rem; flex-wrap: wrap; }
.shc-checks { display: grid; gap: .55rem; }
.shc-check { border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); overflow: hidden; }
.shc-check.is-critical { border-left: 4px solid #dc2626; }
.shc-check.is-warning { border-left: 4px solid #f59e0b; }
.shc-check.is-passed { border-left: 4px solid var(--color-secondary); }
.shc-check.is-info { border-left: 4px solid rgba(15,98,254,.45); }
.shc-check > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 26px 1fr 18px; gap: .75rem; align-items: start; padding: .8rem .95rem; }
.shc-check > summary::-webkit-details-marker { display: none; }
.shc-check > summary:focus-visible { outline: 3px solid rgba(15,98,254,.35); outline-offset: -3px; }
.shc-check-title { font-weight: 600; font-size: .95rem; margin: 0; display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; }
.shc-check-summary { margin: .15rem 0 0; font-size: .88rem; color: var(--color-text-muted); word-break: break-word; }
.shc-check-caret { width: 18px; height: 18px; color: var(--color-text-faint); margin-top: .25rem; transition: transform var(--speed-fast); }
.shc-check[open] .shc-check-caret { transform: rotate(180deg); }
.shc-check-body { padding: 0 .95rem .95rem calc(.95rem + 26px + .75rem); font-size: .88rem; color: var(--color-text-muted); line-height: 1.6; }
@media (max-width: 560px) { .shc-check-body { padding-left: .95rem; } }
.shc-check-body p { margin: 0 0 .6rem; }
.shc-fix { background: rgba(15,98,254,.05); border: 1px solid rgba(15,98,254,.15); border-radius: var(--radius-sm); padding: .65rem .8rem; color: var(--color-text); }
.shc-fix strong { color: var(--color-primary); }
.shc-items { width: 100%; border-collapse: collapse; margin-top: .4rem; font-size: .82rem; table-layout: fixed; }
.shc-items th, .shc-items td { text-align: left; padding: .4rem .5rem; border-top: 1px solid var(--color-border); vertical-align: top; word-break: break-word; }
.shc-items th { width: 34%; color: var(--color-text-faint); font-weight: 600; }
@media (min-width: 640px) { .shc-items th { width: 26%; } }
.shc-items td { color: var(--color-text); font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .78rem; }

/* ---------- Notes & actions ---------- */
.shc-notes { margin: 0; padding-left: 1.1rem; font-size: .84rem; color: var(--color-text-muted); line-height: 1.7; }
.shc-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin: .25rem 0 1.5rem; }
.shc-actions .btn { padding: .7rem 1.2rem; font-size: .9rem; }

/* ---------- Lead generation ---------- */
.shc-lead { display: grid; gap: 1.75rem; grid-template-columns: 1fr; border-top: 4px solid var(--color-primary); }
@media (min-width: 860px) { .shc-lead { grid-template-columns: 1fr 1.1fr; } }
.shc-lead-intro h2 { font-size: clamp(1.3rem, 2.6vw, 1.65rem); margin: 0 0 .6rem; line-height: 1.3; }
.shc-lead-intro p { color: var(--color-text-muted); margin: 0 0 1.1rem; line-height: 1.65; }
.shc-enquiry-title { font-weight: 700; margin: 0 0 .75rem; }
.shc-enquiry-title span { font-weight: 500; color: var(--color-text-faint); }
.shc-field { margin-bottom: .75rem; }
.shc-field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .3rem; }
.shc-field input, .shc-field textarea { width: 100%; padding: .7rem .85rem; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); font: inherit; font-size: .95rem; color: var(--color-text); background: #fff; resize: vertical; }
.shc-field input:focus, .shc-field textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(15,98,254,.12); }
.shc-field.has-error input, .shc-field.has-error textarea { border-color: #dc2626; }
.shc-field-error { color: #b91c1c; font-size: .8rem; margin: .25rem 0 0; min-height: 0; }
.shc-field-error:empty { display: none; }
.shc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.shc-form-msg { margin: .75rem 0 0; font-size: .9rem; font-weight: 600; }
.shc-form-msg.is-ok { color: var(--color-secondary-dark); }
.shc-form-msg.is-err { color: #b91c1c; }
.shc-form-msg:empty { display: none; }
.shc-privacy-note { font-size: .78rem; color: var(--color-text-faint); margin: .6rem 0 0; }

/* ---------- Print / Save as PDF ---------- */
@media print {
  .shc-form-card, .shc-progress, .shc-alert, .shc-filters, .shc-actions, .shc-lead, #what-we-check, #faq, .hero { display: none !important; }
  .shc-card { box-shadow: none; break-inside: avoid-page; }
  .shc-check-body { display: block !important; }
  .shc-check { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) {
  .shc-score-bar, .shc-spinner { transition: none; animation-duration: 2s; }
}
