/* ============================================================
   ROI / Time-Savings Calculator  -  PharmAssess
   Clean two-tab widget
   ============================================================ */

/* ── Custom properties ──────────────────────────────────── */
:root {
  --rc-brand:      #2b757a;
  --rc-brand-d:    #1e5558;
  --rc-brand-bg:   #edf6f6;
  --rc-accent:     #6a9a1f;   /* olive green – ROI highlight   */
  --rc-accent-2:   #7fbf3c;   /* slightly lighter olive         */
  --rc-bar-rev:    #8abe3c;   /* olive-green revenue bar        */
  --rc-bar-cost:   #2b757a;   /* brand teal cost bar            */
  --rc-bar-prof:   #44a842;   /* green profit bar               */
  --rc-text:       #062330;
  --rc-text-soft:  #5a7278;
  --rc-border:     #dde3e5;
  --rc-bg:         #f5f8f8;
  --rc-white:      #ffffff;
  --rc-check:      #2b757a;
  --rc-tab-active: #2b757a;
  --rc-shadow:     0 2px 12px rgba(43,117,122,.10);
}

/* ── Reset ──────────────────────────────────────────────── */
.rc-root *, .rc-root *::before, .rc-root *::after { box-sizing: border-box; }

/* ── Outer wrapper ──────────────────────────────────────── */
.rc-root {
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  color: var(--rc-text);
  -webkit-font-smoothing: antialiased;
}

/* ── Tab strip ──────────────────────────────────────────── */
.rc-tab-strip {
  display: flex;
  border-bottom: 2px solid var(--rc-border);
  margin-bottom: 0;
}
.rc-tab-btn {
  flex: 1;
  max-width: 320px;
  background: none;
  border: none;
  padding: 14px 24px;
  font: 600 0.92rem/1 "Manrope", sans-serif;
  color: var(--rc-text-soft);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color .18s, border-color .18s;
}
.rc-tab-btn:hover { color: var(--rc-brand); }
.rc-tab-btn.active {
  color: var(--rc-brand);
  border-bottom-color: var(--rc-brand);
}

/* ── Panel ──────────────────────────────────────────────── */
.rc-panel { display: none; padding: 0; }
.rc-panel.visible { display: block; }

/* Panel header */
.rc-panel-header {
  padding: 28px 32px 20px;
  background: var(--rc-white);
  border-bottom: 1px solid var(--rc-border);
}
.rc-panel-header h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--rc-text);
}
.rc-panel-header p {
  margin: 0;
  color: var(--rc-text-soft);
  font-size: 0.9rem;
}

/* ── Two-column body ────────────────────────────────────── */
.rc-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 560px;
  background: var(--rc-white);
}
@media (max-width: 900px) {
  .rc-body { grid-template-columns: 1fr; }
}

/* ── Left column – controls ─────────────────────────────── */
.rc-left {
  padding: 24px 28px;
  border-right: 1px solid var(--rc-border);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (max-width: 900px) {
  .rc-left { border-right: none; border-bottom: 1px solid var(--rc-border); }
}

/* ── Right column – results ─────────────────────────────── */
.rc-right {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Field / Select ─────────────────────────────────────── */
.rc-field { display: flex; flex-direction: column; gap: 6px; }
.rc-field-label {
  font-size: 0.79rem;
  font-weight: 700;
  color: var(--rc-text-soft);
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: .02em;
}
.rc-field-label .rc-info-icon {
  cursor: help;
  color: var(--rc-brand);
  font-size: 0.82rem;
}
.rc-select {
  appearance: none;
  background: var(--rc-bg);
  border: 1.5px solid var(--rc-border);
  border-radius: 8px;
  padding: 10px 36px 10px 14px;
  font: 600 0.9rem "Manrope", sans-serif;
  color: var(--rc-text);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path fill='%232b757a' d='M6 8.5L1.5 4h9z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 11px;
  width: 100%;
  cursor: pointer;
  transition: border-color .18s;
}
.rc-select:focus { outline: none; border-color: var(--rc-brand); }

/* ── Section label ──────────────────────────────────────── */
.rc-section-label {
  font-size: 0.79rem;
  font-weight: 700;
  color: var(--rc-brand);
  text-transform: uppercase;
  letter-spacing: .07em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Configure button ───────────────────────────────────── */
.rc-configure-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1.5px solid var(--rc-border);
  border-radius: 6px;
  padding: 4px 10px;
  font: 600 0.75rem "Manrope", sans-serif;
  color: var(--rc-text-soft);
  cursor: pointer;
  transition: all .18s;
}
.rc-configure-btn:hover {
  border-color: var(--rc-brand);
  color: var(--rc-brand);
  background: var(--rc-brand-bg);
}

/* ── Appointment rows ───────────────────────────────────── */
.rc-appt-rows { display: flex; flex-direction: column; gap: 10px; }

.rc-appt-row {
  display: grid;
  grid-template-columns: 22px 1fr 72px 1fr 36px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--rc-bg);
  border: 1.5px solid transparent;
  transition: all .18s;
}
.rc-appt-row:hover { border-color: var(--rc-border); }
.rc-appt-row.rc-off { opacity: .45; }
.rc-appt-row.rc-off .rc-fee-input,
.rc-appt-row.rc-off .rc-slider { pointer-events: none; }

.rc-appt-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--rc-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Fee input */
.rc-fee-wrap {
  display: flex;
  align-items: center;
  background: var(--rc-white);
  border: 1.5px solid var(--rc-border);
  border-radius: 6px;
  padding: 0 6px;
  gap: 2px;
  height: 32px;
}
.rc-fee-dollar {
  font-size: 0.8rem;
  color: var(--rc-text-soft);
  font-weight: 600;
}
.rc-fee-input {
  width: 42px;
  border: none;
  outline: none;
  background: none;
  font: 700 0.85rem "Manrope", sans-serif;
  color: var(--rc-text);
  padding: 0;
}
.rc-fee-input::-webkit-outer-spin-button,
.rc-fee-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.rc-count-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--rc-brand);
  text-align: right;
  min-width: 28px;
}

