/* ===================================
   Contact Widget Styles
   =================================== */

/* Widget Container */
.contact-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9998;
  font-family: 'Inter Tight', sans-serif;
}

/* Main Bubble Button */
.contact-bubble {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #40C6C3 0%, #33a3a0 100%);
  box-shadow: 0 8px 24px rgba(64, 198, 195, 0.4), 0 0 0 0 rgba(64, 198, 195, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
  position: relative;
}

.contact-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(64, 198, 195, 0.5);
}

.contact-bubble.active {
  transform: rotate(45deg);
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  animation: none;
}

.contact-bubble svg {
  width: 32px;
  height: 32px;
  color: white;
  transition: transform 0.3s ease;
}

.contact-bubble.active svg {
  transform: rotate(-45deg);
}

/* Pulse Animation */
@keyframes pulse-ring {
  0% {
    box-shadow: 0 8px 24px rgba(64, 198, 195, 0.4), 0 0 0 0 rgba(64, 198, 195, 0.7);
  }
  50% {
    box-shadow: 0 8px 24px rgba(64, 198, 195, 0.4), 0 0 0 20px rgba(64, 198, 195, 0);
  }
  100% {
    box-shadow: 0 8px 24px rgba(64, 198, 195, 0.4), 0 0 0 0 rgba(64, 198, 195, 0);
  }
}

/* Notification Badge */
.contact-bubble-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 24px;
  height: 24px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 3px solid white;
  animation: bounce 1s ease infinite;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s ease;
}

