/* ==========================================================================
   Hidroplagas Floating Contact Widget & Unified Budget Modal
   ========================================================================== */

#hp-contact-widget,
#hp-contact-widget *,
#hp-budget-modal-overlay,
#hp-budget-modal-overlay * {
  box-sizing: border-box !important;
  font-family: "Calibri", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

/* ---------- Floating Bottom-Right Container ---------- */
#hp-contact-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}

/* ---------- Launcher Row (Pill + Circular FAB) ---------- */
.hp-launcher-row {
  display: flex;
  align-items: center;
  gap: 16px;
  pointer-events: auto;
}

.hp-launcher-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(9, 34, 60, 0.96);
  border: 1px solid rgba(41, 196, 240, 0.35);
  border-radius: 999px;
  padding: 11px 22px;
  color: #ffffff;
  font-size: 15.5px;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(4, 22, 42, 0.32);
  transition: opacity 0.22s ease, transform 0.22s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.hp-launcher-pill:hover {
  border-color: rgba(41, 196, 240, 0.75);
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(0, 119, 182, 0.38);
}

.hp-launcher-pill .hp-pill-q {
  color: #ffffff;
  font-weight: 500;
}

.hp-launcher-pill .hp-pill-cta {
  color: #29c4f0;
  font-weight: 700;
}

#hp-contact-widget.is-open .hp-launcher-pill {
  opacity: 0;
  transform: translateX(12px) scale(0.95);
  pointer-events: none;
}

/* Circular FAB with Concentric Rings */
.hp-launcher-fab {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: linear-gradient(145deg, #19b5de 0%, #0077b6 100%) !important;
  color: #ffffff !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(0, 105, 168, 0.45);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.hp-launcher-fab:hover {
  transform: scale(1.04);
  box-shadow: 0 12px 32px rgba(0, 130, 198, 0.58);
}

/* Inner crisp ring (closed state) */
.hp-launcher-fab::before {
  content: "";
  position: absolute;
  top: -6px;
  right: -6px;
  bottom: -6px;
  left: -6px;
  border-radius: 50%;
  border: 2px solid rgba(25, 181, 222, 0.78);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

/* Outer soft halo ring (closed state) */
.hp-launcher-fab::after {
  content: "";
  position: absolute;
  top: -14px;
  right: -14px;
  bottom: -14px;
  left: -14px;
  border-radius: 50%;
  border: 1.5px solid rgba(25, 181, 222, 0.28);
  box-shadow: 0 0 18px rgba(25, 181, 222, 0.22);
  pointer-events: none;
  animation: hpPulseHalo 2.8s ease-in-out infinite;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

@keyframes hpPulseHalo {
  0%, 100% {
    transform: scale(1);
    opacity: 0.75;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

#hp-contact-widget.is-open .hp-launcher-fab::before,
#hp-contact-widget.is-open .hp-launcher-fab::after {
  opacity: 0;
  transform: scale(0.85);
  animation: none;
}

.hp-fab-icon {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, transform 0.22s ease;
}

.hp-fab-icon-chat {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.hp-fab-icon-close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}

#hp-contact-widget.is-open .hp-fab-icon-chat {
  opacity: 0;
  transform: rotate(90deg) scale(0.6);
}

#hp-contact-widget.is-open .hp-fab-icon-close {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* ---------- Opened Floating Contact Card ---------- */
.hp-contact-panel {
  width: 364px;
  max-width: calc(100vw - 32px);
  margin-bottom: 16px;
  background: #0b2239;
  border: 1px solid rgba(41, 196, 240, 0.26);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 22px 54px rgba(3, 16, 32, 0.52);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.24s;
  pointer-events: none;
}

#hp-contact-widget.is-open .hp-contact-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Header */
.hp-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background:
    radial-gradient(circle at 16% 35%, rgba(25, 181, 222, 0.28) 0%, transparent 55%),
    linear-gradient(135deg, #00457c 0%, #092a49 60%, #071d34 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.hp-panel-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.hp-panel-logo-badge {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 11px;
  background: #ffffff;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.24);
}

.hp-panel-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.hp-panel-headings {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hp-panel-title {
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.1px;
  margin: 0;
}

.hp-panel-subtitle {
  color: rgba(218, 236, 250, 0.78);
  font-size: 13px;
  line-height: 1.3;
  margin-top: 3px;
}

.hp-panel-close {
  background: transparent !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.68) !important;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  flex-shrink: 0;
}

.hp-panel-close:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

/* Body */
.hp-panel-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hp-greeting-box {
  background: rgba(4, 15, 28, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 13px;
  padding: 13px 15px;
  color: rgba(238, 246, 255, 0.92);
  font-size: 14.5px;
  line-height: 1.42;
  margin-bottom: 2px;
}

/* Option Cards */
.hp-option-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 15px !important;
  margin: 0 !important;
  background: rgba(255, 255, 255, 0.045) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 13px !important;
  text-decoration: none !important;
  text-align: left !important;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.16s ease, box-shadow 0.18s ease;
}

.hp-option-card:hover,
.hp-option-card:focus {
  background: rgba(25, 181, 222, 0.14) !important;
  border-color: #29c4f0 !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 149, 194, 0.22);
  outline: none;
}

/* Featured WhatsApp card subtle highlight matching reference */
.hp-option-card.hp-option-whatsapp {
  background: rgba(20, 75, 78, 0.36) !important;
  border: 1.5px solid #29c4f0 !important;
  box-shadow: inset 0 0 0 1px rgba(37, 211, 102, 0.18);
}

.hp-option-card.hp-option-whatsapp:hover {
  background: rgba(24, 96, 98, 0.5) !important;
  border-color: #4bd4fa !important;
}

.hp-option-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #29c4f0;
}

.hp-option-whatsapp .hp-option-icon {
  color: #25d366;
}

.hp-option-texts {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hp-option-title {
  color: #ffffff;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.2;
}

.hp-option-sub {
  color: rgba(206, 226, 244, 0.72);
  font-size: 13.5px;
  line-height: 1.3;
  margin-top: 2px;
}

/* ==========================================================================
   Unified Budget Modal (Overrides master.css global form { height: 10px })
   ========================================================================== */
#hp-budget-modal-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10060;
  background: rgba(5, 20, 38, 0.68);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

#hp-budget-modal-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.hp-budget-modal {
  width: 100%;
  max-width: 490px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(3, 18, 36, 0.45);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

#hp-budget-modal-overlay.is-visible .hp-budget-modal {
  transform: translateY(0) scale(1);
}

.hp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: linear-gradient(135deg, #00417c 0%, #0088b8 100%);
  color: #ffffff;
}

.hp-modal-header-left {
  display: flex;
  align-items: center;
  gap: 13px;
}

.hp-modal-title {
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.hp-modal-subtitle {
  color: rgba(255, 255, 255, 0.86);
  font-size: 13.5px;
  line-height: 1.3;
  margin-top: 2px;
}

.hp-modal-close {
  background: rgba(255, 255, 255, 0.14) !important;
  border: none !important;
  color: #ffffff !important;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease;
}

.hp-modal-close:hover {
  background: rgba(255, 255, 255, 0.26) !important;
}

form#hp-budget-form {
  background: #ffffff !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 20px 22px 22px !important;
  display: block !important;
}

.hp-form-row {
  margin-bottom: 13px;
}

.hp-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hp-form-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 5px;
}

form#hp-budget-form input[type="text"],
form#hp-budget-form input[type="tel"],
form#hp-budget-form input[type="email"],
form#hp-budget-form textarea {
  width: 100% !important;
  height: auto !important;
  padding: 10px 12px !important;
  margin: 0 !important;
  font-size: 15px !important;
  line-height: 1.4 !important;
  color: #0f172a !important;
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 9px !important;
  box-shadow: none !important;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

form#hp-budget-form input:focus,
form#hp-budget-form textarea:focus {
  background: #ffffff !important;
  border-color: #0095c2 !important;
  box-shadow: 0 0 0 3px rgba(0, 149, 194, 0.15) !important;
  outline: none !important;
}

