/* Proposed-changes layer for the RP Abrasives mirror. Everything is scoped under .rpc- / [data-change]. */
:root {
  --rpc-accent: #6d28d9;
  --rpc-accent-dark: #4c1d95;
  --rpc-accent-soft: rgba(109, 40, 217, 0.07);
  --rpc-add: #15803d;
  --rpc-replace: #1d4ed8;
  --rpc-remove: #b91c1c;
  --rpc-evidenced: #15803d;
  --rpc-confirm: #b45309;
  --rpc-ink: #1f2937;
  --rpc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- change wrappers ---------- */
html:not(.rpc-on) [data-change][data-change-type="add"] { display: none !important; }
/* With the layer off, wrappers generate no box so the page lays out exactly like the live site. */
html:not(.rpc-on) [data-change]:not([data-change-type="add"]) { display: contents; }
html.rpc-on div[data-change][data-change-type="remove"] { text-decoration: line-through; text-decoration-color: var(--rpc-remove); }

html.rpc-on [data-change] {
  position: relative;
  outline: 2px dashed var(--rpc-accent);
  outline-offset: 3px;
  background-color: var(--rpc-accent-soft);
  border-radius: 2px;
  scroll-margin-top: 120px;
}
html.rpc-on span[data-change] { outline-offset: 1px; }
html.rpc-on [data-change][data-change-type="remove"] {
  outline-color: var(--rpc-remove);
  background-color: rgba(185, 28, 28, 0.06);
}
html.rpc-on [data-change][data-change-type="remove"] > :not(.rpc-badge),
html.rpc-on span[data-change][data-change-type="remove"] {
  text-decoration: line-through;
  text-decoration-color: var(--rpc-remove);
  opacity: 0.55;
}
html.rpc-on [data-change].rpc-flash { animation: rpc-flash 1.6s ease-out 2; }
@keyframes rpc-flash {
  0% { outline-width: 2px; box-shadow: 0 0 0 0 rgba(109, 40, 217, 0.55); }
  50% { box-shadow: 0 0 0 10px rgba(109, 40, 217, 0); }
  100% { box-shadow: 0 0 0 0 rgba(109, 40, 217, 0); }
}

/* ---------- numbered badge ---------- */
.rpc-badge { display: none; }
html.rpc-on .rpc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -13px;
  left: -13px;
  z-index: 50;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  box-sizing: border-box;
  border: 2px solid #fff;
  border-radius: 12px;
  background: var(--rpc-accent);
  color: #fff !important;
  font: 700 12px/1 var(--rpc-font);
  text-decoration: none !important;
  letter-spacing: 0;
  text-transform: none;
  opacity: 1 !important;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
html.rpc-on [data-change-type="remove"] > .rpc-badge { background: var(--rpc-remove); }
.rpc-badge:hover, .rpc-badge:focus-visible { background: var(--rpc-accent-dark); outline: none; }

/* ---------- popover ---------- */
.rpc-pop {
  position: absolute;
  z-index: 100000;
  width: 320px;
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  padding: 14px 16px 12px;
  border-top: 4px solid var(--rpc-accent);
  border-radius: 6px;
  background: #fff;
  color: var(--rpc-ink);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  font: 400 13px/1.5 var(--rpc-font);
  text-align: left;
}
.rpc-pop[hidden] { display: none; }
.rpc-pop h4 { margin: 0 0 6px; font: 700 14px/1.35 var(--rpc-font); color: var(--rpc-ink); text-transform: none; letter-spacing: 0; }
.rpc-pop p { margin: 6px 0 0; font: inherit; color: #374151; }
.rpc-pop .rpc-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rpc-pop a.rpc-more { display: inline-block; margin-top: 10px; color: var(--rpc-accent) !important; font-weight: 600; text-decoration: none; }
.rpc-pop a.rpc-more:hover { text-decoration: underline; }

.rpc-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font: 700 10px/1.5 var(--rpc-font);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: #6b7280;
}
.rpc-chip.rpc-num { background: var(--rpc-accent); }
.rpc-chip.t-add { background: var(--rpc-add); }
.rpc-chip.t-replace { background: var(--rpc-replace); }
.rpc-chip.t-remove { background: var(--rpc-remove); }
.rpc-chip.s-evidenced { background: var(--rpc-evidenced); }
.rpc-chip.s-confirm { background: var(--rpc-confirm); }

/* ---------- floating toggle ---------- */
.rpc-widget {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99999;
  width: 248px;
  box-sizing: border-box;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  color: var(--rpc-ink);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  font: 400 13px/1.4 var(--rpc-font);
}
.rpc-widget * { box-sizing: border-box; }
.rpc-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  background: var(--rpc-accent);
  color: #fff;
  font: 700 11px/1.3 var(--rpc-font);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.rpc-widget-head button {
  border: 0;
  background: transparent;
  color: #fff;
  font: 700 16px/1 var(--rpc-font);
  cursor: pointer;
  padding: 0 2px;
}
.rpc-widget-body { padding: 10px 12px 12px; }
.rpc-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  cursor: pointer;
  font: 600 14px/1.3 var(--rpc-font);
  color: var(--rpc-ink);
}
.rpc-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rpc-track {
  flex: none;
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 12px;
  background: #cbd5e1;
  transition: background 0.15s;
}
.rpc-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}
.rpc-switch input:checked + .rpc-track { background: var(--rpc-accent); }
.rpc-switch input:checked + .rpc-track::after { transform: translateX(18px); }
.rpc-switch input:focus-visible + .rpc-track { outline: 2px solid var(--rpc-accent-dark); outline-offset: 2px; }
.rpc-count { margin: 8px 0 0; color: #4b5563; font: 400 12px/1.4 var(--rpc-font); }
.rpc-count b { color: var(--rpc-accent); }
.rpc-actions { display: flex; gap: 8px; margin-top: 10px; }
.rpc-widget button, .rpc-widget a, .rpc-pop a {
  font-family: var(--rpc-font) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  box-shadow: none;
  min-height: 0;
  height: auto;
  width: auto;
  margin: 0;
}
.rpc-actions a, .rpc-actions button {
  flex: 1;
  display: inline-block;
  padding: 7px 8px !important;
  border: 1px solid var(--rpc-accent) !important;
  border-radius: 5px !important;
  background: #fff !important;
  color: var(--rpc-accent) !important;
  font: 600 12px/1.2 var(--rpc-font) !important;
  text-align: center;
  text-decoration: none !important;
  cursor: pointer;
}
.rpc-actions a.rpc-primary { background: var(--rpc-accent) !important; color: #fff !important; }
.rpc-actions button[disabled] { opacity: 0.4; cursor: default; }
.rpc-widget.rpc-min .rpc-widget-body { display: none; }
.rpc-widget.rpc-min { width: auto; }
.rpc-widget-head { cursor: default; gap: 10px; }
.rpc-state { display: none; margin-left: 6px; padding: 1px 6px; border-radius: 8px; background: rgba(255, 255, 255, 0.22); font-style: normal; }
.rpc-widget.rpc-min .rpc-state { display: inline-block; }
.rpc-widget.rpc-min .rpc-widget-head { padding: 9px 12px; }

@media (max-width: 767px) {
  /* The theme pins a contact bar to the bottom on small screens. */
  .rpc-widget { right: 8px; bottom: 56px; width: 220px; }
}
/* ---------- styles for elements the proposals introduce (not on the live theme) ---------- */
[data-change] .tagline { margin: -4px 0 14px; color: #c8102e; font: italic 700 22px/1.3 "BenchNine", sans-serif; }
[data-change] .credentials-strip ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; padding: 0; list-style: none; }
[data-change] .credentials-strip li { list-style: none; margin: 0; padding: 6px 12px; border: 1px solid #cfd6df; border-radius: 3px; background: #f4f6f8; font-size: 14px; }
[data-change] .credentials-strip li::before { content: "\2713\00a0"; color: #15803d; font-weight: 700; }
[data-change] .faq h3 { margin-top: 14px; }
[data-change] .faq p { margin-top: 4px; }
.header-elements a.big-btn--secondary,
[data-change] a.big-btn--secondary { margin-top: 6px; background: #fff; color: #c8102e !important; border: 2px solid #c8102e; box-sizing: border-box; }
[data-change] .footer-hours, [data-change] .footer-credentials { margin: 6px 0 0; color: #fff; font-size: 14px; line-height: 1.45; }
[data-change] .footer-credentials { font-weight: 600; }
.gform_fields > [data-change] { grid-column: 1 / -1; }
[data-change] .quote-details { margin: 16px 0; padding: 12px 16px; border: 1px solid #ccc; }
[data-change] .quote-details legend { padding: 0 6px; font-weight: 700; }
[data-change] .quote-details > label { display: block; margin: 10px 0 4px; font-weight: 700; }
[data-change] .quote-details > label:has(input[type="checkbox"]), [data-change] .quote-details > label:has(input[type="radio"]) { display: block; margin: 4px 0; font-weight: 400; }
[data-change] .quote-details input[type="text"], [data-change] .quote-details input[type="tel"], [data-change] .quote-details textarea, [data-change] .quote-details select { width: 100%; box-sizing: border-box; }
[data-change] .quote-details > p { margin: 12px 0 4px; font-weight: 700; }

@media print {
  .rpc-widget, .rpc-pop, .rpc-badge { display: none !important; }
}
