/* Renew Direct page-specific styles, on top of NDA Direct's style.css
   tokens (navy/gold/border etc.). */

main.wide { max-width: 1180px; }

.lookup-form label[for="patentNumber"] {
  display: block;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 0.35rem;
}

.lookup-row {
  display: flex;
  gap: 0.75rem;
  max-width: 460px;
}

.lookup-row input { flex: 1; }

.test-toggle {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin-top: 0.9rem;
  padding: 0.5rem 0.75rem;
  border: 1px dashed var(--gold);
  border-radius: 6px;
  background: #fdf8ee;
  font-size: 0.9rem;
  max-width: 640px;
}

.progress-box {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f6f9fd;
}

.progress-box p { margin: 0.15rem 0; }
.progress-main { font-weight: 700; color: var(--navy-dark); }
.progress-stage, .progress-slow { color: var(--muted); font-size: 0.92rem; }

.spinner {
  flex: none;
  width: 36px;
  height: 36px;
  border: 4px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

#outcome { margin-top: 1.5rem; }

.details-table {
  margin: 1.75rem 0 1.5rem;
  border-collapse: collapse;
  max-width: 760px;
  width: 100%;
}

.details-table th, .details-table td {
  text-align: left;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.details-table th {
  width: 190px;
  color: var(--navy-dark);
  font-weight: 700;
  white-space: nowrap;
}

.instruction {
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 0.4rem;
}

.late-note { color: #7a4a00; font-size: 0.95rem; }

.cost-scroll {
  overflow-x: auto;
  margin: 0.75rem 0 1.25rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.cost-table {
  border-collapse: collapse;
  font-size: 0.8rem;
  width: 100%;
  font-variant-numeric: tabular-nums;
}

.cost-table th, .cost-table td {
  border: 1px solid var(--border);
  padding: 0.3rem 0.25rem;
  text-align: right;
  white-space: nowrap;
}

.cost-table thead th {
  background: var(--navy-dark);
  color: #fff;
  text-align: center;
  font-weight: 700;
}

.cost-table th.col-date { font-weight: 400; font-size: 0.72rem; line-height: 1.2; }
.cost-table thead th[rowspan] { white-space: normal; min-width: 62px; font-size: 0.75rem; line-height: 1.2; }
.cost-table td:first-child { text-align: center; font-weight: 700; color: var(--navy-dark); }
.cost-table td.col-sum { background: #f6f9fd; }

.cost-table tr.highlight td {
  background: #fff4d6;
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  font-weight: 700;
}

.cost-table td.selectable {
  cursor: pointer;
  text-decoration: underline dotted;
}

.cost-table td.selectable:hover, .cost-table td.selectable:focus {
  outline: 2px solid var(--navy);
  outline-offset: -2px;
}

.cost-table td.red { color: #d00000; }
.cost-table td.chosen { box-shadow: inset 0 0 0 2px #d00000; }

.totals {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0 0 1rem;
}

.totals > div { display: flex; gap: 0.6rem; }
.totals dt { margin: 0; min-width: 230px; }
.totals dd { margin: 0; font-weight: 700; color: var(--navy-dark); }

@media (max-width: 600px) {
  .lookup-row { max-width: none; }
  .details-table th { width: auto; white-space: normal; }
  .totals dt { min-width: 0; }
}

/* Before a patent is looked up: the whole table is shown but inert. */
.cost-table.disabled { opacity: 0.55; pointer-events: none; user-select: none; }
.cost-table.disabled th.col-date { min-width: 44px; }

/* Payment step */
#payButton { margin-top: 0.5rem; }
.details-section { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); max-width: 620px; }
.details-section .field { margin-bottom: 1rem; }
.details-section input, .details-section textarea, .details-section select { width: 100%; }
.summary-amounts { margin: 0.75rem 0; }
.summary-amounts td { text-align: right; font-variant-numeric: tabular-nums; }
.summary-total th, .summary-total td { font-weight: 900; color: var(--navy-dark); border-top: 2px solid var(--navy-dark); }

/* A link styled as a button, switched off until the page is ready (payment return page). */
a.button[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* Short how-it-works line above the patent number box (user, 2026-10-27). */
.intro { margin: 0 0 1.25rem; font-size: 1.05rem; line-height: 1.5; color: var(--navy-dark); }

/* a click on an in-between cell of a patent already on our renewal system (2026-10-28): the instruction lights up */
#instructionRule.attention { background: #fff3cd; box-shadow: 0 0 0 4px #fff3cd; border-radius: 3px;
                         animation: instructionFlash 1.2s ease-in-out 2; }
@keyframes instructionFlash { 0%, 100% { background: #fff3cd; } 50% { background: #ffd666; } }
