/* ==========================================================================
   Johnflies Fly Factory - premium WhatsApp contact button
   Restyles the floating button rendered by
   modules/whatsapp/views/templates/front/footer.tpl
   Presentation only: link target, status logic and pulse timing are unchanged.
   ========================================================================== */

.asagiSabit {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999;
}

/* ---------- the disc ---------- */
.whatsappBlock a {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  outline: none;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(155deg, #3ce877 0%, #25d366 44%, #10b981 100%);
  box-shadow:
    0 12px 26px rgba(16, 132, 108, .36),
    0 4px 10px rgba(16, 24, 40, .16),
    inset 0 1px 0 rgba(255, 255, 255, .45);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: transform .25s cubic-bezier(.2, .7, .3, 1), box-shadow .25s ease;
}
.whatsappBlock a:hover,
.whatsappBlock a:focus {
  transform: translateY(-3px) scale(1.05);
  box-shadow:
    0 18px 34px rgba(16, 132, 108, .44),
    0 6px 14px rgba(16, 24, 40, .2),
    inset 0 1px 0 rgba(255, 255, 255, .5);
}
.whatsappBlock a:focus-visible {
  box-shadow:
    0 12px 26px rgba(16, 132, 108, .36),
    0 0 0 3px #ffffff,
    0 0 0 6px rgba(16, 185, 129, .8);
}

/* ---------- glyph ---------- */
.whatsappBlock .fa-whatsapp {
  position: relative;
  z-index: 3;
  display: block;
  box-sizing: border-box;
  width: 64px;
  height: 64px;
  font-family: FontAwesome;
  font-size: 30px;
  line-height: 64px;
  font-weight: normal;
  font-style: normal;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(4, 74, 45, .35);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* fallback for any page still holding the old <img> markup */
.whatsappBlock a img {
  position: relative;
  z-index: 8;
  display: block;
  box-sizing: border-box;
  width: 64px;
  height: 64px;
  border: 3px solid rgba(255, 255, 255, .92);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(16, 132, 108, .35);
}

/* ---------- pulse rings ---------- */
.whatsappBlock .kutucuklar {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: 64px;
  height: 64px;
  pointer-events: none;
}
.whatsappBlock .kutucuk {
  position: absolute;
  left: 0;
  top: 0;
  box-sizing: border-box;
  width: 64px;
  height: 64px;
  border: 2px solid rgba(37, 211, 102, .65);
  border-radius: 50%;
  background: transparent;
  opacity: 0;
  transform: scale(1);
  -webkit-transform: scale(1);
}
.whatsappBlock .animated .k1 {
  -webkit-animation: 2000ms kutucukPulse cubic-bezier(.25, .46, .45, .94) both;
  animation: 2000ms kutucukPulse cubic-bezier(.25, .46, .45, .94) both;
}
.whatsappBlock .animated .k2 {
  -webkit-animation: 2500ms kutucukPulse cubic-bezier(.25, .46, .45, .94) both;
  animation: 2500ms kutucukPulse cubic-bezier(.25, .46, .45, .94) both;
}
.whatsappBlock .animated .k3 {
  -webkit-animation: 3000ms kutucukPulse cubic-bezier(.25, .46, .45, .94) both;
  animation: 3000ms kutucukPulse cubic-bezier(.25, .46, .45, .94) both;
}
@-webkit-keyframes kutucukPulse {
  0%   { opacity: .9; -webkit-transform: scale(1);    transform: scale(1); }
  55%  { opacity: .4; }
  100% { opacity: 0;  -webkit-transform: scale(2.2);  transform: scale(2.2); }
}
@keyframes kutucukPulse {
  0%   { opacity: .9; transform: scale(1); }
  55%  { opacity: .4; }
  100% { opacity: 0;  transform: scale(2.2); }
}

/* ---------- status dot ---------- */
.whatsappBlock a::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  z-index: 4;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #1ab744;
  box-shadow: 0 2px 6px rgba(16, 24, 40, .3);
}
.whatsappBlock a.online::after  { background: #1ab744; }
.whatsappBlock a.offline::after { background: #b8bcc2; }
.whatsappBlock a.busy::after    { background: #f5a524; }

.whatsappBlock a.offline .kutucuk { border-color: rgba(184, 188, 194, .75); }
.whatsappBlock a.busy    .kutucuk { border-color: rgba(245, 165, 36, .75); }

/* ---------- tooltip ---------- */
.whatsappBlock .message {
  position: absolute;
  right: 78px;
  top: 50%;
  box-sizing: border-box;
  width: max-content;
  max-width: 250px;
  padding: 11px 16px;
  border-radius: 10px;
  background: #1b1e24;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: .01em;
  text-align: left;
  white-space: normal;
  box-shadow: 0 14px 30px rgba(16, 24, 40, .3);
  opacity: 0;
  visibility: hidden;
  transform: translate(16px, -50%);
  -webkit-transform: translate(16px, -50%);
  transition: opacity .2s ease, transform .3s cubic-bezier(.2, .7, .3, 1), visibility .2s;
}
.whatsappBlock .message::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  box-sizing: border-box;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: #1b1e24;
  transform: translateY(-50%) rotate(45deg);
  -webkit-transform: translateY(-50%) rotate(45deg);
}
.asagiSabit:hover .message,
.whatsappBlock a:focus .message {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
  -webkit-transform: translate(0, -50%);
}

/* ---------- small screens ---------- */
@media (max-width: 600px) {
  .asagiSabit { right: 16px; bottom: 16px; }
  .whatsappBlock a,
  .whatsappBlock .fa-whatsapp,
  .whatsappBlock a img,
  .whatsappBlock .kutucuklar,
  .whatsappBlock .kutucuk {
    width: 56px;
    height: 56px;
  }
  .whatsappBlock .fa-whatsapp { font-size: 26px; line-height: 56px; }
  .whatsappBlock .message { right: 68px; max-width: 58vw; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .whatsappBlock a { transition: none; }
  .whatsappBlock a:hover,
  .whatsappBlock a:focus { transform: none; }
  .whatsappBlock .animated .k1,
  .whatsappBlock .animated .k2,
  .whatsappBlock .animated .k3 {
    -webkit-animation: none;
    animation: none;
  }
  .whatsappBlock .message { transition: none; }
}
