/*
Theme Name: AMA Legal
Theme URI: https://wordpress.org/themes/amalegal/
Author: the WordPress team
Author URI: https://wordpress.org/
Description: The 2013 theme for WordPress takes us back to the blog, featuring a full range of post formats, each displayed beautifully in their own unique way. Design details abound, starting with a vibrant color scheme and matching header images, beautiful typography and icons, and a flexible layout that looks great on any device, big or small.
Version: 4.6
Tested up to: 7.0
Requires at least: 3.6
Requires PHP: 5.2.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, one-column, two-columns, right-sidebar, custom-header, custom-menu, editor-style, featured-images, footer-widgets, microformats, post-formats, rtl-language-support, sticky-post, translation-ready, accessibility-ready, block-patterns
Text Domain: amalegal

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/

/* ==========================================================================
   Floating WhatsApp Button
   ========================================================================== */

.whatsapp-float-btn {
  position: fixed;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  right: calc(28px + env(safe-area-inset-right, 0px));
  z-index: 1040;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 50px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transform: translateZ(0);
  will-change: transform;
}

.whatsapp-float-btn:focus-visible {
  outline: 3px solid var(--brand-gold, #e5c77e);
  outline-offset: 4px;
}

/* Tooltip - Desktop / Mac Fine Pointer */
.whatsapp-float-tooltip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: rgba(26, 26, 26, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid rgba(229, 199, 126, 0.3);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.whatsapp-float-tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -5px;
  transform: translateY(-50%);
  border-width: 5px 0 5px 5px;
  border-style: solid;
  border-color: transparent transparent transparent rgba(26, 26, 26, 0.94);
}

/* Button Circle Container */
.whatsapp-float-icon-wrapper {
  position: relative;
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.42), 0 4px 10px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  transform: translateZ(0);
}

/* WhatsApp Vector SVG */
.whatsapp-float-svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
  shape-rendering: geometricPrecision;
}

/* Gentle Radar / Pulse Ring */
.whatsapp-float-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.45);
  z-index: 1;
  animation: whatsapp-pulse 2.4s infinite cubic-bezier(0.25, 0, 0.2, 1);
  pointer-events: none;
}

@keyframes whatsapp-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.38);
    opacity: 0;
  }
  100% {
    transform: scale(1.38);
    opacity: 0;
  }
}

/* ==========================================================================
   Desktop & Mac (Fine Pointer & Hover Interactions)
   Prevents sticky hover on touchscreens (iPhone/Android)
   ========================================================================== */
@media (hover: hover) and (pointer: fine) {
  .whatsapp-float-btn:hover .whatsapp-float-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
  }

  .whatsapp-float-btn:hover .whatsapp-float-icon-wrapper {
    transform: translateY(-3px) scale(1.07);
    box-shadow: 0 14px 32px rgba(37, 211, 102, 0.55), 0 6px 14px rgba(0, 0, 0, 0.22);
  }

  .whatsapp-float-btn:hover .whatsapp-float-svg {
    transform: scale(1.06);
  }
}

/* ==========================================================================
   Touch Devices (iPhone, iPad, Android Phones & Tablets)
   Immediate tactile active feedback without sticky hover
   ========================================================================== */
@media (hover: none) or (pointer: coarse) {
  .whatsapp-float-tooltip {
    display: none !important;
  }

  .whatsapp-float-btn:active .whatsapp-float-icon-wrapper {
    transform: scale(0.92);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
  }
}

/* ==========================================================================
   Screen Size Breakpoints
   ========================================================================== */

/* Ultra-Wide / 4K / Large Mac Desktop (> 1440px) */
@media (min-width: 1440px) {
  .whatsapp-float-btn {
    bottom: calc(32px + env(safe-area-inset-bottom, 0px));
    right: calc(32px + env(safe-area-inset-right, 0px));
  }

  .whatsapp-float-icon-wrapper {
    width: 62px;
    height: 62px;
  }

  .whatsapp-float-svg {
    width: 32px;
    height: 32px;
  }

  .whatsapp-float-tooltip {
    font-size: 0.9rem;
    padding: 9px 16px;
    right: calc(100% + 16px);
  }
}

/* Medium Tablets & Large Phones (768px - 991px) */
@media (max-width: 991px) {
  .whatsapp-float-btn {
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    right: calc(24px + env(safe-area-inset-right, 0px));
  }

  .whatsapp-float-icon-wrapper {
    width: 54px;
    height: 54px;
  }

  .whatsapp-float-svg {
    width: 28px;
    height: 28px;
  }
}

/* Standard Mobile (iPhone & Android: 376px - 767px) */
@media (max-width: 767px) {
  .whatsapp-float-btn {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    right: calc(20px + env(safe-area-inset-right, 0px));
  }

  .whatsapp-float-icon-wrapper {
    width: 50px;
    height: 50px;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4), 0 3px 8px rgba(0, 0, 0, 0.16);
  }

  .whatsapp-float-svg {
    width: 26px;
    height: 26px;
  }
}

/* Small Screens (iPhone SE, Galaxy S-small, foldables: <= 375px) */
@media (max-width: 375px) {
  .whatsapp-float-btn {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: calc(16px + env(safe-area-inset-right, 0px));
  }

  .whatsapp-float-icon-wrapper {
    width: 46px;
    height: 46px;
  }

  .whatsapp-float-svg {
    width: 24px;
    height: 24px;
  }
}

/* Mobile Landscape Mode (iPhone & Android rotated horizontally) */
@media (max-height: 500px) and (orientation: landscape) {
  .whatsapp-float-btn {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    right: calc(16px + env(safe-area-inset-right, 0px));
  }

  .whatsapp-float-icon-wrapper {
    width: 44px;
    height: 44px;
  }

  .whatsapp-float-svg {
    width: 23px;
    height: 23px;
  }

  .whatsapp-float-tooltip {
    display: none !important;
  }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .whatsapp-float-pulse {
    animation: none;
    display: none;
  }
  .whatsapp-float-btn,
  .whatsapp-float-icon-wrapper,
  .whatsapp-float-tooltip,
  .whatsapp-float-svg {
    transition: none;
  }
}

/* Clean Print Output */
@media print {
  .whatsapp-float-btn {
    display: none !important;
  }
}

