/**
 * Dealer portal styles. Layered on top of rs-register.css tokens.
 */

/* Repeated from rs-register.css: this sheet also loads on its own. See the
   long note there -- an author `display` rule silently defeats [hidden]. */
[hidden] { display: none !important; }

/* Everything below the application form once it has been sent. Leaving the
   sales pitch on screen under a "thanks, we have it" card reads as though the
   submission did not take. */
.rsdp-submitted .rsdp-hero,
.rsdp-submitted .rsdp-sell,
.rsdp-submitted .rsdp-honest,
.rsdp-submitted .rsdp-preview { display: none !important; }

.rsdp-portal { padding-bottom: 3rem; }
.rsdp-portal-shell { max-width: 62rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; }

.rsdp-portal-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}

.rsdp-portal-head h1 {
	margin: .15rem 0 0;
	font-size: 1.6rem;
	letter-spacing: -.02em;
}

.rsdp-logout { width: auto; margin: 0; }

.rsdp-tabs {
	display: flex;
	gap: .25rem;
	flex-wrap: wrap;
	border-bottom: 1px solid var(--rsdp-line);
	margin-bottom: 1.25rem;
}

.rsdp-tab {
	padding: .55rem .85rem;
	font-size: .82rem;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--rsdp-muted);
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.rsdp-tab.is-on { color: var(--rsdp-accent); border-bottom-color: var(--rsdp-accent); }
.rsdp-tab:hover { color: var(--rsdp-ink); }

.rsdp-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
	gap: .75rem;
	margin-bottom: 1.25rem;
}

.rsdp-stat {
	background: var(--rsdp-surface);
	border: 1px solid var(--rsdp-line);
	border-radius: 8px;
	padding: .85rem 1rem;
}

.rsdp-stat-n {
	display: block;
	font-size: 1.7rem;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -.02em;
	font-variant-numeric: tabular-nums;
}

.rsdp-stat-l {
	display: block;
	margin-top: .15rem;
	font-size: .75rem;
	color: var(--rsdp-muted);
}

.rsdp-panel {
	background: var(--rsdp-surface);
	border: 1px solid var(--rsdp-line);
	border-radius: 10px;
	padding: 1.25rem;
}

.rsdp-panel h2 { margin: 0 0 .5rem; font-size: 1.15rem; letter-spacing: -.01em; }
.rsdp-panel h3 { margin: 0 0 .4rem; font-size: .95rem; }

.rsdp-panel-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: .85rem;
}

.rsdp-search { max-width: 20rem; font-size: .9rem; padding: .5rem .65rem; }

.rsdp-tablewrap { overflow-x: auto; }

.rsdp-table {
	width: 100%;
	min-width: 44rem;
	border-collapse: collapse;
	font-size: .875rem;
}

.rsdp-table th,
.rsdp-table td {
	text-align: left;
	padding: .55rem .6rem;
	border-bottom: 1px solid var(--rsdp-line);
	vertical-align: top;
}

.rsdp-table th {
	font-size: .7rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--rsdp-muted);
	white-space: nowrap;
}

.rsdp-table td.rsdp-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.rsdp-pill {
	display: inline-block;
	padding: .15rem .45rem;
	border-radius: 3px;
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	white-space: nowrap;
	border: 1px solid currentColor;
}

.rsdp-pill.is-none { color: var(--rsdp-muted); }
.rsdp-pill.is-invited { color: var(--rsdp-muted); }
.rsdp-pill.is-opened { color: var(--rsdp-accent); }
.rsdp-pill.is-likely { color: var(--rsdp-ok); }

.rsdp-callout {
	margin-top: 1rem;
	padding: 1rem;
	border-left: 3px solid var(--rsdp-accent);
	background: var(--rsdp-bg);
	border-radius: 0 8px 8px 0;
}

.rsdp-callout ul { margin: .4rem 0 .6rem; padding-left: 1.1rem; font-size: .875rem; }
.rsdp-callout li { margin-bottom: .3rem; }

.rsdp-form { display: flex; flex-direction: column; max-width: 30rem; }
.rsdp-muted { color: var(--rsdp-muted); }
.rsdp-saved { margin: .6rem 0 0; color: var(--rsdp-ok); font-size: .875rem; }
.rsdp-empty { padding: 1.5rem 0; color: var(--rsdp-muted); }

/* ---------- application form ---------- */
.rsdp-apply .rsdp-card { margin-bottom: 1rem; }
.rsdp-apply .rsdp-card h1 { margin-top: .15rem; }
.rsdp-h2 {
	font-size: 1.05rem;
	margin: 0 0 .35rem;
	letter-spacing: -.01em;
}
/* Honeypot: off-screen rather than display:none, which some bots skip */
.rsdp-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Warranty tab: who covers what. Two columns because the whole point is that
   these are two different companies' promises, not one combined warranty. */
.rsdp-terms {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 14px;
	margin: 1.1rem 0 1.4rem;
}

.rsdp-term {
	display: flex;
	flex-direction: column;
	gap: 5px;
	padding: 15px 16px;
	border: 1px solid rgba(128, 128, 128, .28);
	border-radius: 10px;
}

.rsdp-term-who {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	opacity: .65;
}

.rsdp-term-what { font-size: 16px; line-height: 1.35; }

/* ==========================================================================
   Dealer pitch board offer, on the Order tab.

   Image first on a phone, side by side from tablet up. The photograph is the
   argument here -- a contractor decides they want the thing by looking at it,
   not by reading a feature list -- so it gets the width it needs.
   ========================================================================== */

.rsdp-pitch {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.4rem;
	margin: 1.4rem 0 2rem;
	padding: 1.3rem;
	border: 1px solid rgba(128, 128, 128, .26);
	border-radius: 12px;
}

