/* ================================================================
   AfterKin — Tools Pages Shared Stylesheet
   Used by: tools/probate-quiz.html
            tools/executor-checklist.html
            tools/probate-cost-estimator.html
            tools/funeral-cost-calculator.html
   ================================================================ */

/* ── TOOL HERO ── */
.tool-hero {
  padding: 56px 32px 48px;
  max-width: var(--content-max);
  margin: 0 auto;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.tool-hero-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  background: var(--sage-light);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.tool-hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 14px;
  line-height: 1.25;
}

.tool-hero p {
  font-size: 0.97rem;
  color: var(--mid);
  line-height: 1.75;
  max-width: 520px;
  margin: 0 auto;
}

/* ── TOOL LAYOUT ── */
.tool-layout {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 48px 32px 80px;
}

/* ── TOOL FORM ── */
.tool-form {
  background: var(--section-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 32px;
}

.tool-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.tool-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--charcoal);
}

.tool-form-group label small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--light);
  margin-top: 2px;
}

.tool-select,
.tool-input {
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--charcoal);
  transition: border-color 0.2s;
  outline: none;
}

.tool-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A8C7E' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.tool-select:focus,
.tool-input:focus {
  border-color: var(--sage);
}

.tool-input-prefix {
  position: relative;
  display: flex;
  align-items: center;
}

.tool-input-prefix span {
  position: absolute;
  left: 13px;
  font-size: 0.95rem;
  color: var(--mid);
  pointer-events: none;
}

.tool-input-prefix .tool-input {
  padding-left: 26px;
  width: 100%;
}

.tool-submit-btn {
  width: 100%;
  padding: 14px 28px;
  background: var(--sage);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 0.97rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.tool-submit-btn:hover { background: #5a6b5e; }
.tool-submit-btn:disabled { background: var(--border); color: var(--light); cursor: default; }

/* ── RESULT PANEL ── */
.result-panel {
  display: none;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.result-panel.visible { display: block; }

.result-panel-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
}

.result-panel-header h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.result-panel-header p {
  font-size: 0.85rem;
  color: var(--mid);
}

.result-panel-body {
  padding: 24px 28px;
}

/* ── RESULT VERDICT (probate quiz) ── */
.result-verdict {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  border-radius: 10px;
  margin-bottom: 24px;
}

.result-verdict.likely-yes {
  background: #FEF3E9;
  border: 1px solid #F5C69A;
}

.result-verdict.likely-no {
  background: #EDF5F0;
  border: 1px solid #A8CCB5;
}

.result-verdict.it-depends {
  background: #F5F5F0;
  border: 1px solid var(--border);
}

.verdict-icon { font-size: 1.8rem; flex-shrink: 0; margin-top: 2px; }

.verdict-body h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 6px;
}

.verdict-body p {
  font-size: 0.88rem;
  color: var(--mid);
  line-height: 1.7;
}

/* ── COST BREAKDOWN TABLE ── */
.cost-breakdown {
  width: 100%;
  margin-bottom: 24px;
}

.cost-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.cost-breakdown-row:last-child { border-bottom: none; }

.cost-label {
  font-size: 0.9rem;
  color: var(--charcoal);
  flex: 1;
}

.cost-label small {
  display: block;
  font-size: 0.77rem;
  color: var(--light);
  margin-top: 2px;
  line-height: 1.5;
}

.cost-value {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
  color: var(--charcoal);
  text-align: right;
  white-space: nowrap;
}

.cost-breakdown-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 8px;
  border-top: 2px solid var(--charcoal);
  margin-top: 8px;
}

.cost-total-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--charcoal);
}

.cost-total-value {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--charcoal);
}

.cost-note {
  font-size: 0.78rem;
  color: var(--light);
  line-height: 1.65;
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--section-1);
  border-radius: 8px;
}

/* ── TIMELINE BADGE ── */
.timeline-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sage-light);
  border: 1px solid rgba(110,128,114,0.2);
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 20px;
}

.timeline-badge .badge-icon { font-size: 1.1rem; }

.timeline-badge .badge-text {
  font-size: 0.88rem;
  color: var(--sage);
  font-weight: 500;
}

/* ── FUNERAL COMPARISON ── */
.burial-comparison {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.burial-option-card {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.burial-option-card.selected {
  border-color: var(--sage);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.burial-option-header {
  padding: 14px 16px;
  background: var(--section-1);
  border-bottom: 1px solid var(--border);
}

.burial-option-header .option-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 2px;
}

.burial-option-header .option-total {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--charcoal);
}

.burial-option-header .option-range {
  font-size: 0.75rem;
  color: var(--light);
}

.burial-option-items {
  padding: 14px 16px;
}

.burial-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}

