/* src/styles.css */
[data-avatar-call] {
  --avatar-bg-connecting: #1a1a1a;
  --avatar-radius: 16px;
  --avatar-control-bg: rgba(255, 255, 255, 0.08);
  --avatar-control-bg-hover: rgba(255, 255, 255, 0.15);
  --avatar-control-bg-off: rgba(255, 255, 255, 0.05);
  --avatar-control-color-off: rgba(255, 255, 255, 0.5);
  --avatar-control-size: 40px;
  --avatar-end-call-bg: #ff552f;
  --avatar-end-call-bg-hover: #e64a28;
  --avatar-screen-share-indicator-bg:
    linear-gradient(
      
      90deg,
      rgba(0, 0, 0, 0.5),
      rgba(0, 0, 0, 0.5) ),
    linear-gradient(
      
      90deg,
      rgba(255, 255, 255, 0.1),
      rgba(255, 255, 255, 0.1) );
  --avatar-screen-share-indicator-border: rgba(255, 255, 255, 0.06);
  --avatar-screen-share-stop-color: #ff552f;
  --avatar-screen-share-stop-bg-hover: rgba(255, 85, 47, 0.1);
  --avatar-screen-share-active-bg: #ffffff;
  --avatar-screen-share-active-color: #000000;
  --avatar-screen-share-active-bg-hover: rgba(255, 255, 255, 0.85);
  --avatar-text-color: #ffffff;
  --avatar-text-secondary: rgba(255, 255, 255, 0.7);
  --avatar-pip-size: 120px;
  --avatar-pip-radius: 12px;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--avatar-bg-connecting);
  border-radius: var(--avatar-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}
[data-avatar-call]::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--avatar-image);
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.5);
  transform: scale(1.1);
  z-index: -1;
  transition: opacity 0.3s ease;
}
[data-avatar-call]:has([data-avatar-video][data-avatar-status=ready])::before {
  opacity: 0;
  pointer-events: none;
}
[data-avatar-video] {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 0;
}
[data-avatar-video] video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
[data-avatar-video][data-avatar-status=ready] {
  background: transparent;
}
[data-avatar-control-bar] {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background:
    linear-gradient(
      to top,
      rgba(0, 0, 0, 0.4),
      transparent);
  z-index: 2;
}
@media (max-width: 480px) {
  [data-avatar-control-bar] {
    padding: 12px;
    gap: 8px;
  }
}
[data-avatar-share-indicator] {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  max-width: calc(100% - 32px);
  border: 1px solid var(--avatar-screen-share-indicator-border);
  border-radius: 999px;
  background: var(--avatar-screen-share-indicator-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--avatar-text-color);
}
[data-avatar-share-label] {
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
}
[data-avatar-share-actions] {
  display: flex;
  align-items: center;
  gap: 0;
}
[data-avatar-share-action] {
  padding: 6px 10px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}
[data-avatar-share-action=stop] {
  color: var(--avatar-screen-share-stop-color);
}
[data-avatar-share-action=stop]:hover {
  background: var(--avatar-screen-share-stop-bg-hover);
}
[data-avatar-share-action]:focus-visible {
  outline: 2px solid var(--avatar-text-color);
  outline-offset: 2px;
}
@media (max-width: 480px) {
  [data-avatar-share-indicator] {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 8px 10px;
    max-width: calc(100% - 24px);
  }
  [data-avatar-share-label] {
    white-space: normal;
    text-align: center;
  }
}
[data-avatar-controls] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
@media (max-width: 480px) {
  [data-avatar-controls] {
    gap: 8px;
  }
}
[data-avatar-control] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--avatar-control-size);
  height: var(--avatar-control-size);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.03);
  background: var(--avatar-control-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--avatar-text-color);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}
@media (max-width: 480px) {
  [data-avatar-control] {
    width: 36px;
    height: 36px;
  }
  [data-avatar-control] svg {
    width: 14px;
    height: 14px;
  }
}
[data-avatar-control]:hover {
  background: var(--avatar-control-bg-hover);
}
[data-avatar-control]:focus-visible {
  outline: 2px solid var(--avatar-text-color);
  outline-offset: 2px;
}
[data-avatar-control][data-avatar-enabled=false] {
  background: var(--avatar-control-bg-off);
  color: var(--avatar-control-color-off);
}
[data-avatar-control][data-avatar-enabled=false]:hover {
  background: var(--avatar-control-bg);
}
[data-avatar-control=screen-share][data-avatar-enabled=true] {
  background: var(--avatar-screen-share-active-bg);
  color: var(--avatar-screen-share-active-color);
}
[data-avatar-control=screen-share][data-avatar-enabled=true]:hover {
  background: var(--avatar-screen-share-active-bg-hover);
}
[data-avatar-control=end-call] {
  background: var(--avatar-end-call-bg);
}
[data-avatar-control=end-call]:hover {
  background: var(--avatar-end-call-bg-hover);
}
[data-avatar-user-video] {
  position: absolute;
  bottom: 88px;
  right: 24px;
  width: var(--avatar-pip-size);
  aspect-ratio: 4 / 3;
  border-radius: var(--avatar-pip-radius);
  overflow: hidden;
  background: var(--avatar-bg-connecting);
  border: 2px solid rgba(255, 255, 255, 0.2);
  z-index: 1;
}
@media (max-width: 480px) {
  [data-avatar-user-video] {
    width: 80px;
    bottom: 72px;
    right: 12px;
    border-radius: 8px;
  }
}
[data-avatar-user-video] video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
[data-avatar-user-video][data-avatar-mirror=true] video {
  transform: scaleX(-1);
}
[data-avatar-user-video][data-avatar-has-video=false]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40%;
  height: 40%;
  background-color: var(--avatar-text-secondary);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}
[data-avatar-user-video][data-avatar-camera-enabled=false] {
  display: none;
}
[data-avatar-screen-share] {
  flex: 1;
  width: 100%;
  min-height: 0;
  background: #000;
  z-index: 0;
}
[data-avatar-screen-share] video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@keyframes avatar-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
[data-avatar-call]:has([data-avatar-video][data-avatar-status=connecting])::after,
[data-avatar-call]:has([data-avatar-video][data-avatar-status=waiting])::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: avatar-spin 0.8s linear infinite;
  z-index: 3;
  pointer-events: none;
}
@keyframes avatar-spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
[data-avatar-video][data-avatar-status=connecting]::after,
[data-avatar-video][data-avatar-status=waiting]::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.03),
      transparent);
  background-size: 200% 100%;
  animation: avatar-pulse 2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  [data-avatar-call]:has([data-avatar-video][data-avatar-status=connecting])::after,
  [data-avatar-call]:has([data-avatar-video][data-avatar-status=waiting])::after,
  [data-avatar-video][data-avatar-status=connecting]::after,
  [data-avatar-video][data-avatar-status=waiting]::after {
    animation: none;
  }
}
[data-avatar-highlighted=true] {
  outline: 2px solid oklch(0.65 0.19 250);
  outline-offset: 2px;
  border-radius: 4px;
  animation: avatar-highlight-pulse 1s ease-in-out infinite;
}
@keyframes avatar-highlight-pulse {
  0%, 100% {
    outline-color: oklch(0.65 0.19 250 / 0.4);
  }
  50% {
    outline-color: oklch(0.65 0.19 250);
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-avatar-highlighted=true] {
    animation: none;
  }
}
