/* Peer Deals Dashboard */

/* Toolbar */
.peer-deals-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  flex-wrap: wrap;
  overflow: visible;
  position: relative;
  z-index: 15;
}

/* Note bar */
.peer-deals-note {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 16px;
  font-style: italic;
}

/* Investor exclusion dropdown */
.investor-dropdown-btn {
  padding: 5px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  font-family: var(--font-sans);
}

.investor-dropdown-btn.has-exclusions {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.investor-dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 300px;
  max-height: 320px;
  overflow: auto;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  margin-top: 4px;
}

.investor-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  border-bottom: 1px solid #f9fafb;
}

.investor-dropdown-item:hover {
  background: #f3f4f6;
}

.investor-dropdown-item.excluded {
  background: #fef2f2;
}

.investor-dropdown-item input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.investor-dropdown-name {
  flex: 1;
  color: #111827;
}

.investor-dropdown-count {
  color: #9ca3af;
  font-size: 11px;
  flex-shrink: 0;
  padding: 0 2px;
}

/* Summary Table */
.summary-table-wrapper {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 24px;
}

.summary-table-title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  padding: 14px 18px;
  border-bottom: 1px solid #f3f4f6;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.summary-table thead th {
  background: #f9fafb;
  color: #6b7280;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 20px;
  text-align: right;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.summary-table thead th:first-child {
  text-align: left;
}

/* Group headers (Round Size, Post Money) centered over their columns */
.summary-table thead tr:first-child th[colspan] {
  text-align: center;
  border-bottom: 1px solid #d1d5db;
  padding-bottom: 6px;
}

.summary-table thead tr:last-child th {
  padding-top: 6px;
}

.summary-table tbody td {
  padding: 10px 20px;
  text-align: right;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
}

.summary-table tbody td:first-child {
  text-align: left;
  color: #111827;
}

.summary-table tbody td.indent {
  padding-left: 28px;
}

.summary-table .subtotal-row td {
  background: #C41230;
  color: #fff !important;
  font-weight: 700;
  font-size: 15px;
  border-bottom: 2px solid #9e0e26;
  padding-top: 12px;
  padding-bottom: 12px;
}

.summary-table .n-count {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
}

.summary-table .subtotal-row .n-count {
  color: rgba(255,255,255,0.7);
}

/* Chart containers */
.peer-deals-chart-container {
  margin-bottom: 24px;
}

.peer-deals-chart-container .chart-panel-body {
  height: 400px;
  overflow: hidden;
}

/* Side-by-side chart rows */
.peer-deals-chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 0;
}

/* Fund picker */
.fund-picker {
  padding: 8px 18px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.fund-picker-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-right: 4px;
}

.fund-picker-btn {
  font-size: 11px;
  padding: 3px 10px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-sans);
}

.fund-picker-btn:hover {
  border-color: #9ca3af;
  color: #374151;
}

.fund-picker-btn.active {
  background: #C41230;
  color: #fff;
  border-color: #C41230;
}

/* Excluded hint */
.deals-excluded-hint {
  font-size: 11px;
  font-weight: 500;
  color: #C41230;
  background: #fef2f2;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 4px;
}

/* Deals section */
.deals-section {
  margin-bottom: 24px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.deals-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #f3f4f6;
}

.deals-title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 8px;
}

.deal-count {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 10px;
}

.deals-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.deals-filter-input {
  padding: 5px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 12px;
  outline: none;
  width: 160px;
  font-family: var(--font-sans);
}

.deals-filter-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

/* Exclude checkbox in grid */
.exclude-checkbox {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: #C41230;
}

/* Outcome badge in grid */
.outcome-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

.outcome-badge--won { background: #111827; color: #fff; }
.outcome-badge--competitive { background: #C41230; color: #fff; }
.outcome-badge--lost { background: #ef4444; color: #fff; }
.outcome-badge--passed { background: #fef3c7; color: #92400e; }
.outcome-badge--decline { background: #fed7aa; color: #9a3412; }
.outcome-badge--not-processed { background: #f3f4f6; color: #6b7280; }
.outcome-badge--out-of-scope { background: #e5e7eb; color: #6b7280; }

/* Responsive */
@media (max-width: 1100px) {
  .peer-deals-chart-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .summary-table {
    font-size: 11px;
  }
  .summary-table tbody td,
  .summary-table thead th {
    padding: 5px 8px;
  }
}
