/* Phone Widget Styles */

.phone-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
}

.phone-widget[hidden] {
  display: none;
}

/* Collapsed icon */

.phone-widget__toggle {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent-red);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.phone-widget__toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.phone-widget__toggle:focus-visible {
  outline: 2px solid var(--accent-red);
  outline-offset: 3px;
}

.phone-widget__icon {
  width: 26px;
  height: 26px;
}

/* Expanded panel */

.phone-widget__panel {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 320px;
  background: var(--bg-main);
  color: var(--text-main);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  padding: 22px 22px 20px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.phone-widget.is-expanded .phone-widget__panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.phone-widget.is-expanded .phone-widget__toggle {
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
}

.phone-widget__close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-main);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
}

.phone-widget__close:hover,
.phone-widget__close:focus-visible {
  opacity: 1;
}

.phone-widget__close:focus-visible {
  outline: 2px solid var(--accent-red);
  outline-offset: 2px;
}

.phone-widget__block + .phone-widget__block {
  margin-top: 14px;
}

.phone-widget__label {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-main);
  opacity: 0.7;
  margin-bottom: 4px;
}

.phone-widget__phone {
  display: inline-block;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
  text-decoration: none;
  white-space: nowrap;
}

.phone-widget__phone:hover,
.phone-widget__phone:focus-visible {
  color: var(--accent-red);
}

.phone-widget__phone:focus-visible {
  outline: 2px solid var(--accent-red);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Mobile (≤1024px) — matches theme breakpoint from footer.css */
@media (max-width: 1024px) {
  .phone-widget {
    bottom: 16px;
    right: 16px;
  }

  .phone-widget__toggle {
    width: 48px;
    height: 48px;
  }

  .phone-widget__icon {
    width: 22px;
    height: 22px;
  }

  .phone-widget__panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 16px 20px 20px;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
  }

  .phone-widget.is-expanded .phone-widget__panel {
    transform: translateY(0);
  }

  .phone-widget__close {
    top: 6px;
    right: 12px;
  }

  .phone-widget__block + .phone-widget__block {
    margin-top: 12px;
  }

  .phone-widget__phone {
    font-size: 18px;
  }

  .phone-widget__label {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .phone-widget__toggle,
  .phone-widget__panel {
    transition: none;
  }

  .phone-widget__toggle:hover {
    transform: none;
  }
}