.burial-item-row:last-child { border-bottom: none; }
.burial-item-name { color: var(--mid); }
.burial-item-cost { font-weight: 500; color: var(--charcoal); }

/* ── EXECUTOR CHECKLIST ── */
.checklist-state-bar {
  background: var(--sage-light);
  border: 1px solid rgba(110,128,114,0.2);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.checklist-state-info {
  font-size: 0.88rem;
  color: var(--sage);
  font-weight: 500;
}

.checklist-progress-info {
  font-size: 0.82rem;
  color: var(--mid);
}

.checklist-phase {
  margin-bottom: 32px;
}

.checklist-phase-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.checklist-phase-icon { font-size: 1.1rem; }

.checklist-phase-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--charcoal);
}

.checklist-phase-subtitle {
  font-size: 0.78rem;
  color: var(--light);
  margin-left: auto;
  font-style: italic;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}

.checklist-item:hover { background: var(--section-1); }

.checklist-item.done { opacity: 0.55; }

.checklist-item.done .checklist-item-text {
  text-decoration: line-through;
  color: var(--light);
}

.checklist-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
  background: white;
}

.checklist-item.done .checklist-checkbox {
  background: var(--sage);
  border-color: var(--sage);
}

.checklist-checkbox::after {
  content: '';
  display: none;
  width: 5px;
  height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

.checklist-item.done .checklist-checkbox::after { display: block; }

.checklist-item-text {
  font-size: 0.9rem;
  color: var(--charcoal);
  line-height: 1.5;
  flex: 1;
}

.checklist-item-text small {
  display: block;
  font-size: 0.78rem;
  color: var(--light);
  margin-top: 3px;
  line-height: 1.55;
}

.checklist-item-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 10px;
  flex-shrink: 0;
  margin-top: 2px;
}

.badge-urgent {
  background: #FEF3E9;
  color: #C4874A;
}

.badge-state {
  background: var(--sage-light);
  color: var(--sage);
}

.checklist-reset-btn {
  font-size: 0.8rem;
  color: var(--light);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 14px;
  cursor: pointer;
  font-family: var(--sans);
  transition: color 0.2s, border-color 0.2s;
}

.checklist-reset-btn:hover { color: var(--mid); border-color: var(--mid); }

/* ── QUIZ QUESTIONS (probate quiz tool) ── */
.pq-question {
  margin-bottom: 28px;
  padding: 22px 24px;
  background: var(--section-1);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.pq-question-num {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 8px;
}

.pq-question-text {
  font-size: 0.97rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 16px;
  line-height: 1.45;
}

.pq-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pq-option {
  padding: 9px 18px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: white;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--charcoal);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.pq-option:hover { border-color: var(--sage); }

.pq-option.selected {
  border-color: var(--sage);
  background: var(--sage-light);
  color: var(--sage);
}

/* ── TOOL NAV BREADCRUMB ── */
.tool-breadcrumb {
  padding: 14px 32px;
  font-size: 0.78rem;
  color: var(--light);
  max-width: var(--content-max);
  margin: 0 auto;
}

.tool-breadcrumb a { color: var(--light); text-decoration: none; transition: color 0.2s; }
.tool-breadcrumb a:hover { color: var(--sage); }
.tool-breadcrumb span { margin: 0 6px; }

/* ── OTHER TOOLS STRIP ── */
.other-tools-strip {
  background: var(--section-1);
  border-top: 1px solid var(--border);
  padding: 48px 32px;
}

.other-tools-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.other-tools-inner h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 16px;
}

.other-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.other-tool-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--charcoal);
  font-size: 0.85rem;
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s;
  line-height: 1.3;
}

.other-tool-card:hover {
  border-color: var(--sage);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.other-tool-card .tool-card-icon { font-size: 1.3rem; flex-shrink: 0; }

/* ── RESPONSIVE ── */
@media (max-width: 780px) {
  .tool-hero { padding: 44px 20px 36px; }
  .tool-layout { padding: 36px 20px 60px; }
  .tool-form { padding: 22px 18px; }
  .tool-form-row { grid-template-columns: 1fr; gap: 16px; }
  .result-panel-header, .result-panel-body { padding: 18px 20px; }
  .cost-breakdown-row { flex-direction: column; gap: 2px; }
  .cost-value { text-align: left; }
  .burial-comparison { grid-template-columns: 1fr; }
  .other-tools-grid { grid-template-columns: 1fr 1fr; }
  .tool-breadcrumb { padding: 14px 20px; }
  .other-tools-strip { padding: 36px 20px; }
}

@media (max-width: 500px) {
  .other-tools-grid { grid-template-columns: 1fr; }
  .checklist-state-bar { flex-direction: column; align-items: flex-start; }
}
