/* RudyQ Shield CAPTCHA – compact, theme-friendly, accessible */

.rudyq-captcha-wrap {
  margin: 0.6em 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid #4a90d9;
  border-radius: 4px;
  background: #f8fbff;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.35;
  max-width: 280px;
  width: 100%;
  box-sizing: border-box;
}

.rudyq-label {
  display: block;
  font-weight: 600;
  font-size: 12.5px;
  margin: 0 0 0.35rem;
  color: #1a1a1a;
  line-height: 1.3;
}

.rudyq-input-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.rudyq-input {
  width: 2.1rem;
  height: 1.85rem;
  font-size: 1rem;
  text-align: center;
  border: 1px solid #4a90d9;
  border-radius: 3px;
  background: #fff;
  color: #111;
  font-weight: 700;
  padding: 0;
  line-height: 1;
  box-sizing: border-box;
}

.rudyq-input:focus {
  outline: 2px solid #ffbf00;
  outline-offset: 1px;
  border-color: #2a6cb0;
}

.rudyq-desc {
  margin: 0.25rem 0 0;
  font-size: 11px;
  color: #555;
}

.rudyq-error {
  color: #b00020;
  font-weight: 600;
  font-size: 12px;
  margin: 0.4em 0;
}

.rudyq-backlink {
  margin: 0.4rem 0 0;
  font-size: 10px;
  text-align: right;
  line-height: 1.2;
}

.rudyq-powered {
  color: #4a90d9;
  text-decoration: none;
}

.rudyq-powered:hover,
.rudyq-powered:focus {
  text-decoration: underline;
}

/* Screen reader only */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* Palettes – colorblind-safe */

.rudyq-palette-blue {
  border-color: #2b6cb0;
  background: #ebf4ff;
}
.rudyq-palette-blue .rudyq-input { border-color: #2b6cb0; }
.rudyq-palette-blue .rudyq-powered { color: #2b6cb0; }

.rudyq-palette-green {
  border-color: #2f855a;
  background: #f0fff4;
}
.rudyq-palette-green .rudyq-input { border-color: #2f855a; }
.rudyq-palette-green .rudyq-powered { color: #2f855a; }

.rudyq-palette-purple {
  border-color: #6b46c1;
  background: #faf5ff;
}
.rudyq-palette-purple .rudyq-input { border-color: #6b46c1; }
.rudyq-palette-purple .rudyq-powered { color: #6b46c1; }

.rudyq-palette-high-contrast {
  border-color: #000;
  background: #fff;
  border-width: 2px;
}
.rudyq-palette-high-contrast .rudyq-label {
  color: #000;
  font-weight: 700;
}
.rudyq-palette-high-contrast .rudyq-input {
  border-color: #000;
  border-width: 2px;
  background: #fff;
  color: #000;
}
.rudyq-palette-high-contrast .rudyq-powered {
  color: #000;
  font-weight: 700;
}

.rudyq-palette-dark {
  border-color: #90cdf4;
  background: #1a202c;
}
.rudyq-palette-dark .rudyq-label { color: #e2e8f0; }
.rudyq-palette-dark .rudyq-input {
  border-color: #90cdf4;
  background: #2d3748;
  color: #fff;
}
.rudyq-palette-dark .rudyq-desc { color: #a0aec0; }
.rudyq-palette-dark .rudyq-powered { color: #90cdf4; }

/* Themes */
.rudyq-theme-minimal {
  border: none;
  background: transparent;
  padding: 0.25rem 0;
  max-width: 260px;
}
.rudyq-theme-rounded {
  border-radius: 10px;
}
.rudyq-theme-rounded .rudyq-input {
  border-radius: 8px;
}

.rudyq-captcha-wrap:focus-within {
  box-shadow: 0 0 0 2px rgba(255, 191, 0, 0.4);
}

/* Login form specific – keep compact */
.login .rudyq-captcha-wrap,
#loginform .rudyq-captcha-wrap,
#registerform .rudyq-captcha-wrap,
#lostpasswordform .rudyq-captcha-wrap {
  max-width: 100%;
  margin: 0.5em 0 0.75em;
}
