/* ─────────────────────────────────────────────
   wcag-checker.css
   Taruh di: user/themes/radikal/css/wcag-checker.css
   Load di wcag.html.twig via:
   {% do assets.addCss('theme://css/wcag-checker.css') %}
───────────────────────────────────────────── */

/* ── Form input URL ── */
.wcag-checker #url-input {
  flex: 1 !important;
  background: rgba(241,242,243,0.1) !important;
  border: 1px solid rgba(241,242,243,0.25) !important;
  border-radius: 2em .5em .5em 2em !important;
  color: #F1F2F3 !important;
  font-family: inherit !important;
  font-size: .875em !important;
  padding: .75em 1.25em !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color 0.2s !important;
  width: 100% !important;
}
.wcag-checker #url-input:focus {
  border-color: #FFFF75 !important;
  outline: 4px solid #FFFF75 !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
  background: rgba(241,242,243,0.15) !important;
}
.wcag-checker #url-input::placeholder { color: rgba(241,242,243,0.4) !important; }

.wcag-checker .form-row {
  display: flex !important;
  gap: .5em !important;
  margin-bottom: 1em !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* ── WCAG tag checkboxes ── */
.wcag-tags {
  border: none !important;
  padding: 0 !important;
  margin: 0 0 1.5em 0 !important;
  display: flex;
  flex-wrap: wrap;
  gap: .5em;
}
.wcag-tags-legend {
  font-size: .75em;
  color: rgba(241,242,243,0.6);
  margin-bottom: .5em;
  float: left;
  width: 100%;
}
.wcag-tag-label {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  background: rgba(241,242,243,0.08);
  border: 1px solid rgba(241,242,243,0.2);
  border-radius: 1em .25em;
  color: rgba(241,242,243,0.6);
  cursor: pointer;
  font-size: .75em;
  padding: .35em .9em;
  transition: all 0.2s;
  user-select: none;
}
.wcag-tag-label:hover {
  background: rgba(241,242,243,0.15);
  color: rgba(241,242,243,0.9);
}
.wcag-tag-label input[type="checkbox"] {
  accent-color: #FFFF75;
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.wcag-tag-label:has(input:checked) {
  border-color: #FFFF75;
  color: #FFFF75;
  background: rgba(255,255,117,0.12);
  font-weight: 700;
}

/* ── Status message ── */
.wcag-checker #status {
  font-size: .8em;
  opacity: .7;
  margin-bottom: 1em;
  min-height: 1.5em;
}
.wcag-checker #status.error {
  color: #FF7575;
  opacity: 1;
}

/* ── Results wrapper ── */
#results {
  display: none;
  padding: 2em 0;
}

/* ── Summary cards ── */
.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .75em;
  margin-bottom: 2em;
}
.summary-card {
  background: #F1F2F3;
  border-radius: 3em 1em;
  padding: 1.25em 1em;
  text-align: center;
  color: #212223;
}
.summary-card .count {
  font-size: 2em;
  font-weight: 700;
  line-height: 1;
  margin-bottom: .2em;
}
.summary-card .label {
  font-size: .6em;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #666;
}
.summary-card.critical .count { color: #CC0000; }
.summary-card.serious .count  { color: #994400; }
.summary-card.moderate .count { color: #776600; }
.summary-card.minor .count    { color: #0F6E56; }
.summary-card.passes .count   { color: #0F6E56; }

/* ── Section title ── */
.section-title {
  font-size: .7em;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(241,242,243,0.9);
  margin-bottom: .75em;
}

/* ── CTA card ── */
.cta-card {
  border-radius: 3em 1em;
  padding: 2em 2.5em;
  margin-bottom: 2em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5em;
  flex-wrap: wrap;
}
.cta-card.has-violations { background: #F1F2F3; color: #212223; }
.cta-card.no-violations  { background: #E5ECE9; color: #212223; }
.cta-card .cta-icon { font-size: 2.5em; flex-shrink: 0; line-height: 1; }
.cta-card .cta-body { flex: 1; }
.cta-card .cta-eyebrow {
  font-size: .6em;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .5;
  margin-bottom: .25em;
}
.cta-card .cta-title { font-size: 1em; font-weight: 700; margin-bottom: .35em; }
.cta-card .cta-desc  { font-size: .75em; opacity: .75; line-height: 1.5; }
.cta-card .cta-actions { display: flex; flex-direction: column; gap: .5em; flex-shrink: 0; }

/* ── Violation list ── */
.violation {
  background: #F1F2F3;
  border-radius: 3em 1em;
  margin-bottom: .75em;
  overflow: hidden;
  color: #212223;
}
.violation-header {
  cursor: pointer;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: .4em .6em;
  padding: 1em 1.5em;
  user-select: none;
  transition: background 0.2s;
}
.violation-header:hover { background: #E5ECE9; }

/* Mobile: description wraps to second row */
.violation .badge       { grid-column: 1; grid-row: 1; align-self: center; }
.violation-id           { grid-column: 2; grid-row: 1; align-self: center; }
.violation-toggle       { grid-column: 4; grid-row: 1; align-self: center; }
.violation-desc         { grid-column: 1 / -1; grid-row: 2; }

/* Desktop: single row */
@media (min-width: 576px) {
  .violation-header { grid-template-rows: 1fr; }
  .violation-desc   { grid-column: 3; grid-row: 1; }
}

.badge {
  border-radius: .5em .125em;
  font-size: .55em;
  font-weight: 700;
  letter-spacing: .06em;
  padding: .3em .7em;
  text-transform: uppercase;
}
.badge.critical { background: #FFDDDD; color: #880000; }
.badge.serious  { background: #FFE8CC; color: #884400; }
.badge.moderate { background: #FFFACC; color: #665500; }
.badge.minor    { background: #DDFAF0; color: #0F5040; }

.violation-id {
  font-family: monospace;
  font-size: .65em;
  color: #000099;
  font-weight: 700;
}
.violation-desc    { font-size: .75em; line-height: 1.4; }
.violation-toggle  { color: #999; font-size: .75em; }

.violation-body {
  display: none;
  border-top: 1px solid #DDD;
  padding: 1.25em 1.5em;
}
.violation-body.open { display: block; }

.help-link {
  color: #000099;
  font-size: .7em;
  text-decoration: underline;
  display: inline-block;
  margin-bottom: .75em;
}
.help-link:hover {
  background: #FFFF75;
  border-radius: .25em;
  color: #000099;
}

/* ── Node (affected element) ── */
.node {
  background: #E5ECE9;
  border-radius: 1em .25em;
  font-size: .7em;
  margin-bottom: .75em;
  padding: .75em 1em;
}
.node code {
  display: block;
  font-family: monospace;
  color: #000099;
  margin-bottom: .4em;
  word-break: break-all;
  font-size: 1em;
}
.node .failure { color: #555; line-height: 1.5; }

/* ── Mobile adjustments ── */
@media (max-width: 575px) {
  .wcag-checker .form-row { flex-direction: column; }
  .wcag-checker #url-input { border-radius: 2em .5em .5em 2em; }
  .cta-card { padding: 1.5em; border-radius: 2em 1em; }
  .summary { grid-template-columns: repeat(3, 1fr); }
}