/* INTCIS AI Assistant Widget Styles */
.intcis-widget-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.intcis-widget-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
  border-radius: 50%;
  box-shadow: 0 10px 25px rgba(30, 64, 175, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.intcis-widget-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(30, 64, 175, 0.4);
}

.intcis-widget-icon {
  width: 24px;
  height: 24px;
  color: white;
}

.intcis-widget-tooltip {
  position: absolute;
  top: -48px;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.intcis-widget-button:hover .intcis-widget-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.intcis-widget-chat {
  width: 384px;
  max-width: calc(100vw - 32px);
  height: 500px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.intcis-chat-header {
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
  color: white;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.intcis-chat-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.intcis-chat-avatar {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intcis-chat-avatar svg {
  width: 20px;
  height: 20px;
}

.intcis-chat-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.intcis-chat-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.intcis-status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
}

.intcis-chat-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.intcis-chat-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.intcis-chat-close svg {
  width: 16px;
  height: 16px;
}

.intcis-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.intcis-message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.intcis-message-user {
  flex-direction: row-reverse;
}

.intcis-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.intcis-message-user .intcis-message-avatar {
  background: #1e40af;
  color: white;
}

.intcis-message-bot .intcis-message-avatar {
  background: #f3f4f6;
  color: #6b7280;
}

.intcis-message-avatar svg {
  width: 16px;
  height: 16px;
}

.intcis-message-content {
  max-width: 80%;
  flex: 1;
}

.intcis-message-text {
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.intcis-message-user .intcis-message-text {
  background: #1e40af;
  color: white;
}

.intcis-message-bot .intcis-message-text {
  background: #f9fafb;
  color: #374151;
}

.intcis-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.intcis-quick-reply {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.intcis-quick-reply:hover {
  background: white;
  border-color: #1e40af;
  color: #1e40af;
}

.intcis-typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 12px;
}

.intcis-typing-indicator span {
  width: 8px;
  height: 8px;
  background: #9ca3af;
  border-radius: 50%;
  animation: intcis-typing 1.4s infinite;
}

.intcis-typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.intcis-typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes intcis-typing {
  0%, 80%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.intcis-chat-input {
  background: rgba(249, 250, 251, 0.5);
  border-top: 1px solid rgba(229, 231, 235, 0.5);
  padding: 16px;
}

.intcis-chat-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.intcis-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.intcis-action-btn:hover {
  border-color: #1e40af;
  color: #1e40af;
}

.intcis-action-btn svg {
  width: 12px;
  height: 12px;
}

.intcis-input-row {
  display: flex;
  gap: 8px;
}

.intcis-message-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  background: white;
  transition: border-color 0.2s;
}

.intcis-message-input:focus {
  outline: none;
  border-color: #1e40af;
}

.intcis-send-btn {
  background: #1e40af;
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s;
}

.intcis-send-btn:hover:not(:disabled) {
  background: #1d4ed8;
}

.intcis-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.intcis-send-btn svg {
  width: 16px;
  height: 16px;
}

/* Modal Styles */
.intcis-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.intcis-modal-content {
  width: 100%;
  max-width: 480px;
  margin: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.intcis-modal-header {
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
  color: white;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.intcis-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.intcis-modal-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.intcis-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.intcis-modal-close svg {
  width: 16px;
  height: 16px;
}

.intcis-modal-body {
  padding: 24px;
}

.intcis-form-group {
  margin-bottom: 20px;
}

.intcis-form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.intcis-form-group input,
.intcis-form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  background: white;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.intcis-form-group input:focus,
.intcis-form-group textarea:focus {
  outline: none;
  border-color: #1e40af;
}

.intcis-form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.intcis-plan-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.intcis-plan-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.intcis-plan-option:hover {
  border-color: #1e40af;
  background: rgba(30, 64, 175, 0.05);
}

.intcis-plan-option input[type="radio"] {
  margin: 0;
  width: auto;
}

.intcis-plan-option span {
  font-size: 14px;
  color: #374151;
}

.intcis-submit-btn {
  width: 100%;
  background: #1e40af;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.intcis-submit-btn:hover {
  background: #1d4ed8;
}

/* Responsive Design */
@media (max-width: 480px) {
  .intcis-widget-container {
    bottom: 16px;
    right: 16px;
  }
  
  .intcis-widget-chat {
    width: calc(100vw - 32px);
    height: 80vh;
    max-height: 600px;
  }
  
  .intcis-chat-actions {
    flex-direction: column;
  }
  
  .intcis-action-btn {
    justify-content: flex-start;
  }
  
  .intcis-modal-content {
    margin: 8px;
  }
  
  .intcis-modal-body {
    padding: 16px;
  }
}