/* === Floating Buttons Container === */
.floating-buttons-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1050;
  display: flex;
  flex-direction: column; /* Book Now at bottom, Message above */
  align-items: flex-end;
  gap: 15px; /* Space between the two buttons */
  font-family: inherit;
}

/* === Book Now FAB === */
.book-now-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #d0802d; /* Green color for Book Now */
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.3s ease;
  text-decoration: none;
  position: relative;
}

.book-now-fab:hover,
.book-now-fab:focus-visible {
  background-color: #b56c1f;
  transform: scale(1.05);
  text-decoration: none;
  color: #fff;
}

/* Book Now tooltip */
.book-now-fab::after {
  content: "Book Now";
  position: absolute;
  right: 65px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.2s ease;
  pointer-events: none;
}

.book-now-fab:hover::after,
.book-now-fab:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}

/* === Floating Message FAB (Updated Positioning) === */
.floating-message-fab {
  position: relative; /* Changed from fixed to relative */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Main + Option buttons shared style */
.floating-message-fab .fab-main,
.floating-message-fab .fab-option {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.3s ease;
  background-clip: padding-box;
}

/* Main FAB */
.floating-message-fab .fab-main {
  background-color: #d0802d;
}
.floating-message-fab .fab-main:hover,
.floating-message-fab .fab-main:focus-visible {
  background-color: #b56c1f;
  transform: scale(1.05);
}

/* Tooltip for Message Button */
.floating-message-fab .fab-main::after {
  content: "Contact Us";
  position: absolute;
  right: 65px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.2s ease;
  pointer-events: none;
}

.floating-message-fab .fab-main:hover::after,
.floating-message-fab .fab-main:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}

/* Options container */
.floating-message-fab .fab-options {
  display: flex;
  flex-direction: column-reverse; /* first option nearest main button */
  align-items: center;
  position: absolute;
  bottom: 70px; /* options appear ABOVE main button */
  right: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none; /* prevents accidental click when hidden */
}

/* Expanded state */
.floating-message-fab.active .fab-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Option buttons */
.floating-message-fab .fab-option {
  margin-bottom: 10px;
  background-color: #4a7d3a;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.25s ease;
}
.floating-message-fab .fab-option:hover,
.floating-message-fab .fab-option:focus-visible {
  background-color: #3a6b2a;
  transform: translateY(-2px) scale(1.05);
}

/* Active animation (staggered pop) */
.floating-message-fab.active .fab-option {
  opacity: 1;
  transform: translateY(0);
}
.floating-message-fab.active .fab-option:nth-child(1) {
  transition-delay: 0.05s;
}
.floating-message-fab.active .fab-option:nth-child(2) {
  transition-delay: 0.1s;
}
.floating-message-fab.active .fab-option:nth-child(3) {
  transition-delay: 0.15s;
}

/* Tooltip-like labels for clarity (optional) */
.floating-message-fab .fab-option::after {
  content: attr(data-label);
  position: absolute;
  right: 65px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.2s ease;
  pointer-events: none;
}
.floating-message-fab .fab-option:hover::after,
.floating-message-fab .fab-option:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}

/* === Accessibility === */
.floating-message-fab .fab-main:focus-visible,
.floating-message-fab .fab-option:focus-visible,
.book-now-fab:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
}

/* === Mobile adjustments === */
@media (max-width: 768px) {
  .floating-buttons-container {
    bottom: 20px;
    right: 20px;
    gap: 12px;
  }

  .book-now-fab {
    width: 50px;
    height: 50px;
  }

  .book-now-fab::after {
    right: 60px;
    font-size: 11px;
    padding: 3px 6px;
  }

  .floating-message-fab .fab-main,
  .floating-message-fab .fab-option {
    width: 50px;
    height: 50px;
  }

  .floating-message-fab .fab-options {
    bottom: 60px;
  }

  .floating-message-fab .fab-option::after {
    right: 60px;
    font-size: 11px;
    padding: 3px 6px;
  }
}

/* === Reduced Motion Preference === */
@media (prefers-reduced-motion: reduce) {
  .floating-buttons-container *,
  .floating-message-fab *,
  .floating-message-fab .fab-option,
  .floating-message-fab .fab-options,
  .book-now-fab {
    transition: none !important;
    transform: none !important;
  }

  .book-now-fab::after {
    transition: none !important;
  }
}

/* === Modal Overlay (FIXED & OPTIMIZED) === */
.fab-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
  box-sizing: border-box;
}

.fab-modal.show {
  display: flex;
  opacity: 1;
}

/* Modal Content - Centered Layout */
.fab-modal-content {
  background: #fff;
  padding: 2.5rem 2rem 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 420px;
  width: 100%;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-sizing: border-box;
}

.fab-modal.show .fab-modal-content {
  transform: scale(1);
}

/* Modal Close Button */
.fab-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f5f5f5;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  color: #666;
  font-size: 1.3rem;
  line-height: 1;
  z-index: 10;
  font-family: inherit;
}

.fab-modal-close:hover {
  background: #d0802d;
  color: #fff;
  transform: rotate(90deg);
}

/* Modal Header - PROPERLY CENTERED */
.fab-modal-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f0f0;
  text-align: center;
  position: relative;
  width: 100%;
}

.fab-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin: 0;
  line-height: 1.3;
  text-align: center;
  width: 100%;
  display: block;
}

.fab-modal-subtitle {
  font-size: 0.95rem;
  color: #666;
  margin: 0.5rem 0 0 0;
  font-weight: 400;
  text-align: center;
  width: 100%;
  display: block;
}

/* Modal Body */
.fab-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  width: 100%;
}

.fab-modal-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fab-modal-qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.fab-modal-qr {
  width: 100%;
  max-width: 220px;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 12px;
  padding: 1rem;
  background: #f9f9f9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #eee;
}

.fab-modal-text {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  max-width: 320px;
  text-align: center;
}

/* Theme Colors Applied */
.fab-modal-content {
  background: #ffffff;
  color: #333333;
}

.fab-modal-title {
  color: #d0802d; /* Using your FAB color */
}

.fab-modal-subtitle {
  color: #666666;
}

.fab-modal-text {
  color: #555555;
}

/* Mobile scaling */
@media (max-width: 768px) {
  .fab-modal {
    padding: 15px;
  }

  .fab-modal-content {
    padding: 2rem 1.5rem 1.5rem;
    border-radius: 12px;
    max-width: 380px;
  }

  .fab-modal-close {
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
  }

  .fab-modal-title {
    font-size: 1.25rem;
  }

  .fab-modal-subtitle {
    font-size: 0.9rem;
  }

  .fab-modal-qr {
    max-width: 180px;
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  .fab-modal-content {
    padding: 1.75rem 1.25rem 1.25rem;
    max-width: 320px;
  }

  .fab-modal-close {
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    font-size: 1.1rem;
  }

  .fab-modal-title {
    font-size: 1.15rem;
  }

  .fab-modal-subtitle {
    font-size: 0.85rem;
  }

  .fab-modal-text {
    font-size: 0.85rem;
  }
}
