/* ==========================================================================
   THE TRIP HOLIC — FLOATING ACTIONS
   Mobile Fixed Bottom Action Bar & Desktop Compact Floating Contact Dock
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Shared Pulse Animation for WhatsApp
   -------------------------------------------------------------------------- */
@keyframes fabPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(37, 211, 102, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.tth-fab-pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #25D366;
  animation: fabPulse 2s infinite ease-in-out;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   2. Desktop Compact Floating Contact Dock (>= 768px)
   -------------------------------------------------------------------------- */
.tth-desktop-fab-dock {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1040;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--tth-primary-border);
  border-radius: var(--tth-radius-pill);
  padding: 6px 8px;
  box-shadow: 0 10px 30px -4px rgba(23, 33, 33, 0.15), 0 2px 8px rgba(23, 33, 33, 0.06);
  gap: 6px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s ease,
              visibility 0.35s ease;
}

.tth-desktop-fab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: var(--tth-font-body);
  text-decoration: none;
  border-radius: var(--tth-radius-pill);
  transition: background-color var(--tth-transition-fast),
              color var(--tth-transition-fast),
              transform var(--tth-transition-fast),
              box-shadow var(--tth-transition-fast);
  white-space: nowrap;
}

.tth-desktop-fab-btn:focus-visible {
  outline: 2px solid var(--tth-primary);
  outline-offset: 2px;
}

/* Optional: Plan My Trip (Teal Subtle) */
.tth-desktop-fab-plan {
  color: var(--tth-dark);
  background-color: transparent;
}

.tth-desktop-fab-plan i {
  color: var(--tth-secondary);
  font-size: 1rem;
}

.tth-desktop-fab-plan:hover {
  background-color: var(--tth-bg-alt);
  color: var(--tth-primary-dark);
  transform: translateY(-1px);
}

/* Secondary: Call Button */
.tth-desktop-fab-call {
  color: var(--tth-primary);
  background-color: var(--tth-primary-subtle);
}

.tth-desktop-fab-call i {
  font-size: 0.95rem;
}

.tth-desktop-fab-call:hover {
  background-color: var(--tth-primary-border);
  color: var(--tth-primary-dark);
  transform: translateY(-1px);
}

/* Primary: WhatsApp Button */
.tth-desktop-fab-whatsapp {
  color: var(--tth-white);
  background-color: var(--tth-whatsapp);
  background-image: linear-gradient(135deg, var(--tth-whatsapp) 0%, var(--tth-whatsapp-dark) 100%);
  box-shadow: 0 4px 14px rgba(15, 117, 103, 0.38);
  font-weight: 700;
}

.tth-desktop-fab-whatsapp i {
  font-size: 1.05rem;
}

.tth-desktop-fab-whatsapp .tth-fab-pulse-dot {
  background-color: var(--tth-white);
}

.tth-desktop-fab-whatsapp:hover {
  background-image: linear-gradient(135deg, var(--tth-whatsapp-dark) 0%, #073f38 100%);
  color: var(--tth-white);
  box-shadow: 0 6px 18px rgba(15, 117, 103, 0.48);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   3. Mobile Fixed Bottom Action Bar (< 768px)
   -------------------------------------------------------------------------- */
.tth-mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1045;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(23, 33, 33, 0.08);
  box-shadow: 0 -4px 20px rgba(23, 33, 33, 0.08);
  padding-top: 0.5rem;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  align-items: center;
  justify-content: space-around;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s ease,
              visibility 0.3s ease;
}

.tth-mobile-bar-btn {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0.35rem 0.25rem;
  min-height: 48px;
  border-radius: var(--tth-radius-sm);
  color: var(--tth-body-color);
  font-family: var(--tth-font-body);
  transition: background-color var(--tth-transition-fast),
              color var(--tth-transition-fast),
              transform var(--tth-transition-fast);
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.tth-mobile-bar-btn:active {
  transform: scale(0.96);
  background-color: var(--tth-bg-alt);
}

.tth-mobile-bar-btn:focus-visible {
  outline: 2px solid var(--tth-primary);
  outline-offset: 1px;
}

.tth-mobile-bar-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.tth-mobile-bar-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.2;
}

/* Mobile Dividers */
.tth-mobile-bar-divider {
  width: 1px;
  height: 24px;
  background-color: rgba(23, 33, 33, 0.08);
  flex-shrink: 0;
}

/* Mobile Button Themes */
/* 1. Primary: WhatsApp */
.tth-mobile-bar-whatsapp {
  color: #0F7567;
}

.tth-mobile-bar-whatsapp .tth-mobile-bar-icon-wrap {
  color: #25D366;
}

.tth-mobile-bar-whatsapp .tth-fab-pulse-dot {
  position: absolute;
  top: -2px;
  right: -6px;
  width: 7px;
  height: 7px;
}

.tth-mobile-bar-whatsapp:hover,
.tth-mobile-bar-whatsapp:active {
  color: #075E54;
  background-color: rgba(37, 211, 102, 0.08);
}

/* 2. Secondary: Call */
.tth-mobile-bar-call {
  color: var(--tth-primary);
}

.tth-mobile-bar-call .tth-mobile-bar-icon-wrap {
  color: var(--tth-primary);
}

.tth-mobile-bar-call:hover,
.tth-mobile-bar-call:active {
  color: var(--tth-primary-dark);
  background-color: var(--tth-primary-subtle);
}

/* 3. Optional: Plan My Trip */
.tth-mobile-bar-plan {
  color: var(--tth-dark);
}

.tth-mobile-bar-plan .tth-mobile-bar-icon-wrap {
  color: var(--tth-secondary);
}

.tth-mobile-bar-plan:hover,
.tth-mobile-bar-plan:active {
  color: var(--tth-secondary-dark);
  background-color: var(--tth-secondary-subtle);
}

/* --------------------------------------------------------------------------
   4. Content Obstruction Prevention (Requirement: does not cover important content)
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* --------------------------------------------------------------------------
   5. Footer Collision Handling (Requirement: hide/adjust when footer is reached)
   -------------------------------------------------------------------------- */
.tth-fab-hidden {
  transform: translateY(115%) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (min-width: 768px) {
  .tth-fab-hidden {
    transform: translateY(20px) scale(0.95) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* Print Stylesheet Clean-up */
@media print {
  .tth-floating-actions-wrapper {
    display: none !important;
  }
}
