
:root{
  --puh-primary:#5F01D1;
  --puh-accent:#FFA200;
  --puh-on-primary:#FFFFFF;
  --puh-on-accent:#0B0B0B;
}

/* Root */
.puh-root{
  position: fixed;
  bottom: 18px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
}
.puh-right{ right: 18px; }
.puh-left{ left: 18px; }

/* Floating button */
.puh-fab{
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 999px;
  background: var(--puh-primary);
  color: var(--puh-on-primary);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transition: transform .15s ease, box-shadow .15s ease, opacity .2s ease;
}
.puh-fab:hover{ transform: translateY(-1px); box-shadow: 0 14px 34px rgba(0,0,0,.28); }
.puh-fab:active{ transform: translateY(0px); opacity: .95; }
.puh-fab:focus{ outline: 2px solid rgba(255,255,255,.35); outline-offset: 3px; }

.puh-fab__icon{
  display:inline-flex;
  width: 28px;
  height: 28px;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,.14);
  border-radius: 10px;
  font-size: 16px;
}
.puh-fab__text{
  font-weight: 700;
  font-size: 14px;
  line-height: 1.1;
  white-space: nowrap;
}

/* Circle variant */
.puh-fab--circle{
  width: 54px;
  height: 54px;
  padding: 0;
  border-radius: 999px;
  justify-content: center;
}
.puh-fab--circle .puh-fab__text{ display:none; }
.puh-fab--circle .puh-fab__icon{
  width: 40px; height: 40px;
  border-radius: 999px;
}

/* Modal */
.puh-modal{
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}
.puh-modal.is-open{
  pointer-events: auto;
  opacity: 1;
}
.puh-modal__overlay{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.48);
}
.puh-modal__panel{
  position:absolute;
  bottom: 18px;
  width: min(420px, calc(100vw - 36px));
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  overflow: hidden;
  transform: translateY(10px);
  transition: transform .18s ease;
}
.puh-right .puh-modal__panel{ right: 18px; }
.puh-left .puh-modal__panel{ left: 18px; }

.puh-modal.is-open .puh-modal__panel{ transform: translateY(0); }

.puh-modal__header{
  display:flex;
  gap: 12px;
  align-items:flex-start;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.puh-modal__title{
  font-size: 16px;
  font-weight: 800;
  color: #111;
}
.puh-modal__subtitle{
  margin-top: 4px;
  font-size: 13px;
  color: rgba(0,0,0,.66);
  line-height: 1.35;
}
.puh-modal__close{
  border:0;
  background: transparent;
  cursor:pointer;
  font-size: 18px;
  line-height: 1;
  padding: 8px 10px;
  border-radius: 10px;
  color: rgba(0,0,0,.7);
}
.puh-modal__close:hover{ background: rgba(0,0,0,.06); }

/* Form */
.puh-form{
  padding: 14px 16px 16px;
}
.puh-field{ display:block; margin-bottom: 12px; }
.puh-field__label{
  display:block;
  font-size: 12px;
  font-weight: 700;
  color: rgba(0,0,0,.7);
  margin-bottom: 6px;
}
.puh-input{
  width: 100%;
  border: 1px solid rgba(0,0,0,.14);
  border-radius: 12px;
  padding: 12px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.puh-input:focus{
  border-color: rgba(95,1,209,.55);
  box-shadow: 0 0 0 4px rgba(95,1,209,.12);
}

.puh-consent{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  font-size: 12.5px;
  color: rgba(0,0,0,.72);
  line-height: 1.35;
  margin: 6px 0 12px;
}
.puh-consent input{ margin-top: 2px; }

.puh-submit{
  width: 100%;
  border: 0;
  cursor: pointer;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--puh-accent);
  color: var(--puh-on-accent);
  font-weight: 900;
  font-size: 14px;
  transition: transform .12s ease, opacity .15s ease;
}
.puh-submit:hover{ transform: translateY(-1px); }
.puh-submit:active{ transform: translateY(0); opacity: .95; }
.puh-submit[disabled]{ opacity: .6; cursor: not-allowed; transform:none; }

.puh-note{
  margin-top: 10px;
  font-size: 12px;
  color: rgba(0,0,0,.55);
}
.puh-msg{
  margin-top: 10px;
  font-size: 13px;
  min-height: 18px;
}
.puh-msg.is-ok{ color: #0a7a2f; font-weight: 700; }
.puh-msg.is-err{ color: #b00020; font-weight: 700; }

/* Honeypot hidden */
.puh-hp{
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
}

/* Mobile: make it bottom-sheet */
@media (max-width: 520px){
  .puh-modal__panel{
    left: 18px !important;
    right: 18px !important;
    width: auto;
    bottom: 18px;
  }
  .puh-fab--circle .puh-fab__text{ display:none; }
  /* allow showing label if requested */
  .puh-root[data-show-mobile-label="1"] .puh-fab--circle{
    width: auto; padding: 12px 14px;
  }
  .puh-root[data-show-mobile-label="1"] .puh-fab--circle .puh-fab__text{ display:inline; }
  .puh-root[data-show-mobile-label="1"] .puh-fab--circle .puh-fab__icon{ width: 28px; height: 28px; border-radius: 10px; }
}
