/* widget/styles.css */
/* Base Widget Styles - بدون أي تأثير خارجي */

/* CSS Custom Properties للنظرية */
:root {
  --primary-color: #1E3A8A;
  --secondary-color: #60A5FA;
  --gradient: linear-gradient(135deg, #1E3A8A 0%, #60A5FA 100%);
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-700: #374151;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
}

/* Chat Widget Container */
.chat-widget-container {
  width: 100%;
  height: 100%;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  isolation: isolate;
}

/* Chat Icon */
.chat-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 3px solid var(--white);
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 1000;
}

.chat-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(30, 58, 138, 0.3);
}

/* Chat Container */
.chat-container {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 380px;
  height: 580px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.chat-container.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* Rest of the styles from original widget.js */
/* سيتم نقل جميع التنسيقات من widget.js هنا */
/* مع إزالة جميع !important غير الضرورية */

/* Header */
.chat-header {
  background: var(--gradient);
  color: var(--white);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Messages */
.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: var(--gray-50);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Message Bubbles */
.message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  line-height: 1.4;
  word-wrap: break-word;
}

.bot-message {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
}

.user-message {
  align-self: flex-end;
  background: var(--primary-color);
  color: var(--white);
}

/* Input Area */
.chat-input-area {
  padding: 16px;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
}

.message-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 24px;
  font-size: 14px;
  resize: none;
  font-family: inherit;
}

.message-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Quick Questions */
.quick-questions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.quick-btn {
  padding: 10px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-btn:hover {
  background: var(--gray-200);
}

/* Responsive Design */
@media (max-width: 768px) {
  .chat-container {
    width: 100vw;
    height: 100vh;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }
  
  .chat-icon {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
  }
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message {
  animation: slideIn 0.3s ease;
}