/**
 * ToolDuck — Rent vs Buy Calculator Styles
 * ===============================================================
 */

.rvb-app {
  display: flex;
  flex-direction: column;
  gap: var(--space-6, 1.5rem);
  width: 100%;
}

.rvb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6, 1.5rem);
  align-items: start;
}

@media (max-width: 900px) {
  .rvb-grid {
    grid-template-columns: 1fr;
  }
}

.rvb-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: var(--radius-lg, 12px);
  padding: var(--space-6, 1.5rem);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.rvb-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading, #0f172a);
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rvb-control-group {
  margin-bottom: var(--space-4, 1rem);
}

.rvb-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.rvb-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-body, #334155);
}

.rvb-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.rvb-input-prefix,
.rvb-input-suffix {
  position: absolute;
  color: var(--text-muted, #64748b);
  font-size: 0.9rem;
  font-weight: 500;
  pointer-events: none;
}

.rvb-input-prefix {
  left: 0.85rem;
}

.rvb-input-suffix {
  right: 0.85rem;
}

.rvb-input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-heading, #0f172a);
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--border-subtle, #cbd5e1);
  border-radius: var(--radius-md, 8px);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.rvb-input:focus {
  border-color: var(--brand-primary, #0284c7);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.rvb-input--prefix {
  padding-left: 2rem;
}

.rvb-input--suffix {
  padding-right: 2.25rem;
}

/* Verdict / Outcome Card */
.rvb-verdict-card {
  border-radius: var(--radius-lg, 12px);
  padding: var(--space-6, 1.5rem);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  transition: all 0.25s ease;
}

.rvb-verdict-card--buy {
  background: linear-gradient(135deg, #064e3b 0%, #0f172a 100%);
  color: #ffffff;
}

.rvb-verdict-card--rent {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  color: #ffffff;
}

.rvb-verdict-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  margin-bottom: 0.75rem;
}

.rvb-verdict-title {
  font-size: 1.65rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  line-height: 1.25;
}

.rvb-verdict-sub {
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.rvb-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.rvb-metric-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.85rem;
}

.rvb-metric-label {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 0.25rem;
}

.rvb-metric-val {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.rvb-breakeven-banner {
  background: rgba(255, 255, 255, 0.08);
  border-left: 3px solid #38bdf8;
  padding: 0.75rem 1rem;
  border-radius: 0 8px 8px 0;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #e2e8f0;
}

/* Actions */
.rvb-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: var(--space-4, 1rem);
}

/* Table Section */
.rvb-table-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: var(--radius-lg, 12px);
  padding: var(--space-6, 1.5rem);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.rvb-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.rvb-table-wrap {
  overflow-x: auto;
  max-height: 480px;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 8px;
}

.rvb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: right;
  white-space: nowrap;
}

.rvb-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  padding: 0.65rem 0.85rem;
  border-bottom: 2px solid #e2e8f0;
  z-index: 2;
}

.rvb-table td {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  font-variant-numeric: tabular-nums;
}

.rvb-table tr:hover td {
  background: #f8fafc;
}

.rvb-table th:first-child,
.rvb-table td:first-child {
  text-align: left;
  font-weight: 600;
}

.rvb-positive {
  color: #16a34a !important;
  font-weight: 600;
}

.rvb-negative {
  color: #dc2626 !important;
  font-weight: 600;
}