.contact-bubble-badge.show {
  opacity: 1;
  transform: scale(1);
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Notification Tooltip */
.contact-notification {
  position: absolute;
  bottom: 80px;
  right: 0;
  background: white;
  padding: 14px 20px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  max-width: 280px;
  z-index: 9999;
}

.contact-notification.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.contact-notification::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 20px;
  width: 16px;
  height: 16px;
  background: white;
  transform: rotate(45deg);
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-notification-text {
  font-size: 12px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  position: relative;
  z-index: 1;
}

.contact-notification-close svg {
  width: 14px;
  height: 14px;
  color: #6b7280;
}

/* Second Phone Notification - More Prominent */
.contact-notification-phone {
  bottom: 90px;
  background: linear-gradient(135deg, #40C6C3 0%, #33a3a0 100%);
  padding: 18px 24px;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(64, 198, 195, 0.5), 0 0 0 0 rgba(64, 198, 195, 0.7);
  max-width: 320px;
  animation: shake-notification 0.5s ease-in-out 0.5s;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.contact-notification-phone.show {
  animation: shake-notification 0.5s ease-in-out 0.5s, pulse-glow 2s ease-in-out 1s infinite;
}

.contact-notification-phone:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 48px rgba(64, 198, 195, 0.6);
}

.contact-notification-phone::after {
  background: linear-gradient(135deg, #40C6C3 0%, #33a3a0 100%);
  box-shadow: 2px 2px 8px rgba(64, 198, 195, 0.3);
}

.contact-notification-phone-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-notification-phone-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: phone-ring 1s ease-in-out infinite;
}

.contact-notification-phone-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.contact-notification-phone-text {
  flex: 1;
  color: white;
}

.contact-notification-phone-title {
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 4px 0;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-notification-phone-number {
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 2px 0;
  color: white;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-notification-phone-subtitle {
  font-size: 10px;
  font-weight: 500;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.contact-notification-phone .contact-notification-close {
  top: 12px;
  right: 12px;
  opacity: 0.8;
}

.contact-notification-phone .contact-notification-close:hover {
  opacity: 1;
}

.contact-notification-phone .contact-notification-close svg {
  color: white;
  width: 16px;
  height: 16px;
}

/* Badge urgent pulse */
.contact-bubble-badge.pulse-urgent {
  animation: pulse-urgent 1s ease-in-out infinite;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  font-size: 14px;
}

@keyframes pulse-urgent {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
}

@keyframes shake-notification {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 12px 40px rgba(64, 198, 195, 0.5), 0 0 0 0 rgba(64, 198, 195, 0.7);
  }
  50% {
    box-shadow: 0 12px 40px rgba(64, 198, 195, 0.5), 0 0 0 15px rgba(64, 198, 195, 0);
  }
}

@keyframes phone-ring {
  0%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(-15deg); }
  20%, 40% { transform: rotate(15deg); }
  50% { transform: rotate(0deg); }
}

.contact-notification-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.contact-notification-close:hover {
  opacity: 1;
}

.contact-notification-close svg {
  width: 12px;
  height: 12px;
  color: #6b7280;
}

/* Options Menu */
.contact-options {
  position: absolute;
  bottom: 85px;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform: scale(0.8) translateY(20px);
}

.contact-options.active {
  opacity: 1;
  pointer-events: all;
  transform: scale(1) translateY(0);
}

/* Individual Option Button */
.contact-option {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  padding: 14px 20px;
  border-radius: 50px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  min-width: 200px;
  animation: slideIn 0.3s ease forwards;
  opacity: 0;
}

.contact-option:nth-child(1) { animation-delay: 0.05s; }
.contact-option:nth-child(2) { animation-delay: 0.1s; }
.contact-option:nth-child(3) { animation-delay: 0.15s; }
.contact-option:nth-child(4) { animation-delay: 0.2s; }
.contact-option:nth-child(5) { animation-delay: 0.25s; }

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.contact-option:hover {
  transform: translateX(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.contact-option-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-option-icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

/* Icon Colors */
.icon-phone {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.icon-email {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.icon-ai {
  background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
}

.icon-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.icon-calendar {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.contact-option-text {
  flex: 1;
}

.contact-option-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  line-height: 1.2;
}

.contact-option-subtitle {
  font-size: 12px;
  color: #6b7280;
  margin: 2px 0 0 0;
  line-height: 1.2;
}

/* Email Form Modal */
.contact-form-modal {
  position: fixed;
  bottom: 120px;
  right: 30px;
  width: 380px;
  max-width: calc(100vw - 60px);
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 9997;
  overflow: hidden;
}

.contact-form-modal.active {
  opacity: 1;
  pointer-events: all;
  transform: scale(1) translateY(0);
}

.contact-form-header {
  background: linear-gradient(135deg, #40C6C3 0%, #33a3a0 100%);
  padding: 20px;
  color: white;
  position: relative;
}

.contact-form-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.contact-form-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.contact-form-close svg {
  width: 18px;
  height: 18px;
  color: white;
}

.contact-form-header h3 {
  margin: 0 0 5px 0;
  font-size: 20px;
  font-weight: 700;
  color: white;
}

.contact-form-header p {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
}

.contact-form-body {
  padding: 24px;
}

.contact-form-group {
  margin-bottom: 16px;
}

.contact-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.contact-form-input,
.contact-form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  font-family: 'Inter Tight', sans-serif;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.contact-form-input:focus,
.contact-form-textarea:focus {
  outline: none;
  border-color: #40C6C3;
  box-shadow: 0 0 0 3px rgba(64, 198, 195, 0.1);
}

.contact-form-textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #40C6C3 0%, #33a3a0 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(64, 198, 195, 0.3);
}

.contact-form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(64, 198, 195, 0.4);
}

.contact-form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Calendar Modal */
.contact-calendar-modal {
  position: fixed;
  bottom: 120px;
  right: 30px;
  width: 420px;
  max-width: calc(100vw - 60px);
  height: 600px;
  max-height: calc(100vh - 200px);
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 9997;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.contact-calendar-modal.active {
  opacity: 1;
  pointer-events: all;
  transform: scale(1) translateY(0);
}

.contact-calendar-header {
  background: linear-gradient(135deg, #40C6C3 0%, #33a3a0 100%);
  padding: 20px;
  color: white;
  position: relative;
  flex-shrink: 0;
}

.contact-calendar-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.contact-calendar-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.contact-calendar-close svg {
  width: 18px;
  height: 18px;
  color: white;
}

.contact-calendar-header h3 {
  margin: 0 0 5px 0;
  font-size: 20px;
  font-weight: 700;
  color: white;
}

.contact-calendar-header p {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
}

.contact-calendar-body {
  flex: 1;
  overflow: hidden;
}

.tidycal-embed-widget {
  width: 100%;
  height: 100%;
}

/* Responsive */
@media (max-width: 768px) {
  .contact-widget {
    bottom: 20px;
    right: 20px;
  }

  .contact-bubble {
    width: 60px;
    height: 60px;
  }

  .contact-bubble svg {
    width: 28px;
    height: 28px;
  }

  .contact-options {
    bottom: 75px;
  }

  .contact-option {
    min-width: 180px;
    padding: 12px 16px;
  }

  .contact-option-icon {
    width: 36px;
    height: 36px;
  }

  .contact-option-icon svg {
    width: 18px;
    height: 18px;
  }

  .contact-form-modal,
  .contact-calendar-modal {
    right: 20px;
    bottom: 95px;
    width: calc(100vw - 40px);
  }

  .contact-calendar-modal {
    height: calc(100vh - 150px);
  }
}

/* Success Message */
.contact-form-success {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.contact-form-success.active {
  opacity: 1;
  pointer-events: all;
}

.contact-form-success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  animation: scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.contact-form-success-icon svg {
  width: 40px;
  height: 40px;
  color: white;
}

.contact-form-success h4 {
  margin: 0 0 10px 0;
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
}

.contact-form-success p {
  margin: 0 0 20px 0;
  font-size: 15px;
  color: #6b7280;
  line-height: 1.5;
}

.contact-form-success-button {
  padding: 12px 24px;
  background: linear-gradient(135deg, #40C6C3 0%, #33a3a0 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-form-success-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(64, 198, 195, 0.4);
}
