
/* ==========================================================
   VIJAY ENTERPRISES
   FLOATING QUICK ACTIONS

   Website:
   https://vijayenterprises1986.in/

   Dependencies:
   - sections/floating-actions.html
   - js/floating-actions.js
   - css/style.css

   Existing design preserved:
   - Fixed right-side vertical action buttons
   - Circular buttons
   - WhatsApp green
   - Call blue
   - Google Maps white
   - Back to Top navy
   - Desktop hover tooltips

   Improvements:
   - Responsive positioning
   - Touch-friendly buttons
   - Mobile safe-area support
   - Accessible keyboard focus
   - Reliable hidden Back to Top state
   - Reduced-motion support
   - Print visibility control
========================================================== */


/* ==========================================================
   01. FLOATING ACTIONS CONTAINER
========================================================== */

.ve-floating-actions {
  --float-navy: #112b48;
  --float-blue: #203f83;
  --float-gold: #e5c08b;
  --float-white: #ffffff;

  --float-whatsapp: #25d366;
  --float-shadow:
    0 5px 17px rgba(12, 34, 59, 0.18);

  position: fixed;

  right: 25px;
  bottom: 27px;

  z-index: 1100;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 12px;

  width: 54px;

  /*
    Only the action buttons are interactive.
    Empty space around them must not block
    the website underneath.
  */

  pointer-events: none;
}

.ve-floating-actions,
.ve-floating-actions *,
.ve-floating-actions *::before,
.ve-floating-actions *::after {
  box-sizing: border-box;
}


/* ==========================================================
   02. SHARED FLOATING BUTTON
========================================================== */

.ve-float-btn {
  position: relative;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 52px;

  width: 52px;
  height: 52px;

  margin: 0;
  padding: 0;

  border: 1px solid transparent;
  border-radius: 50%;

  font-family: "Inter", sans-serif;
  line-height: 1;

  text-align: center;
  text-decoration: none;

  cursor: pointer;

  pointer-events: auto;

  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;

  box-shadow: var(--float-shadow);

  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    background-color 220ms ease,
    border-color 220ms ease,
    opacity 220ms ease,
    visibility 220ms ease;
}


/* ==========================================================
   03. SHARED ICON STYLES

   Lucide replaces data-lucide elements
   with SVG icons during initialization.

   Direct SVG icons are also supported.
========================================================== */

.ve-float-btn > svg,
.ve-float-btn > i[data-lucide] {
  display: block;

  flex-shrink: 0;

  width: 25px;
  height: 25px;
}


/* ==========================================================
   04. DESKTOP HOVER EFFECT

   Avoid hover animations on touch screens.
========================================================== */

@media (hover: hover) and (pointer: fine) {

  .ve-float-btn:hover {
    transform: translateY(-3px);

    box-shadow:
      0 9px 24px rgba(12, 34, 59, 0.23);
  }

}


/* ==========================================================
   05. ACTIVE / PRESSED STATE
========================================================== */

.ve-float-btn:active {
  transform: scale(0.96);
}


/* ==========================================================
   06. WHATSAPP BUTTON
========================================================== */

.ve-float-whatsapp {
  color: #ffffff;
  background: var(--float-whatsapp);
}

.ve-float-whatsapp:visited {
  color: #ffffff;
}

.ve-float-whatsapp:hover {
  color: #ffffff;
  background: #1fbe58;
}

.ve-float-whatsapp:active {
  background: #1cab50;
}

.ve-float-whatsapp > svg {
  width: 25px;
  height: 25px;
}


/* ==========================================================
   07. DIRECT CALL BUTTON
========================================================== */

.ve-float-call {
  color: #ffffff;
  background: var(--float-blue);
}

.ve-float-call:visited {
  color: #ffffff;
}

.ve-float-call:hover {
  color: #ffffff;
  background: #18336f;
}

.ve-float-call:active {
  background: #142b5e;
}

.ve-float-call > svg,
.ve-float-call > i[data-lucide] {
  width: 22px;
  height: 22px;

  stroke-width: 1.9;
}


/* ==========================================================
   08. GOOGLE MAPS BUTTON
========================================================== */

.ve-float-maps {
  color: var(--float-navy);
  background: #ffffff;

  border-color: #e5eaf0;
}

.ve-float-maps:visited {
  color: var(--float-navy);
}

.ve-float-maps:hover {
  background: #f8fafc;
}

.ve-float-maps:active {
  background: #edf2f7;
}

.ve-float-maps > svg {
  width: 28px;
  height: 28px;
}


/* ==========================================================
   09. BACK TO TOP BUTTON

   Initially hidden.

   Existing JavaScript controls:
   - .is-visible
   - aria-hidden
   - tabindex

   Preserve the same class names.
========================================================== */

.ve-float-top {
  color: #ffffff;
  background: var(--float-navy);

  opacity: 0;
  visibility: hidden;

  transform: translateY(10px);

  pointer-events: none;
}

.ve-float-top.is-visible {
  opacity: 1;
  visibility: visible;

  transform: translateY(0);

  pointer-events: auto;
}

.ve-float-top:hover {
  color: #ffffff;
  background: var(--float-blue);
}

.ve-float-top:active {
  background: #172f55;
}

.ve-float-top > svg,
.ve-float-top > i[data-lucide] {
  width: 22px;
  height: 22px;

  stroke-width: 2;
}


