/* ==========================================================
   Cookie Consent - RecoveryPC
   Palette e font coerenti con assets/css/style.css
   ========================================================== */

#rpc-cookie-banner, #rpc-cookie-modal, #rpc-cookie-fab {
  font-family: "Open Sans", sans-serif;
  color: #444;
  box-sizing: border-box;
}

#rpc-cookie-banner *, #rpc-cookie-modal *, #rpc-cookie-fab * {
  box-sizing: border-box;
}

/* ---------- Banner in basso ---------- */
#rpc-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: #fff;
  border-top: 4px solid #50d8af;
  box-shadow: 0 -4px 20px rgba(12, 46, 138, 0.15);
  padding: 22px 20px;
  transform: translateY(120%);
  transition: transform 0.5s ease;
}

#rpc-cookie-banner.rpc-visible {
  transform: translateY(0);
}

#rpc-cookie-banner .rpc-cookie-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}

#rpc-cookie-banner .rpc-cookie-text {
  flex: 1 1 420px;
  font-size: 14px;
  line-height: 1.6;
}

#rpc-cookie-banner .rpc-cookie-text h4 {
  font-family: "Raleway", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #0c2e8a;
  margin: 0 0 6px 0;
}

#rpc-cookie-banner .rpc-cookie-text a {
  color: #50d8af;
  text-decoration: underline;
}

#rpc-cookie-banner .rpc-cookie-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Bottoni "a pillola" come .btn-get-started / .btn-projects ---------- */
.rpc-btn {
  font-family: "Raleway", sans-serif;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.5px;
  display: inline-block;
  padding: 9px 26px;
  border-radius: 50px;
  transition: 0.35s;
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
  white-space: nowrap;
}

.rpc-btn-primary {
  background: #0c2e8a;
  border-color: #0c2e8a;
  color: #fff;
}
.rpc-btn-primary:hover {
  background: none;
  color: #0c2e8a;
}

.rpc-btn-accent {
  background: #50d8af;
  border-color: #50d8af;
  color: #fff;
}
.rpc-btn-accent:hover {
  background: none;
  color: #50d8af;
}

.rpc-btn-outline {
  background: none;
  border-color: #b9c2d0;
  color: #444;
}
.rpc-btn-outline:hover {
  border-color: #0c2e8a;
  color: #0c2e8a;
}

/* ---------- Pulsante flottante per riaprire le preferenze ---------- */
#rpc-cookie-fab {
  position: fixed;
  left: 15px;
  bottom: 15px;
  z-index: 9998;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #0c2e8a;
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(12, 46, 138, 0.35);
  transition: 0.3s;
}
#rpc-cookie-fab:hover {
  background: #50d8af;
}
#rpc-cookie-fab.rpc-visible {
  display: flex;
}

/* ---------- Modale preferenze ---------- */
#rpc-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#rpc-cookie-modal.rpc-visible {
  display: flex;
}

#rpc-cookie-modal .rpc-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 46, 138, 0.45);
}

#rpc-cookie-modal .rpc-modal-box {
  position: relative;
  background: #fff;
  border-radius: 10px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

#rpc-cookie-modal h3 {
  font-family: "Raleway", sans-serif;
  color: #0c2e8a;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px 0;
}

#rpc-cookie-modal p.rpc-modal-intro {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

#rpc-cookie-modal .rpc-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 22px;
  line-height: 1;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
}
#rpc-cookie-modal .rpc-modal-close:hover {
  color: #0c2e8a;
}

.rpc-cookie-category {
  border: 1px solid #eceff3;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.rpc-cookie-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rpc-cookie-category-head strong {
  font-family: "Raleway", sans-serif;
  color: #0c2e8a;
  font-size: 15px;
}

.rpc-cookie-category p {
  font-size: 13px;
  color: #666;
  margin: 8px 0 0 0;
  line-height: 1.5;
}

/* Switch on/off */
.rpc-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex: 0 0 auto;
}
.rpc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.rpc-switch .rpc-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #ccd2dc;
  border-radius: 24px;
  transition: 0.3s;
}
.rpc-switch .rpc-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: 0.3s;
}
.rpc-switch input:checked + .rpc-slider {
  background-color: #50d8af;
}
.rpc-switch input:checked + .rpc-slider::before {
  transform: translateX(20px);
}
.rpc-switch input:disabled + .rpc-slider {
  background-color: #50d8af;
  opacity: 0.6;
  cursor: not-allowed;
}

#rpc-cookie-modal .rpc-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  justify-content: flex-end;
}

/* ---------- Placeholder per contenuti bloccati (mappa / facebook) ---------- */
.rpc-consent-placeholder {
  border: 1px dashed #c7cedb;
  border-radius: 8px;
  background: #f7f9fb;
  padding: 30px 20px;
  text-align: center;
  font-size: 14px;
  color: #555;
}
.rpc-consent-placeholder p {
  margin: 0 0 14px 0;
}

@media (max-width: 575px) {
  #rpc-cookie-banner .rpc-cookie-actions {
    width: 100%;
  }
  #rpc-cookie-banner .rpc-cookie-actions .rpc-btn {
    flex: 1 1 auto;
  }
}
