/* ==========================================================================
   Royal Hands Contracting — privacy / cookie consent banner
   Custom banner + preferences modal (no native Zaraz dialog).
   Injected by /assets/js/privacy-banner.js
   ========================================================================== */

.rh-privacy-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: min(94vw, 1040px);
  z-index: 2147483646;
  display: none;
}
.rh-privacy-banner.is-visible { display: block; }

.rh-privacy-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2a1139, #3a1a4f);
  border: 1px solid rgba(226, 160, 25, .35);
  box-shadow: 0 18px 50px rgba(28, 10, 38, .45);
  color: rgba(255, 255, 255, .85);
  font-size: .92rem;
  line-height: 1.5;
}
.rh-privacy-panel .rh-privacy-eyebrow {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #efc04a;
  margin-bottom: .2rem;
}
.rh-privacy-panel p { margin: 0; }
.rh-privacy-panel a { color: #efc04a; text-decoration: underline; }

.rh-privacy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}
.rh-privacy-actions button {
  font: inherit;
  font-weight: 600;
  font-size: .9rem;
  border-radius: 999px;
  padding: .55rem 1.15rem;
  cursor: pointer;
  min-height: 44px;
}
.rh-btn-accept {
  background: #e2a019;
  border: 1px solid #e2a019;
  color: #2a1139;
}
.rh-btn-accept:hover { background: #efc04a; border-color: #efc04a; }
.rh-btn-essential {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .45);
  color: rgba(255, 255, 255, .9);
}
.rh-btn-essential:hover { border-color: #fff; color: #fff; }
.rh-btn-manage {
  background: none;
  border: none;
  color: rgba(255, 255, 255, .75);
  text-decoration: underline;
  padding: .55rem .5rem;
}
.rh-btn-manage:hover { color: #efc04a; }

/* ---- Preferences modal ------------------------------------------------- */
.rh-privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(28, 10, 38, .6);
}
.rh-privacy-modal.is-visible { display: flex; }

.rh-privacy-dialog {
  width: min(94vw, 560px);
  max-height: 86vh;
  overflow-y: auto;
  background: #fff;
  color: #3d3650;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(28, 10, 38, .35);
  padding: 26px 26px 22px;
}
.rh-privacy-dialog h2 {
  font-size: 1.25rem;
  color: #1f1828;
  margin: 0 0 .3rem;
}
.rh-privacy-dialog > p { margin: 0 0 1.1rem; font-size: .92rem; }
.rh-privacy-dialog a { color: #53246f; }

.rh-purpose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid #e7e2ee;
}
.rh-purpose strong { color: #1f1828; display: block; font-size: .95rem; }
.rh-purpose p { margin: .15rem 0 0; font-size: .85rem; color: #6b6478; }
.rh-purpose .rh-locked { font-size: .78rem; color: #1f8a4c; font-weight: 600; }

/* toggle */
.rh-toggle { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.rh-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.rh-toggle .rh-slider {
  position: absolute; inset: 0;
  background: #cfc8da;
  border-radius: 999px;
  transition: background .18s ease;
  pointer-events: none;
}
.rh-toggle .rh-slider::before {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .18s ease;
  box-shadow: 0 1px 3px rgba(28, 10, 38, .3);
}
.rh-toggle input:checked + .rh-slider { background: #53246f; }
.rh-toggle input:checked + .rh-slider::before { transform: translateX(20px); }
.rh-toggle input:disabled + .rh-slider { background: #1f8a4c; opacity: .55; cursor: not-allowed; }
.rh-toggle input:focus-visible + .rh-slider { outline: 2px solid #53246f; outline-offset: 2px; }

.rh-privacy-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 1.2rem;
}
.rh-privacy-modal-actions button {
  font: inherit;
  font-weight: 600;
  font-size: .9rem;
  border-radius: 999px;
  padding: .55rem 1.2rem;
  cursor: pointer;
  min-height: 44px;
}
.rh-btn-save {
  background: #53246f;
  border: 1px solid #53246f;
  color: #fff;
}
.rh-btn-save:hover { background: #3a1a4f; }
.rh-btn-cancel {
  background: transparent;
  border: 1px solid #cfc8da;
  color: #3d3650;
}
.rh-btn-cancel:hover { border-color: #53246f; color: #53246f; }

/* While the consent banner is open it occupies the bottom of the viewport —
   hide the floating call button so the primary CTA isn't buried under it. */
body.rh-consent-open .call-fab { display: none; }

@media (max-width: 860px) {
  .rh-privacy-banner { bottom: 10px; }
  .rh-privacy-panel { grid-template-columns: 1fr; gap: 12px; padding: 16px 18px; }
  .rh-privacy-actions { justify-content: flex-start; }
}
