/* callback-popup-v2.css */
.cbp-wrapper-instance { display: inline-block; }
.cbp-trigger-button {
  background: #0073aa;
  color: #fff;
  border: 0;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
}
.cbp-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}
.cbp-overlay.active { display: flex; background: rgba(0,0,0,0.4); }
.cbp-popup {
  background: #fff;
  width: 420px;
  /*max-width: calc(100% - 40px);*/
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  padding: 20px;
  position: relative;
  max-height: 80vh;        /* ✅ limit height */
  overflow-y: auto;        /* ✅ allow scroll inside */
}
.cbp-popup h3 { margin-top: 0; font-size: 20px; }
.cbp-actions { display: flex; gap: 12px; margin-top: 12px; }
.cbp-btn { display: inline-block; padding: 10px 14px; border-radius: 6px; text-decoration: none; border: none; cursor: pointer; }
.cbp-call { background: #2ecc71; color: #fff; }
.cbp-request { background: #3498db; color: #fff; color: #fff; }

/* Close button */
.cbp-close {
  position: absolute;
  right: 10px;
  top: 8px;
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* Floating button */
.cbp-floating-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  z-index: 99998;
  color: #fff;
  font-size: 12px;
  text-align: center;
  padding: 8px;
}

/* Mobile behavior: slide up from bottom and occupy 30% of screen height */
@media (max-width: 768px) {
  .cbp-overlay { align-items: flex-end; padding: 0; }
  .cbp-popup {
    width: 100%;
    border-radius: 12px 12px 0 0;
    max-height: 90vh;      /* ✅ mobile-friendly height */
    overflow-y: auto;      /* ✅ enable scrolling */
    padding: 50px;
    box-shadow: 0 -8px 30px rgba(0,0,0,0.18);
    transform: translateY(100%);
  }
  .cbp-overlay.active .cbp-popup { transform: translateY(0); }
  .cbp-popup h3 { font-size: 18px; }
  .cbp-actions { gap: 8px; flex-direction: column; }
  .cbp-call, .cbp-request { width: 100%; text-align: center; }
}

/* Desktop opening animation */
@media (min-width: 769px) {
  .cbp-overlay.active .cbp-popup { transform: scale(1); opacity: 1; }
  .cbp-popup { transform: scale(0.96); opacity: 0; transition: transform 0.18s ease, opacity 0.18s ease; }
}

/* Basic CF7 container styling */
.cbp-cf7 { margin-top: 12px; }