form#hp-budget-form textarea {
  min-height: 92px !important;
  resize: vertical;
}

.hp-hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.hp-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 9px;
  font-size: 13.5px;
  line-height: 1.4;
  color: #475569;
}

.hp-checkbox-row input[type="checkbox"] {
  margin: 3px 0 0 0 !important;
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0;
  cursor: pointer;
}

.hp-checkbox-row a {
  color: #0077b6;
  text-decoration: underline;
}

.hp-form-status {
  display: none;
  padding: 11px 14px;
  border-radius: 9px;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 12px;
}

.hp-form-status.is-success {
  display: block;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  text-align: center;
  padding: 24px 18px;
  margin-bottom: 0;
}

.hp-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #d1fae5;
  color: #059669;
  margin-bottom: 10px;
}

.hp-success-title {
  font-size: 18px;
  font-weight: 800;
  color: #065f46;
  margin-bottom: 4px;
}

.hp-form-status.is-error {
  display: block;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.hp-submit-btn {
  width: 100%;
  padding: 13px 20px !important;
  margin: 6px 0 0 0 !important;
  border: none !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #0095c2 0%, #005fa3 100%) !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 119, 182, 0.3);
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.hp-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 119, 182, 0.42);
}

.hp-submit-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* ---------- Mobile Responsiveness ---------- */
@media (max-width: 560px) {
  #hp-contact-widget {
    right: 16px;
    bottom: 16px;
  }

  .hp-launcher-pill {
    padding: 9px 16px;
    font-size: 14px;
  }

  .hp-launcher-fab {
    width: 54px;
    height: 54px;
  }

  .hp-contact-panel {
    width: calc(100vw - 32px);
    margin-bottom: 14px;
  }

  .hp-form-grid-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