.rsdp-pitch-img {
	display: grid;
	grid-template-columns: 1fr;
	gap: .7rem;
	align-content: start;
}

.rsdp-pitch-img img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 8px;
}

/* The front is a cut-out with a transparent background; a drop shadow would
   fight the artwork, so it floats plain. The angled photo is a real scene and
   reads better contained. */
.rsdp-pitch-alt {
	border: 1px solid rgba(128, 128, 128, .22);
}

.rsdp-pitch-eyebrow {
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #fe7c02;
	margin: 0 0 .3rem;
}

.rsdp-pitch-copy h3 {
	font-size: 1.35rem;
	margin: 0 0 .6rem;
	line-height: 1.2;
}

.rsdp-pitch-copy > p {
	font-size: .96rem;
	line-height: 1.6;
	margin: 0 0 .9rem;
	opacity: .88;
}

.rsdp-pitch-list {
	list-style: none;
	margin: 0 0 1.1rem;
	padding: 0;
}

.rsdp-pitch-list li {
	position: relative;
	padding-left: 1.15rem;
	margin-bottom: .42rem;
	font-size: .9rem;
	line-height: 1.5;
	opacity: .88;
}

.rsdp-pitch-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .55em;
	width: .38rem;
	height: .38rem;
	border-radius: 50%;
	background: #058fd8;
}

.rsdp-pitch-offer {
	border-left: 4px solid #058fd8;
	background: rgba(5, 143, 216, .08);
	border-radius: 0 8px 8px 0;
	padding: .85rem 1rem;
	font-size: .92rem;
	line-height: 1.55;
}

@media (min-width: 780px) {
	.rsdp-pitch { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 1.7rem; }
	.rsdp-pitch-img { grid-template-columns: 1fr; }
}

/* ============================================================== insights */

.rsdp-insight-top {
	display: grid;
	grid-template-columns: 150px 1fr;
	gap: 1.25rem;
	align-items: center;
}
.rsdp-insight-read h3 { font-size: 1.05rem; margin: 0 0 .35rem; }
.rsdp-insight-read p  { margin: 0 0 .5rem; line-height: 1.55; }

.rsdp-insight-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* -- ring ---------------------------------------------------------------- */

.rsdp-ring { width: 100%; height: auto; max-width: 150px; }
.rsdp-ring-track { stroke: var(--rsdp-line); }
.rsdp-ring-value { stroke: var(--rsdp-accent); transition: stroke-dasharray .4s ease; }
.rsdp-ring-good  .rsdp-ring-value { stroke: var(--rsdp-ok); }
.rsdp-ring-low   .rsdp-ring-value { stroke: var(--rsdp-error); }
.rsdp-ring-num {
	font-size: 25px; font-weight: 700; fill: var(--rsdp-ink);
	font-family: inherit;
}
.rsdp-ring-sub { font-size: 9px; fill: var(--rsdp-muted); font-family: inherit; }

/* -- bars ---------------------------------------------------------------- */

/* preserveAspectRatio="none" lets the bars stretch to any width. Height is
   fixed in CSS so the aspect ratio never depends on the month count. */
.rsdp-chart { width: 100%; height: 150px; display: block; }
.rsdp-bar-a { fill: var(--rsdp-accent); }
.rsdp-bar-b { fill: var(--rsdp-ok); }
.rsdp-bar-zero { fill: var(--rsdp-line); }

.rsdp-axis {
	display: flex;
	margin-top: .3rem;
}
.rsdp-axis span {
	flex: 1 1 0;
	text-align: center;
	font-size: .68rem;
	color: var(--rsdp-muted);
	white-space: nowrap;
	overflow: hidden;
}

.rsdp-legend { display: flex; gap: 1rem; margin: 0 0 .5rem; font-size: .8rem; }
.rsdp-key { display: inline-flex; align-items: center; gap: .35rem; color: var(--rsdp-muted); }
.rsdp-key::before {
	content: ""; width: .65rem; height: .65rem; border-radius: 2px; display: inline-block;
}
.rsdp-key-a::before { background: var(--rsdp-accent); }
.rsdp-key-b::before { background: var(--rsdp-ok); }

.rsdp-chart-empty {
	padding: 1.4rem 0;
	color: var(--rsdp-muted);
	font-size: .9rem;
	text-align: center;
}

/* -- ranked list --------------------------------------------------------- */

.rsdp-ranked { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.rsdp-ranked li {
	display: grid;
	grid-template-columns: 4.2rem 1fr 2.4rem;
	align-items: center;
	gap: .6rem;
}
.rsdp-ranked-k { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; }
.rsdp-ranked-bar { background: var(--rsdp-line); border-radius: 3px; height: .6rem; overflow: hidden; }
.rsdp-ranked-bar i { display: block; height: 100%; background: var(--rsdp-accent); border-radius: 3px; }
.rsdp-ranked-n { font-size: .82rem; color: var(--rsdp-muted); text-align: right; }

/* -- funnel -------------------------------------------------------------- */

.rsdp-funnel { display: flex; gap: 1.5rem; margin-bottom: .6rem; }
.rsdp-funnel div { display: flex; flex-direction: column; }
.rsdp-funnel strong { font-size: 1.6rem; line-height: 1.1; }
.rsdp-funnel span { font-size: .78rem; color: var(--rsdp-muted); }

@media (max-width: 700px) {
	.rsdp-insight-top  { grid-template-columns: 1fr; justify-items: center; text-align: center; }
	.rsdp-insight-cols { grid-template-columns: 1fr; }
	.rsdp-chart { height: 120px; }
}

@media print {
	.rsdp-tabs, .rsdp-logout { display: none !important; }
	.rsdp-panel { break-inside: avoid; }
}