/* ── Custom checkbox ────────────────────────────────────── */
.rc-check-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.rc-check-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.rc-checkmark {
  position: absolute;
  top: 0; left: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--rc-border);
  border-radius: 4px;
  background: var(--rc-white);
  transition: all .15s;
}
.rc-check-label input:checked ~ .rc-checkmark {
  background: var(--rc-brand);
  border-color: var(--rc-brand);
}
.rc-checkmark::after {
  content: "";
  position: absolute;
  display: none;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
.rc-check-label input:checked ~ .rc-checkmark::after { display: block; }

/* ── Range slider ───────────────────────────────────────── */
.rc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--rc-border);
  cursor: pointer;
  outline: none;
}
.rc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--rc-brand);
  border: 2px solid var(--rc-white);
  box-shadow: 0 1px 4px rgba(43,117,122,.4);
  cursor: pointer;
  transition: background .15s;
}
.rc-slider::-webkit-slider-thumb:hover { background: var(--rc-brand-d); }
.rc-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--rc-brand);
  border: 2px solid var(--rc-white);
  cursor: pointer;
}

/* ── Average appts row ──────────────────────────────────── */
.rc-avg-block { display: flex; flex-direction: column; gap: 8px; }
.rc-avg-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rc-avg-row .rc-slider { flex: 1; }
.rc-avg-num {
  width: 54px;
  text-align: center;
  border: 1.5px solid var(--rc-border);
  border-radius: 6px;
  background: var(--rc-bg);
  padding: 5px 6px;
  font: 700 0.88rem "Manrope", sans-serif;
  color: var(--rc-text);
  outline: none;
}
.rc-avg-num:focus { border-color: var(--rc-brand); }
.rc-reset-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1.5px solid var(--rc-border);
  background: var(--rc-bg);
  color: var(--rc-text-soft);
  cursor: pointer;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  flex-shrink: 0;
}
.rc-reset-btn:hover { border-color: var(--rc-brand); color: var(--rc-brand); background: var(--rc-brand-bg); }
.rc-avg-note {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--rc-text-soft);
  line-height: 1.55;
  margin: 0;
}
.rc-avg-note a { color: var(--rc-brand); text-decoration: none; }
.rc-avg-note a:hover { text-decoration: underline; }

/* ── Bar chart ──────────────────────────────────────────── */
.rc-chart-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rc-chart-area {
  display: flex;
  gap: 0;
  height: 240px;
}
.rc-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 0;
  width: 52px;
  flex-shrink: 0;
  padding-right: 8px;
}
.rc-y-tick {
  font-size: 0.72rem;
  color: var(--rc-text-soft);
  font-weight: 600;
  text-align: right;
  line-height: 1;
}
.rc-chart-plot {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}
.rc-grid-lines {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  z-index: 0;
}
.rc-grid-line {
  border-top: 1px dashed #e4eaeb;
  width: 100%;
}
.rc-bars-row {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  padding: 0 12px;
  border-bottom: 2px solid #d4dde0;
  position: relative;
  z-index: 1;
}
.rc-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 100%;
}
.rc-bar-top-lbl {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--rc-text);
  white-space: nowrap;
}
.rc-bar {
  width: 100%;
  max-width: 88px;
  border-radius: 4px 4px 0 0;
  transition: height .5s cubic-bezier(.4,0,.2,1);
  min-height: 0;
}
.rc-bar--rev  { background: var(--rc-bar-rev); }
.rc-bar--cost { background: var(--rc-bar-cost); }
.rc-bar--prof { background: var(--rc-bar-prof); }

