/* =========================================
   FORCE DISABLE THEME PRELOADER / LOADING
   Put this at the TOP to prevent flash
========================================= */
html, body {
  /* Helps some themes that fade in body */
  opacity: 1 !important;
}

/* Common WHMCS/theme preloader selectors */
#preloader,
.preloader,
.page-loader,
.loader-wrapper,
#loader,
.loading-overlay,
.site-loader,
#page-preloader,
#pageloader,
#loading,
.loading,
.spinner,
.sk-spinner,
.lds-ring,
.lds-dual-ring {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* If theme uses a full-screen overlay element */
.preloader-bg,
.loader-bg,
.overlay-loader,
.page-loading,
#overlay,
#overlay-loader {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}


/* =========================================
   Castroid WhatsApp Widget
========================================= */

/* Floating icon */
#whmcs-wa-fab{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background: #25D366;
  box-shadow: 0 10px 25px rgba(0,0,0,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  cursor: pointer;
  z-index: 2147483647;
}

#whmcs-wa-fab:hover{ filter: brightness(0.95); }
#whmcs-wa-fab:active{ transform: translateY(1px); }
#whmcs-wa-fab svg{ width: 28px; height: 28px; display:block; fill:#fff; }

/* Popup panel */
#whmcs-wa-panel{
  position: fixed;
  right: 18px;
  bottom: 86px;
  width: 320px;
  max-width: calc(100vw - 36px);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(0,0,0,.25);
  overflow: hidden;
  z-index: 2147483647;
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: transform .18s ease, opacity .18s ease;
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}

#whmcs-wa-panel.is-open{
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Header */
#whmcs-wa-panel .wa-head{
  background: #25D366;
  color: #fff;
  padding: 14px 14px 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

#whmcs-wa-panel .wa-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 9999px;
    overflow: hidden;
    background: #fff;
}

#whmcs-wa-panel .wa-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

#whmcs-wa-panel .wa-title{
  line-height: 1.15;
  flex: 1 1 auto;
}

#whmcs-wa-panel .wa-title b{ display:block; font-size: 15px; }
#whmcs-wa-panel .wa-title small{ display:block; opacity: .9; font-size: 12px; margin-top: 2px; }

#whmcs-wa-panel .wa-close{
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 8px;
  opacity: .95;
}
#whmcs-wa-panel .wa-close:hover{ opacity: 1; }

/* Body */
#whmcs-wa-panel .wa-body{
  padding: 12px 14px 14px 14px;
  background: #f6f7f9;
}

#whmcs-wa-panel .wa-bubble{
  background: #e6f7e9;
  border: 1px solid #cdeed3;
  color: #1d1f23;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.35;
}

/* Action */
#whmcs-wa-panel .wa-actions{
  padding: 12px 14px 14px 14px;
  background: #fff;
  border-top: 1px solid #eef0f3;
}

#whmcs-wa-panel .wa-input{
  display:flex;
  gap: 10px;
  align-items: center;
}

#whmcs-wa-panel textarea{
  width: 100%;
  min-height: 42px;
  max-height: 120px;
  resize: vertical;
  border: 1px solid #dfe3e8;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
}

#whmcs-wa-panel textarea:focus{
  border-color: #25D366;
  box-shadow: 0 0 0 3px rgba(37,211,102,.18);
}

#whmcs-wa-panel .wa-send{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 0;
  background: #25D366;
  cursor: pointer;
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
}

#whmcs-wa-panel .wa-send:hover{ filter: brightness(0.97); }
#whmcs-wa-panel .wa-send svg{ width: 20px; height: 20px; fill:#fff; }

@media (max-width: 480px){
  #whmcs-wa-fab{ right: 14px; bottom: 14px; }
  #whmcs-wa-panel{ right: 14px; bottom: 82px; width: 92vw; }
}