/* Global styles for Zaag Chat Widget */

* {
  box-sizing: border-box;
}

/* Reset for the widget */
.zaag-chat-widget,
.zaag-chat-widget * {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}

/* Widget container */
.zaag-chat-widget {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #000;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
.zaag-chat-widget ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.zaag-chat-widget ::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.zaag-chat-widget ::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.zaag-chat-widget ::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Button reset */
.zaag-chat-widget button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  outline: none;
}

/* Input reset */
.zaag-chat-widget input,
.zaag-chat-widget textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* Link styles */
.zaag-chat-widget a {
  text-decoration: none;
  color: inherit;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Widget fade in animation */
.zaag-chat-widget-container {
  animation: slideUp 0.3s ease-out;
}

/* Floating button */
.zaag-chat-button {
  position: fixed;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  /*background-color: #0F62FE;*/
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 999998;
}

.zaag-chat-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.zaag-chat-button.bottom-right {
  bottom: 20px;
  right: 20px;
}

.zaag-chat-button.bottom-left {
  bottom: 20px;
  left: 20px;
}

.zaag-chat-button.top-right {
  top: 20px;
  right: 20px;
}

.zaag-chat-button.top-left {
  top: 20px;
  left: 20px;
}

/* Unread badge */
.zaag-chat-button .unread-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #FF0000;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

/* Chat container */
.zaag-chat-container {
  position: fixed;
  z-index: 999999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  overflow: hidden;
}

.zaag-chat-container.bottom-right {
  bottom: 90px;
  right: 20px;
}

.zaag-chat-container.bottom-left {
  bottom: 90px;
  left: 20px;
}

.zaag-chat-container.top-right {
  top: 90px;
  right: 20px;
}

.zaag-chat-container.top-left {
  top: 90px;
  left: 20px;
}

/* Responsive design */
@media (max-width: 480px) {
  .zaag-chat-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0;
  }

  .zaag-chat-button {
    bottom: 20px;
    right: 20px;
  }
}

/* Loading spinner */
.zaag-loading-spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #0F62FE;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