.rc-x-labels {
  display: flex;
  padding: 0 12px;
  margin-left: 52px; /* match y-axis width */
}
.rc-x-label {
  flex: 1;
  text-align: center;
  font-size: 0.78rem;
  color: var(--rc-text-soft);
  font-weight: 500;
  padding-top: 6px;
}

/* ── Stats grid ─────────────────────────────────────────── */
.rc-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1.5px solid var(--rc-border);
  margin-top: 4px;
}
.rc-stat-cell {
  padding: 16px 8px 12px;
}
.rc-stat-cell:nth-child(1),
.rc-stat-cell:nth-child(3) { border-right: 1.5px solid var(--rc-border); }
.rc-stat-cell:nth-child(3),
.rc-stat-cell:nth-child(4) { border-top: 1.5px solid var(--rc-border); }
.rc-stat-big {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--rc-text);
  line-height: 1.05;
  transition: color .25s;
}
.rc-stat-big.rc-accent { color: var(--rc-accent); }
.rc-stat-sub {
  font-size: 0.76rem;
  color: var(--rc-text-soft);
  font-weight: 600;
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── Pulse animation ────────────────────────────────────── */
@keyframes rc-pulse {
  0%   { opacity: 1; transform: scale(1); }
  30%  { opacity: 0.6; transform: scale(0.97); }
  100% { opacity: 1; transform: scale(1); }
}
.rc-pulse { animation: rc-pulse .28s ease; }

/* ── Time savings: appt rows ────────────────────────────── */
.rc-time-rows { display: flex; flex-direction: column; gap: 8px; }
.rc-time-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--rc-bg);
  border: 1.5px solid transparent;
  transition: border-color .18s, opacity .18s;
}
.rc-time-row:hover { border-color: var(--rc-border); }
.rc-time-row.rc-off { opacity: .45; }
.rc-time-info { flex: 1; }
.rc-time-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--rc-text);
}
.rc-time-sub {
  font-size: 0.75rem;
  color: var(--rc-text-soft);
  margin-top: 2px;
}
.rc-time-saved-lbl {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--rc-accent);
  white-space: nowrap;
  padding-top: 2px;
}
.rc-time-row.rc-off .rc-time-saved-lbl { color: var(--rc-text-soft); }

/* ── Time summary cards ─────────────────────────────────── */
.rc-time-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.rc-time-card {
  background: var(--rc-bg);
  border: 1.5px solid var(--rc-border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.rc-time-card-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--rc-text-soft);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.rc-time-big {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--rc-accent);
  line-height: 1.1;
  transition: color .25s;
}
.rc-time-summary-note {
  font-size: 0.78rem;
  color: var(--rc-text-soft);
  font-style: italic;
  line-height: 1.6;
  margin: 0;
}

/* ── Extra savings (time panel right) ───────────────────── */
.rc-extra-list { display: flex; flex-direction: column; gap: 8px; }
.rc-extra-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 2px;
}
.rc-extra-label {
  font-size: 0.84rem;
  color: var(--rc-text);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}
.rc-extra-label .rc-info-icon {
  cursor: help;
  color: var(--rc-brand);
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--rc-brand);
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  position: relative;
}
.rc-extra-label .rc-info-icon::after {
  content: attr(data-tip);
  display: none;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--rc-text);
  color: #fff;
  font-size: 0.71rem;
  font-weight: 400;
  padding: 5px 10px;
  border-radius: 5px;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}
.rc-extra-label .rc-info-icon:hover::after { display: block; }

/* ── CTA strip at bottom ─────────────────────────────────── */
.rc-cta-strip {
  padding: 20px 32px;
  background: var(--rc-brand-bg);
  border-top: 1px solid var(--rc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.rc-cta-strip p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--rc-text-soft);
}
.rc-cta-strip a.rc-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--rc-brand);
  color: #fff;
  text-decoration: none;
  padding: 11px 22px;
  border-radius: 8px;
  font: 700 0.88rem "Manrope", sans-serif;
  transition: background .18s;
  white-space: nowrap;
}
.rc-cta-strip a.rc-cta-btn:hover { background: var(--rc-brand-d); }

/* ── Card wrapper ────────────────────────────────────────── */
.rc-card {
  background: var(--rc-white);
  border: 1.5px solid var(--rc-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--rc-shadow);
}

/* ── Standalone page layout ──────────────────────────────── */
.rc-page-section {
  padding: 56px 0 80px;
  background: var(--rc-bg);
  min-height: 80vh;
}
.rc-page-section .container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}
.rc-page-title {
  text-align: center;
  margin-bottom: 36px;
}
.rc-page-title h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--rc-text);
  margin: 0 0 10px;
}
.rc-page-title p {
  color: var(--rc-text-soft);
  font-size: 1rem;
  margin: 0;
}