/* ====================================================================
   FLOATING ACTION BUTTONS — Minimal & Professional
   Inspired by Intercom / Crisp / Linear support widgets
   ==================================================================== */

:root {
  --fab-size: 52px;
  --fab-gap: 12px;
  --fab-right: 22px;
  --fab-bottom-base: 96px;
  --fab-shadow: 0 6px 16px -4px rgba(15, 23, 42, 0.18), 0 2px 4px -1px rgba(15, 23, 42, 0.08);
  --fab-shadow-hover: 0 12px 24px -6px rgba(15, 23, 42, 0.25), 0 4px 8px -2px rgba(15, 23, 42, 0.12);
}

/* ----- Stack container ----- */
.fab-stack {
  position: fixed;
  right: var(--fab-right);
  bottom: var(--fab-bottom-base);
  display: flex;
  flex-direction: column;
  gap: var(--fab-gap);
  z-index: 1000;
  pointer-events: none;
}
.fab-stack > * { pointer-events: auto; }

/* ----- Base FAB ----- */
.fab-btn,
.emergency-contact-btn,
.whatsapp-chat-btn,
.quick-appointment-btn {
  position: relative !important;
  right: auto !important;
  bottom: auto !important;
  top: auto !important;
  left: auto !important;
  width: var(--fab-size);
  height: var(--fab-size);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #ffffff;
  box-shadow: var(--fab-shadow);
  transition: transform .2s cubic-bezier(.2,.8,.2,1),
              box-shadow .2s cubic-bezier(.2,.8,.2,1);
  overflow: visible;
  isolation: isolate;
}

.fab-btn:hover,
.emergency-contact-btn:hover,
.whatsapp-chat-btn:hover,
.quick-appointment-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--fab-shadow-hover);
}

.fab-btn:active,
.emergency-contact-btn:active,
.whatsapp-chat-btn:active,
.quick-appointment-btn:active {
  transform: translateY(0);
}

.fab-btn:focus-visible,
.emergency-contact-btn:focus-visible,
.whatsapp-chat-btn:focus-visible,
.quick-appointment-btn:focus-visible {
  outline: 2px solid rgba(15, 23, 42, 0.4);
  outline-offset: 3px;
}

/* ----- Per-button colors (solid, single tone) ----- */
.quick-appointment-btn { background: var(--primary-color, #0ea5e9) !important; }
.whatsapp-chat-btn     { background: #25D366 !important; }
.emergency-contact-btn { background: #ef4444 !important; }

/* ----- Icons ----- */
.fab-btn i,
.quick-appointment-btn i,
.whatsapp-chat-btn .whatsapp-icon,
.emergency-contact-btn .emergency-icon {
  font-size: 19px;
  line-height: 1;
  color: #fff;
  animation: none !important;
}
.whatsapp-chat-btn .whatsapp-icon { font-size: 22px; }

/* Hide old text labels */
.emergency-text,
.whatsapp-text { display: none !important; }

/* ----- Subtle attention dot on appointment FAB ----- */
.quick-appointment-btn::before {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #fff;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: dotPulse 2s ease-out infinite;
}
@keyframes dotPulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);  }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);    }
}

/* ----- Hover label pill removed — using native browser tooltip via title attr ----- */

/* ----- Mobile ----- */
@media (max-width: 991px) {
  :root {
    --fab-size: 48px;
    --fab-gap: 10px;
    --fab-right: 16px;
    --fab-bottom-base: 110px;
  }
}

/* ====================================================================
   QUICK APPOINTMENT PANEL (slide from right)
   ==================================================================== */
.quick-appointment-panel {
  position: fixed;
  inset: 0;
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  transition: opacity .3s ease, visibility .3s ease;
}
.quick-appointment-panel.active { visibility: visible; opacity: 1; }

.qa-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.qa-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px -8px rgba(0,0,0,0.2);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.quick-appointment-panel.active .qa-content { transform: translateX(0); }

.qa-header {
  padding: 22px 24px 18px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
}
.qa-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.qa-header p {
  margin: 6px 0 0;
  font-size: 13px;
  color: #475569;
  font-weight: 400;
  line-height: 1.5;
}
.qa-header p strong { color: #0f172a; font-weight: 600; }
.qa-header-text { flex: 1; min-width: 0; }
.qa-close {
  background: #f1f5f9;
  border: none;
  color: #475569;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, color .15s ease;
  flex-shrink: 0;
  font-size: 14px;
}
.qa-close:hover { background: #e2e8f0; color: #0f172a; }

.qa-body {
  padding: 22px 24px;
  overflow-y: auto;
  flex: 1;
}

/* Trust perks */
.qa-perks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
}
.qa-perk {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #0f172a;
  font-weight: 500;
  line-height: 1.4;
}
.qa-perk i {
  color: #16a34a;
  font-size: 15px;
  margin-top: 1px;
  flex-shrink: 0;
}
.qa-perk-sub {
  display: block;
  font-size: 11.5px;
  color: #64748b;
  font-weight: 400;
  margin-top: 1px;
}

.qa-form .qa-field { margin-bottom: 14px; }
.qa-form label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}
.qa-form label .req { color: #ef4444; margin-left: 2px; }

.qa-form input[type="text"],
.qa-form input[type="tel"] {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
  font-size: 14px;
  color: #0f172a;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.qa-form input::placeholder { color: #94a3b8; }
.qa-form input:focus {
  outline: none;
  border-color: var(--primary-color, #0ea5e9);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.qa-submit {
  width: 100%;
  padding: 12px 16px;
  background: var(--primary-color, #0ea5e9);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  transition: background .15s ease, transform .12s ease;
}
.qa-submit:hover { background: #0284c7; }
.qa-submit:active { transform: translateY(1px); }
.qa-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.qa-kvkk {
  margin-top: 14px;
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.5;
  text-align: center;
}
.qa-kvkk i { color: #94a3b8; margin-right: 4px; }
.qa-kvkk a { color: #475569; text-decoration: underline; text-decoration-color: #cbd5e1; }

.qa-foot {
  padding: 14px 24px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  color: #64748b;
  text-align: center;
  line-height: 1.5;
}
.qa-foot a { color: #0f172a; text-decoration: none; font-weight: 600; }
.qa-foot a:hover { text-decoration: underline; }

.qa-success {
  text-align: center;
  padding: 32px 20px 20px;
  display: none;
}
.qa-success.active { display: block; }
.qa-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: #dcfce7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #16a34a;
  font-size: 24px;
}
.qa-success h4 {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 6px;
  letter-spacing: -0.015em;
}
.qa-success p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.55;
}

.qa-error {
  display: none;
  margin-top: 10px;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
  font-size: 12.5px;
  font-weight: 500;
}
.qa-error.active { display: block; }

@media (prefers-reduced-motion: reduce) {
  .quick-appointment-btn::before { animation: none; }
  .fab-btn, .quick-appointment-btn, .whatsapp-chat-btn, .emergency-contact-btn,
  .qa-content { transition: none !important; }
}
