/* portfolio-risk.css  */
/* Portfolio Risk & Goal Probability (Monte Carlo) */

.pr-card {
  margin-top: 24px;
  background: #111827;
  border-radius: 16px;
  padding: 20px 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.55);
  border: 1px solid rgba(148,163,184,.35);
}
/*
.pr-headline {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:12px;
}*/
.pr-headline-title {
  font-size:1.2rem;
  font-weight:600;
  color:#e5f2ff;
}
.pr-headline-sub {
  font-size:.9rem;
  color:#9ca3af;
}

.pr-tag {
  font-size:.75rem;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.6);
  color:#9ca3af;
  white-space:nowrap;
}

/* Minimize button */
.pr-min-btn {
  font-size:.75rem;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.7);
  background:rgba(15,23,42,.9);
  color:#e5e7eb;
  cursor:pointer;
  margin-left:8px;
}
.pr-min-btn:hover {
  background:rgba(31,41,55,1);
}

/* grid */
.pr-grid {
  display:grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap:18px;
  margin-top:8px;
}

@media (max-width: 768px) {
  .pr-grid {
    grid-template-columns: minmax(0,1fr);
  }
}

/* labels / inputs */
.pr-group-label {
  font-size:.85rem;
  color:#d1d5db;
  margin-bottom:4px;
}
.pr-input-row {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.pr-input-row > * {
  flex:1 1 0;
}

.pr-note {
  font-size:.8rem;
  color:#9ca3af;
  margin-top:4px;
}

/* result chips */
.pr-result-chip {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:8px 10px;
  border-radius:10px;
  background:rgba(15,23,42,.9);
  border:1px solid rgba(148,163,184,.4);
  margin-bottom:6px;
  font-size:.85rem;
}
.pr-result-chip span.label {
  color:#9ca3af;
}
.pr-result-chip span.value {
  font-weight:600;
  color:#e5f2ff;
}

.pr-result-chip span.value.okay { color:#4ade80; }
.pr-result-chip span.value.warn { color:#fbbf24; }
.pr-result-chip span.value.bad  { color:#f97373; }

.pr-status {
  font-size:.85rem;
  color:#9ca3af;
  margin-top:6px;
}

/* summary */
.pr-summary {
  font-size:.86rem;
  color:#e5e7eb;
  background:rgba(15,23,42,.9);
  border-radius:10px;
  padding:10px 12px;
  border:1px dashed rgba(148,163,184,.6);
  margin-top:8px;
}

/* disclaimer */
.pr-disclaimer {
  font-size:.75rem;
  color:#9ca3af;
  margin-top:10px;
  border-top:1px dashed rgba(148,163,184,.45);
  padding-top:8px;
}

/* Advanced settings "shutter" */
.pr-adv-toggle {
  margin-top:10px;
  font-size:.8rem;
  display:flex;
  align-items:center;
  gap:6px;
  cursor:pointer;
  color:#9ca3af;
}
.pr-adv-toggle span.chevron {
  display:inline-block;
  transition:transform .18s ease;
}
.pr-adv-toggle.open span.chevron {
  transform:rotate(90deg);
}

.pr-adv-panel {
  margin-top:8px;
  padding:10px 12px;
  border-radius:10px;
  background:rgba(15,23,42,.95);
  border:1px dashed rgba(148,163,184,.5);
  font-size:.8rem;
}

/* chart container */
.pr-chart-box {
  margin-top:10px;
  padding:8px 10px;
  border-radius:10px;
  background:rgba(15,23,42,.9);
  border:1px solid rgba(148,163,184,.4);
  font-size:.8rem;
  position:relative;
  height:220px;            /* <- fixed height keeps chart from going “down” */
  overflow:hidden;
}

.pr-chart-box canvas {
  width:100% !important;   /* let Chart.js fill the box */
  height:100% !important;
  display:block;
}


/* hide helper */
.pr-hidden {
  display:none !important;
}


/* Dark style for FAQ accordion inside pr-card */
#prFaq .accordion-item {
  background: transparent;
  border-color: rgba(148,163,184,.35);
}

#prFaq .accordion-button {
  background-color: #111827;
  color: #e5e7eb;
  font-size: 0.9rem;
}

#prFaq .accordion-button:not(.collapsed) {
  background-color: #020617;
  color: #e5e7eb;
  box-shadow: none;
}

#prFaq .accordion-button::after {
  filter: invert(1) grayscale(1);
}

#prFaq .accordion-body {
  background-color: #020617;
  color: #d1d5db;
  font-size: 0.85rem;
}

.pr-faq .faq-item {
  border-bottom: 1px solid #333;
  margin-bottom: 6px;
}

.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-weight: 600;
  color: #fff;
  padding: 10px 0;
  cursor: pointer;
}

.faq-q:hover {
  color: #4da3ff;
}

.faq-a {
  display: none;
  color: #bbb;
  padding: 0 0 10px 0;
  line-height: 1.5;
}

.pr-faq {
  margin-top: 16px;
}

.pr-faq .faq-item {
  border-bottom: 1px solid #333;
  margin-bottom: 6px;
}

.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-weight: 600;
  color: #e5e7eb;
  padding: 8px 0;
  cursor: pointer;
}

.faq-q:hover {
  color: #4da3ff;
}

/* answers hidden by default */
.faq-a {
  display: none;
  color: #bbb;
  padding: 0 0 10px 0;
  line-height: 1.5;
  font-size: 0.86rem;
}
