/* Shared click-to-call FAB — works on pages without css/main.css */
.call-widget {
  --sky: #7e9cc9;
  --cyan: #78bec9;
  --olive-hot: #95aa70;
  --text: #e6edf5;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Sora", "Manrope", sans-serif;
  position: fixed;
  right: 1.35rem;
  bottom: 1.35rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.call-fab-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.call-fab-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #0a0f16;
  background: linear-gradient(135deg, var(--sky) 0%, var(--cyan) 55%, var(--olive-hot) 100%);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(120, 190, 201, 0.28);
  white-space: nowrap;
  pointer-events: none;
  transition: background 0.28s var(--ease), box-shadow 0.28s var(--ease), transform 0.28s var(--ease);
}

.call-fab {
  position: relative;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background:
    radial-gradient(circle at 30% 28%, rgba(230, 237, 245, 0.45) 0%, transparent 42%),
    linear-gradient(145deg, #9eb6d4 0%, var(--sky) 42%, var(--cyan) 100%);
  box-shadow:
    0 10px 26px rgba(126, 156, 201, 0.4),
    0 2px 0 rgba(255, 255, 255, 0.28) inset,
    0 -3px 8px rgba(10, 20, 35, 0.28) inset;
  transform: scale(1);
  transform-origin: center center;
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    background 0.28s var(--ease);
}

.call-fab .phone-stop-a { stop-color: #eef5fb; }
.call-fab .phone-stop-b { stop-color: #a8c4e0; }
.call-fab .phone-stop-c { stop-color: #6aa0be; }

.call-fab:active:not(.is-active) {
  transform: scale(0.88);
  background:
    radial-gradient(circle at 35% 30%, rgba(149, 170, 112, 0.45) 0%, transparent 48%),
    linear-gradient(145deg, var(--olive-hot) 0%, #6f8a52 48%, #4f6540 100%);
  box-shadow:
    0 2px 8px rgba(80, 100, 50, 0.35),
    0 4px 10px rgba(20, 40, 20, 0.35) inset,
    0 1px 0 rgba(220, 240, 200, 0.25) inset;
}

.call-fab:active:not(.is-active) .phone-stop-a { stop-color: #e8f2d8; }
.call-fab:active:not(.is-active) .phone-stop-b { stop-color: #95aa70; }
.call-fab:active:not(.is-active) .phone-stop-c { stop-color: #667945; }
.call-fab:active:not(.is-active) .phone-shadow { flood-color: #2a3820; }

.call-fab.is-active {
  transform: scale(1.18);
  background:
    radial-gradient(circle at 32% 28%, rgba(149, 170, 112, 0.55) 0%, transparent 46%),
    linear-gradient(145deg, var(--olive-hot) 0%, #6f8a52 45%, var(--cyan) 100%);
  box-shadow:
    0 14px 32px rgba(102, 121, 69, 0.42),
    0 2px 0 rgba(220, 240, 200, 0.4) inset,
    0 -3px 10px rgba(20, 40, 30, 0.3) inset;
  animation: call-active-pulse 1.8s ease-in-out infinite;
}

.call-fab.is-active:active {
  transform: scale(1.08);
  animation: none;
}

.call-fab.is-active .phone-stop-a { stop-color: #e8f2d8; }
.call-fab.is-active .phone-stop-b { stop-color: #95aa70; }
.call-fab.is-active .phone-stop-c { stop-color: #667945; }
.call-fab.is-active .phone-shadow { flood-color: #2a3820; }

.call-fab:hover:not(:active):not(.is-active) {
  box-shadow:
    0 14px 30px rgba(126, 156, 201, 0.5),
    0 2px 0 rgba(255, 255, 255, 0.35) inset;
}

.call-fab-icon {
  width: 34px;
  height: 34px;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 1px 1px rgba(10, 20, 35, 0.35));
  pointer-events: none;
  transition: filter 0.22s var(--ease);
}

.call-fab.is-active .call-fab-icon {
  filter: drop-shadow(0 1px 1px rgba(30, 50, 20, 0.4));
}

.call-fab-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(120, 190, 201, 0.55);
  animation: call-pulse 2.2s ease-out infinite;
  pointer-events: none;
}

.call-fab:active .call-fab-pulse,
.call-fab.is-active .call-fab-pulse {
  display: none;
}

.call-fab-wrap:has(.call-fab:active:not(.is-active)) .call-fab-label {
  background: linear-gradient(145deg, var(--olive-hot) 0%, #4f6540 100%);
  color: #eef5e8;
  box-shadow: 0 4px 12px rgba(80, 100, 50, 0.35);
  transform: scale(0.96);
}

.call-fab-wrap:has(.call-fab.is-active) .call-fab-label {
  background: linear-gradient(145deg, var(--olive-hot) 0%, var(--cyan) 100%);
  color: #0a0f16;
  box-shadow: 0 6px 16px rgba(102, 121, 69, 0.4);
  transform: scale(1.06);
}

@keyframes call-pulse {
  0% { transform: scale(1); opacity: 0.7; }
  70% { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

@keyframes call-active-pulse {
  0%, 100% { transform: scale(1.18); }
  50% { transform: scale(1.26); }
}

#call-remote-audio {
  display: none;
}

.call-status {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.55rem);
  max-width: 12rem;
  margin: 0;
  padding: 0.4rem 0.6rem;
  border-radius: 0.65rem;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  color: var(--text);
  background: rgba(18, 28, 40, 0.92);
  border: 1px solid rgba(126, 156, 201, 0.28);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.call-status[hidden] {
  display: none;
}

.call-status.is-error {
  color: #f0a8a0;
  border-color: rgba(200, 90, 80, 0.4);
}

@media (max-width: 640px) {
  .call-widget {
    right: 1rem;
    bottom: 1rem;
  }

  .call-fab {
    width: 58px;
    height: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .call-fab-pulse,
  .call-fab.is-active {
    animation: none;
  }
}
