/* ===================================================================
   TAIBJEE & BHALLA ADVOCATES LLP - FLOATING CONTACT COMPONENT
   Modern floating contact button with dropdown panel
   ================================================================= */

/* ===================================================================
   FLOATING CONTACT BUTTON SYSTEM
   ================================================================= */

.floating-contact {
  position: fixed !important;
  left: 24px;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 9999;
  font-family: var(--font-heading, 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif);
  will-change: auto;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Main Contact Button */
.floating-contact-btn {
  width: 60px;
  height: 60px;
  background: #4E102F; /* Solid burgundy color */
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  box-shadow: 0 8px 32px rgba(78, 16, 47, 0.4), 0 0 0 0 rgba(78, 16, 47, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.floating-contact-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1); /* Subtle white overlay on hover */
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.floating-contact-btn:hover::before {
  opacity: 1;
}

.floating-contact-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(78, 16, 47, 0.5), 0 0 0 8px rgba(78, 16, 47, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.floating-contact-btn:active {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(78, 16, 47, 0.4);
}

/* Contact Icon */
.floating-contact-icon {
  width: 24px;
  height: 24px;
  color: white;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  position: relative;
}

.floating-contact-btn:hover .floating-contact-icon {
  transform: scale(1.1);
}

.floating-contact-btn.active .floating-contact-icon {
  transform: rotate(45deg);
}

/* Pulse Animation */
.floating-contact-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid var(--primary, #4E102F);
  border-radius: 50%;
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  opacity: 0;
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.4;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* ===================================================================
   CONTACT DROPDOWN PANEL
   ================================================================= */

.floating-contact-panel {
  position: absolute;
  top: 50%;
  left: 80px;
  transform: translateY(-50%);
  width: 280px;
  background: #4E102F;
  border: 2px solid #6b1d42;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) translateX(-20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.floating-contact-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0) scale(1);
}

/* Panel Header */
.floating-contact-header {
  background: white;
  color: #4E102F;
  padding: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.floating-contact-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(78, 16, 47, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.floating-contact-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  position: relative;
  z-index: 1;
}

.floating-contact-subtitle {
  font-size: 12px;
  color: rgba(78, 16, 47, 0.7);
  margin: 4px 0 0 0;
  position: relative;
  z-index: 1;
}

/* Panel Content */
.floating-contact-content {
  padding: 16px;
}

.floating-contact-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  text-decoration: none;
  color: white;
  border-radius: 8px;
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
}

.floating-contact-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.floating-contact-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.floating-contact-item-icon {
  width: 36px;
  height: 36px;
  background: #6b1d42;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.floating-contact-item:hover .floating-contact-item-icon {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(78, 16, 47, 0.3);
}

.floating-contact-item-icon svg {
  width: 18px;
  height: 18px;
  color: white;
}

.floating-contact-item-content {
  flex: 1;
  min-width: 0;
}

.floating-contact-item-label {
  font-size: 13px;
  font-weight: 600;
  color: #E8E8E8;
  margin: 0 0 2px 0;
}

.floating-contact-item-value {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  line-height: 1.4;
  word-break: break-word;
}

/* Office Hours Styling */
.floating-contact-hours {
  cursor: default;
  background: rgba(255, 255, 255, 0.05);
}

.floating-contact-hours:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: none;
}

.floating-contact-hours .floating-contact-item-icon {
  background: #D4AF37;
}

.floating-contact-hours .floating-contact-item-label {
  color: #D4AF37;
}

/* Social Icons Row */
.floating-contact-social {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.floating-contact-social-item {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 14px;
}

.floating-contact-social-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  color: white;
}

.floating-contact-social-item svg {
  width: 16px;
  height: 16px;
  color: white;
  transition: color 0.3s ease;
}

.floating-contact-social-item:hover svg {
  color: white;
}

/* ===================================================================
   RESPONSIVE DESIGN
   ================================================================= */

/* Tablet */
@media (max-width: 768px) {
  .floating-contact {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    position: fixed !important;
  }
  
  .floating-contact-btn {
    width: 56px;
    height: 56px;
  }
  
  .floating-contact-icon {
    width: 22px;
    height: 22px;
  }
  
  .floating-contact-panel {
    width: 260px;
    left: 76px;
    top: 50%;
    transform: translateY(-50%) translateX(-20px) scale(0.95);
  }
  
  .floating-contact-panel.active {
    transform: translateY(-50%) translateX(0) scale(1);
  }
}

/* Mobile */
@media (max-width: 480px) {
  .floating-contact {
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    position: fixed !important;
  }
  
  .floating-contact-btn {
    width: 52px;
    height: 52px;
  }
  
  .floating-contact-icon {
    width: 20px;
    height: 20px;
  }
  
  .floating-contact-panel {
    width: 240px;
    left: 72px;
    top: 50%;
    transform: translateY(-50%) translateX(-20px) scale(0.95);
  }
  
  .floating-contact-panel.active {
    transform: translateY(-50%) translateX(0) scale(1);
  }
  
  .floating-contact-content {
    padding: 14px;
  }
  
  .floating-contact-item-icon {
    width: 36px;
    height: 36px;
    margin-right: 12px;
  }
  
  .floating-contact-item-icon svg {
    width: 16px;
    height: 16px;
  }
}

/* ===================================================================
   ACCESSIBILITY ENHANCEMENTS
   ================================================================= */

.floating-contact-btn:focus {
  outline: none;
  box-shadow: 0 8px 32px rgba(78, 16, 47, 0.3), 0 0 0 3px rgba(78, 16, 47, 0.3);
}

.floating-contact-item:focus {
  outline: none;
  background: rgba(78, 16, 47, 0.1);
  box-shadow: 0 0 0 2px rgba(78, 16, 47, 0.3);
}

.floating-contact-social-item:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(78, 16, 47, 0.3);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .floating-contact-btn,
  .floating-contact-panel,
  .floating-contact-item,
  .floating-contact-item-icon,
  .floating-contact-social-item {
    transition: none;
  }
  
  .floating-contact-btn::after {
    animation: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .floating-contact-btn {
    border: 2px solid;
  }
  
  .floating-contact-panel {
    border: 2px solid;
    background: white;
  }
  
  .floating-contact-item {
    border-bottom: 2px solid;
  }
}
