/* ──────────────────────────────────────────────────────────────────
   Juror Notification Subscription
   JCC design tokens: blue #005ea2, heading #1b2b85, border #dfe1e2,
   muted text #565c65, error red #d63e04, success green #1b5e20
   ────────────────────────────────────────────────────────────────── */

/* ── Hero section background ─────────────────────────────────────── */
.node--type-page .jcc-hero {
  background-color: #f3f3f3;
}

/* ── Notice and disclaimer ───────────────────────────────────────── */
.jcc-jn-notice {
  background-color: #fff4e5;
  border-left: 4px solid #d97706;
  padding: 1rem;
  margin: 1.5rem 0;
  font-weight: bold;
}

.jcc-jn-disclaimer {
  color: #565c65;
  font-size: 0.875rem;
}

.jcc-jn-separator {
  border: 0;
  border-top: 1px solid #dfe1e2;
  margin: 2rem 0;
}

/* ── Form headings ───────────────────────────────────────────────── */
.jcc-jn-heading {
  color: #1b2b85;
  font-weight: bold;
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #dfe1e2;
  padding-bottom: 0.5rem;
}

/* ── Form rows ───────────────────────────────────────────────────── */
.jcc-jn-row {
  margin-bottom: 1.5rem;
}

.jcc-jn-field {
  width: 100%;
  max-width: 500px;
}

/* ── Labels ──────────────────────────────────────────────────────── */
.jcc-body__main-text .jcc-jn-form label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #1b2b85;
}

.jcc-jn-required {
  color: #d63e04;
  margin-left: 0.125rem;
}

.jcc-jn-example {
  font-weight: normal;
  color: #565c65;
  font-size: 0.875rem;
}

.jcc-jn-help-text {
  display: block;
  font-size: 0.875rem;
  color: #565c65;
  margin-top: 0.25rem;
  font-weight: normal;
}

/* ── Inputs ──────────────────────────────────────────────────────── */
.jcc-body__main-text .jcc-jn-form input[type="tel"],
.jcc-body__main-text .jcc-jn-form input[type="date"],
.jcc-body__main-text .jcc-jn-form select {
  display: block;
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px solid #767676;
  background: #fff;
  box-sizing: border-box;
  font-size: 1rem;
}

.jcc-body__main-text .jcc-jn-form input[type="tel"]:focus,
.jcc-body__main-text .jcc-jn-form input[type="date"]:focus,
.jcc-body__main-text .jcc-jn-form select:focus {
  outline: 2px solid #005ea2;
  outline-offset: 2px;
  border-color: #005ea2;
}

/* Invalid state */
.jcc-body__main-text .jcc-jn-form input:invalid:not(:focus):not(:placeholder-shown),
.jcc-body__main-text .jcc-jn-form select:invalid:not(:focus) {
  border-color: #d63e04;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.jcc-jn-btn {
  display: inline-block;
  padding: 0.625rem 1.5rem;
  font-weight: bold;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
  font-size: 1rem;
  min-width: 160px;
}

.jcc-jn-btn:focus {
  outline: 3px solid #005ea2;
  outline-offset: 2px;
}

/* Primary button (Subscribe) */
.jcc-jn-btn--primary {
  background-color: #005ea2;
  color: #fff;
  border-color: #005ea2;
}

.jcc-jn-btn--primary:hover:not(:disabled) {
  background-color: #1b2b85;
  border-color: #1b2b85;
}

.jcc-jn-btn--primary:disabled {
  background-color: #aab5c3;
  border-color: #aab5c3;
  color: #fff;
  cursor: not-allowed;
}

/* Secondary button (Unsubscribe) */
.jcc-jn-btn--secondary {
  background-color: #fff;
  color: #d63e04;
  border-color: #d63e04;
}

.jcc-jn-btn--secondary:hover:not(:disabled) {
  background-color: #fff0f0;
  border-color: #b91c00;
  color: #b91c00;
}

.jcc-jn-btn--secondary:disabled {
  background-color: #f5f5f5;
  border-color: #dfe1e2;
  color: #aab5c3;
  cursor: not-allowed;
}

/* ── Status messages ─────────────────────────────────────────────── */
.jcc-jn-status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  display: none;
  border-radius: 4px;
}

.jcc-jn-status--success {
  display: block;
  background-color: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
}

.jcc-jn-status--error {
  display: block;
  background-color: #fff0f0;
  color: #d63e04;
  border: 1px solid #d63e04;
}

/* ── Screen reader only ──────────────────────────────────────────── */
.jcc-jn-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media screen and (max-width: 640px) {
  .jcc-jn-field {
    max-width: 100%;
  }

  .jcc-jn-btn {
    width: 100%;
  }
}

/* ── High-contrast mode ──────────────────────────────────────────── */
@media (prefers-contrast: high) {
  .jcc-body__main-text .jcc-jn-form input[type="tel"],
  .jcc-body__main-text .jcc-jn-form input[type="date"],
  .jcc-body__main-text .jcc-jn-form select {
    border-width: 2px;
  }

  .jcc-jn-notice {
    border-left-width: 6px;
  }
}

/* ── Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .jcc-jn-btn {
    transition: none;
  }

  /* Disable smooth scrolling for users who prefer reduced motion */
  * {
    scroll-behavior: auto !important;
  }
}

/* ── Print styles ────────────────────────────────────────────────── */
@media print {
  .jcc-jn-form {
    display: none;
  }

  .jcc-jn-notice,
  .jcc-jn-disclaimer {
    display: block !important;
  }
}
