/* ──────────────────────────────────────────────────────────────────
   Probate Notes & Tentative Rulings
   JCC design tokens: blue #005ea2, heading #1b2b85, border #dfe1e2,
   muted text #565c65, error red #d63e04
   ────────────────────────────────────────────────────────────────── */

/* ── Form container ──────────────────────────────────────────────── */
/* Layout handled by jcc-body structure */

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

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

.jcc-pr-field {
  width: 100%;
}

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

/* ── Inputs ──────────────────────────────────────────────────────── */
.jcc-body__main-text input[type="text"] {
  display: block;
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px solid #dfe1e2;
  background: #fff;
  box-sizing: border-box;
}

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

/* ── Button ──────────────────────────────────────────────────────── */
.jcc-pr-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;
}

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

.jcc-pr-btn--primary {
  background-color: #005ea2;
  color: #fff;
  border-color: #005ea2;
}

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

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

/* ── Status messages ─────────────────────────────────────────────── */
.jcc-pr-status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  display: none;
}

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

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

/* ── Results table ───────────────────────────────────────────────── */
.jcc-pr-results {
  margin-top: 2rem;
}

.jcc-pr-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  border: 1px solid #dfe1e2;
}

/* ── Table caption (visually hidden but accessible) ──────────────── */
.jcc-pr-table-caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.jcc-pr-table th {
  background-color: #f3f3f3;
  font-weight: bold;
  text-align: left;
  padding: 0.5rem 1rem;
  border: 1px solid #dfe1e2;
}

.jcc-pr-table td {
  padding: 0.75rem 1rem;
  border: 1px solid #dfe1e2;
}

.jcc-pr-table tbody tr:nth-child(odd) {
  background-color: #f9f9f9;
}

.jcc-pr-table tbody tr:hover {
  background-color: #f0f0f0;
}

/* ── Empty results message ───────────────────────────────────────── */
.jcc-pr-empty-results {
  text-align: center;
  padding: 2rem 1rem !important;
  color: #565c65;
  font-style: italic;
}

/* ── Case number heading ─────────────────────────────────────────── */
.jcc-pr-heading {
  background-color: #8b9eb6;
  color: #fff;
  padding: 0.5rem;
  text-align: center;
  font-weight: bold;
}

/* ── Educational content headings ────────────────────────────────── */
.jcc-pr-heading-edu {
  font-weight: bold;
  color: #1b2b85;
  border-bottom: 2px solid #dfe1e2;
  padding-bottom: 0.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.jcc-pr-subheading {
  font-weight: bold;
  color: #1b2b85;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* ── Ruling text (preformatted) ──────────────────────────────────── */
.jcc-pr-ruling-text {
  padding: 10px;
  max-width: 580px;
  white-space: pre-wrap;
  word-wrap: break-word;
  background-color: transparent;
  border: none;
  margin: 0;
}

/* ── Screen reader only ──────────────────────────────────────────── */
.jcc-pr-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-pr-btn--primary {
    width: 100%;
  }

  .jcc-pr-table th,
  .jcc-pr-table td {
    padding: 0.5rem;
  }

  .jcc-pr-ruling-text {
    max-width: 100%;
  }
}

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

  .jcc-pr-table th,
  .jcc-pr-table td {
    border-width: 2px;
  }
}

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

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

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

  .jcc-pr-results {
    display: block !important;
  }

  .jcc-pr-table {
    border: 1px solid #000;
  }

  .jcc-pr-table th,
  .jcc-pr-table td {
    border: 1px solid #000;
  }
}