/* ==========================================================
   10. TOOLTIP BASE

   Tooltip is purely visual.

   Button meaning remains available through
   aria-label and title attributes.
========================================================== */

.ve-float-tooltip {
  position: absolute;

  top: 50%;
  right: calc(100% + 13px);

  z-index: 1;

  display: block;

  width: max-content;
  max-width: 200px;

  padding: 7px 11px;

  color: #ffffff;
  background: var(--float-navy);

  border-radius: 5px;

  font-family: "Inter", sans-serif;

  font-size: 11px;
  font-weight: 600;

  line-height: 1.5;

  text-align: center;
  white-space: nowrap;

  opacity: 0;
  visibility: hidden;

  transform: translate(5px, -50%);

  pointer-events: none;

  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.12);

  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 180ms ease;
}


/* ==========================================================
   11. DESKTOP TOOLTIP ON HOVER

   Only activate hover tooltips on devices
   with a precise pointer.
========================================================== */

@media (hover: hover) and (pointer: fine) {

  .ve-float-btn:hover
  .ve-float-tooltip {
    opacity: 1;
    visibility: visible;

    transform: translate(0, -50%);
  }

}


/* ==========================================================
   12. KEYBOARD ACCESSIBILITY
========================================================== */

.ve-float-btn:focus-visible {
  outline:
    3px solid var(--float-gold);

  outline-offset: 4px;

  box-shadow:
    0 0 0 2px rgba(17, 43, 72, 0.7),
    var(--float-shadow);
}


/* ==========================================================
   13. TOOLTIP ON KEYBOARD FOCUS
========================================================== */

.ve-float-btn:focus-visible
.ve-float-tooltip {
  opacity: 1;
  visibility: visible;

  transform: translate(0, -50%);
}


/* ==========================================================
   14. TABLET
   BELOW 992px
========================================================== */

@media (max-width: 991.98px) {

  .ve-floating-actions {
    right: 18px;
    bottom: 22px;

    gap: 10px;

    width: 50px;
  }

  .ve-float-btn {
    flex-basis: 48px;

    width: 48px;
    height: 48px;
  }

  .ve-float-btn > svg,
  .ve-float-btn > i[data-lucide] {
    width: 23px;
    height: 23px;
  }

  .ve-float-maps > svg {
    width: 26px;
    height: 26px;
  }

}


/* ==========================================================
   15. MOBILE
   BELOW 576px
========================================================== */

@media (max-width: 575.98px) {

  .ve-floating-actions {
    right: 13px;

    /*
      Safe-area padding protects against
      gesture navigation areas and home
      indicators on supported devices.
    */

    bottom:
      calc(17px + env(safe-area-inset-bottom, 0px));

    gap: 9px;

    width: 46px;
  }

  .ve-float-btn {
    flex-basis: 44px;

    width: 44px;
    height: 44px;

    box-shadow:
      0 4px 13px rgba(12, 34, 59, 0.19);
  }

  .ve-float-btn > svg,
  .ve-float-btn > i[data-lucide] {
    width: 22px;
    height: 22px;
  }

  .ve-float-maps > svg {
    width: 24px;
    height: 24px;
  }

  /*
    Mobile screens have limited space.

    Keep icons visible and descriptive
    aria-labels active, but do not render
    floating text tooltips.
  */

  .ve-float-tooltip {
    display: none;
  }

}


/* ==========================================================
   16. SMALL MOBILE
   BELOW 381px
========================================================== */

@media (max-width: 380px) {

  .ve-floating-actions {
    right: 10px;

    bottom:
      calc(14px + env(safe-area-inset-bottom, 0px));

    gap: 8px;
  }

  .ve-float-btn {
    flex-basis: 44px;

    width: 44px;
    height: 44px;
  }

}


/* ==========================================================
   17. SHORT MOBILE VIEWPORTS

   Slightly reduce vertical gaps so the
   control group occupies less screen height.
========================================================== */

@media (max-height: 600px) and (max-width: 575.98px) {

  .ve-floating-actions {
    gap: 6px;
  }

}


/* ==========================================================
   18. LANDSCAPE MOBILE

   Keep the action controls accessible
   while reducing occupied vertical space.
========================================================== */

@media (
  max-height: 450px
) and (
  max-width: 991.98px
) {

  .ve-floating-actions {
    right: 10px;
    bottom: 10px;

    gap: 5px;
  }

  .ve-float-btn {
    flex-basis: 44px;

    width: 44px;
    height: 44px;
  }

}


/* ==========================================================
   19. REDUCED MOTION
========================================================== */

@media (prefers-reduced-motion: reduce) {

  .ve-float-btn,
  .ve-float-tooltip {
    animation: none !important;
    transition: none !important;
  }

  .ve-float-btn:active,
  .ve-float-btn:hover {
    transform: none;
  }

  .ve-float-top {
    transform: none;
  }

  .ve-float-top.is-visible {
    transform: none;
  }

}


/* ==========================================================
   20. PRINT SUPPORT

   Floating actions are interactive
   controls and should not appear on
   a printed website.
========================================================== */

@media print {

  .ve-floating-actions {
    display: none !important;
  }

}


/* ==========================================================
   END OF FLOATING ACTIONS STYLESHEET
========================================================== */
