/* EziLux floating EziAssist chat — scoped to .ezilux-chat-widget */

.ezilux-chat-widget {
  --ezilux-chat-primary: var(--primary-color, #c1aa80);
  --ezilux-chat-text: var(--text-color, #0a0607);
  --ezilux-chat-white: var(--white, #ffffff);
  --ezilux-chat-shadow: 0 8px 32px rgba(10, 6, 7, 0.18);
  --ezilux-chat-radius: 12px;
  --ezilux-chat-z: 25000;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: var(--ezilux-chat-z);
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.ezilux-chat-widget__fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: var(--ezilux-chat-z);
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: var(--ezilux-chat-primary);
  color: var(--ezilux-chat-white);
  cursor: pointer;
  box-shadow: var(--ezilux-chat-shadow);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ezilux-chat-widget__fab:hover {
  background: var(--brand-black, #0a0607);
  transform: scale(1.04);
}

.ezilux-chat-widget__fab:focus-visible {
  outline: 3px solid rgba(193, 170, 128, 0.7);
  outline-offset: 3px;
}

.ezilux-chat-widget__fab[hidden] {
  display: none;
}

.ezilux-chat-widget__fab-icon {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.ezilux-chat-widget__panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: var(--ezilux-chat-z);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  width: 400px;
  max-width: calc(100vw - 32px);
  height: 600px;
  max-height: calc(100dvh - 100px);
  background: var(--ezilux-chat-white);
  border-radius: var(--ezilux-chat-radius);
  box-shadow: var(--ezilux-chat-shadow);
  overflow: hidden;
  overscroll-behavior: contain;
  transform-origin: bottom right;
  animation: ezilux-chat-slide-up 0.28s ease-out;
}

.ezilux-chat-widget__panel[hidden] {
  display: none;
}

.ezilux-chat-widget__panel--minimized {
  height: auto;
  max-height: none;
  animation: none;
}

.ezilux-chat-widget__panel--minimized .ezilux-chat-widget__body {
  display: none;
}

.ezilux-chat-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  background: var(--ezilux-chat-primary);
  color: var(--ezilux-chat-white);
  flex-shrink: 0;
}

.ezilux-chat-widget__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.ezilux-chat-widget__header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ezilux-chat-widget__icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ezilux-chat-widget__icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.ezilux-chat-widget__icon-btn:focus-visible {
  outline: 2px solid var(--ezilux-chat-white);
  outline-offset: 2px;
}

.ezilux-chat-widget__icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.ezilux-chat-widget__body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  background: var(--light-bg, #fafafa);
}

.ezilux-chat-widget__iframe {
  display: block;
  width: 100%;
  height: 100%;
  flex: 1;
  min-height: 0;
  border: none;
  background: var(--ezilux-chat-white);
  pointer-events: auto;
}

@keyframes ezilux-chat-slide-up {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ezilux-chat-widget__panel {
    animation: none;
  }

  .ezilux-chat-widget__fab {
    transition: none;
  }
}

@media (max-width: 768px) {
  .ezilux-chat-widget__title {
    font-size: 17px;
  }

  .ezilux-chat-widget__header {
    padding: 14px 16px;
  }

  .ezilux-chat-widget__icon-btn {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .ezilux-chat-widget {
    right: 16px;
    bottom: 16px;
  }

  .ezilux-chat-widget__fab {
    right: 16px;
    bottom: 16px;
    width: 60px;
    height: 60px;
  }

  .ezilux-chat-widget__fab-icon {
    width: 28px;
    height: 28px;
  }

  .ezilux-chat-widget__panel {
    inset: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .ezilux-chat-widget__title {
    font-size: 18px;
  }
}
