/* IT Sahayata Chatbot - Modern & Creative Design 2.0 */
:root {
  --primary-color1: #8a49f7;
  --primary-light: #a67ff9;
  --primary-dark1: #7038d5;
  --secondary-color1: #2b73e6;
  --secondary-light: #4a8bef;
  --secondary-dark1: #1a62d5;
  --accent-color: #ff6b6b;
  --accent-dark: #ff4f4f;
  --text-light1: #ffffff;
  --text-dark1: #333333;
  --text-muted: #6c757d;
  --bg-light1: #ffffff;
  --bg-gray1: #f8fafd;
  --border-light1: #e3eaf5;
  --shadow-light1: rgba(18, 69, 168, 0.15);
  --shadow-medium1: rgba(18, 69, 168, 0.25);
  --shadow-dark: rgba(18, 69, 168, 0.35);
  --success-color: #4CAF50;
  --success-dark: #45a049;
  --font-main: 'Segoe UI', Arial, sans-serif;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Chat Icon */
#itsahayata-chat-icon {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary-color1), var(--secondary-color1));
  color: var(--text-light1);
  padding: 12px 20px;
  border-radius: var(--border-radius-xl);
  box-shadow: 0 4px 20px var(--shadow-medium1), 0 0 0 2px rgba(138, 73, 247, 0.1);
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 18px;
  font-weight: 500;
  transition: all var(--transition-fast);
  z-index: 1010;
  position: relative;
  overflow: hidden;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

#itsahayata-chat-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--secondary-color1), var(--primary-color1));
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: -1;
}

#itsahayata-chat-icon::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  top: -10px;
  right: -10px;
  transition: all 0.5s ease;
}

#itsahayata-chat-icon:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--shadow-dark), 0 0 0 3px rgba(138, 73, 247, 0.2);
}

#itsahayata-chat-icon:hover::before {
  opacity: 1;
}

#itsahayata-chat-icon:hover::after {
  transform: scale(3);
  opacity: 0;
}

#itsahayata-chat-icon:active {
  transform: translateY(0);
}

#itsahayata-chat-icon img {
  /* width: 32px; */
  height: 80px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform var(--transition-fast);
}

#itsahayata-chat-icon:hover img {
  transform: scale(1.1) rotate(5deg);
}

/* Chatbot Container */
#itsahayata-chatbot-root {
  position: fixed;
  right: 28px;
  bottom: 78px;
  z-index: 11000;
  font-family: var(--font-main);
}

#itsahayata-chatbot-box {
  width: 350px;
  max-width: 96vw;
  background: var(--bg-light1);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 40px var(--shadow-medium1), 0 0 0 1px rgba(138, 73, 247, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: chatbotIn 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.1);
  border: 1px solid rgba(138, 73, 247, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

@keyframes chatbotIn {
  0% { transform: translateY(50px) scale(0.9); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Chatbot Header */
#itsahayata-chatbot-header {
  background: linear-gradient(135deg, var(--primary-color1), var(--secondary-color1));
  color: var(--text-light1);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

#itsahayata-chatbot-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
  opacity: 0.7;
  animation: headerGlow 15s infinite linear;
  pointer-events: none;
}

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

#itsahayata-chatbot-header .title {
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  display: inline-block;
}

#itsahayata-chatbot-header .title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--text-light1);
  transition: width 0.3s ease;
}

#itsahayata-chatbot-header:hover .title::after {
  width: 100%;
}

#itsahayata-chatbot-header .close {
  font-size: 24px;
  cursor: pointer;
  opacity: 0.85;
  background: none;
  border: none;
  color: var(--text-light1);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

#itsahayata-chatbot-header .close::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.3s ease;
}

#itsahayata-chatbot-header .close:hover {
  opacity: 1;
  transform: rotate(90deg);
}

#itsahayata-chatbot-header .close:hover::before {
  transform: scale(1);
}

/* Messages Container */
#itsahayata-chatbot-messages {
  background: var(--bg-gray1);
  min-height: 250px;
  max-height: 350px;
  overflow-y: auto;
  padding: 20px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(138, 73, 247, 0.03) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(43, 115, 230, 0.03) 0%, transparent 20%);
  position: relative;
}

#itsahayata-chatbot-messages::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(to bottom, var(--bg-gray1), transparent);
  pointer-events: none;
  z-index: 1;
  opacity: 0.8;
}

#itsahayata-chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

#itsahayata-chatbot-messages::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 10px;
}

#itsahayata-chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(138, 73, 247, 0.15);
  border-radius: 10px;
  transition: background 0.3s ease;
}

#itsahayata-chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(138, 73, 247, 0.25);
}

/* Message Bubbles */
.itsahayata-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--secondary-color1), var(--primary-color1));
  color: var(--text-light1);
  padding: 12px 18px;
  border-radius: 18px 18px 4px 18px;
  max-width: 80%;
  word-break: break-word;
  font-size: 15px;
  box-shadow: 0 3px 10px var(--shadow-light1);
  animation: msgIn 0.3s ease-out;
  position: relative;
  transform-origin: bottom right;
  transition: transform 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.itsahayata-msg-user:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--shadow-medium1);
}

.itsahayata-msg-user::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 12px;
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, var(--secondary-dark1), var(--primary-dark1));
  border-radius: 50%;
  opacity: 0.5;
}

.itsahayata-msg-bot {
  align-self: flex-start;
  background: var(--bg-light1);
  color: var(--text-dark1);
  padding: 12px 18px;
  border-radius: 18px 18px 18px 4px;
  max-width: 85%;
  word-break: break-word;
  font-size: 15px;
  box-shadow: 0 3px 10px var(--shadow-light1);
  border: 1px solid var(--border-light1);
  animation: msgIn 0.3s ease-out;
  line-height: 1.5;
  transform-origin: bottom left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.itsahayata-msg-bot:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--shadow-medium1);
}

.itsahayata-msg-bot::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 12px;
  width: 10px;
  height: 10px;
  background: var(--bg-light1);
  border: 1px solid var(--border-light1);
  border-radius: 50%;
  opacity: 0.5;
}

@keyframes msgIn {
  0% { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.itsahayata-msg-thinking {
  color: var(--primary-dark1);
  font-style: italic;
  font-size: 14px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--border-radius-md);
  align-self: flex-start;
  position: relative;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-light1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.itsahayata-msg-thinking::before {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--primary-color1);
  border-radius: 50%;
  display: inline-block;
  animation: thinkingDot 1.4s infinite ease-in-out both;
}

.itsahayata-msg-thinking::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 15px;
  width: 10px;
  height: 10px;
  background: white;
  transform: rotate(45deg);
  border-right: 1px solid var(--border-light1);
  border-bottom: 1px solid var(--border-light1);
}

@keyframes thinkingDot {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Input Form */
#itsahayata-chatbot-inputform {
  display: flex;
  gap: 8px;
  background: var(--bg-light1);
  padding: 14px 16px;
  border-top: 1px solid var(--border-light1);
  position: relative;
  transition: all var(--transition-normal);
}

#itsahayata-chatbot-inputform::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(138, 73, 247, 0.2), 
    rgba(43, 115, 230, 0.2), 
    transparent
  );
}

#itsahayata-chatbot-inputform:focus-within {
  background: var(--bg-gray1);
}

#itsahayata-chatbot-input {
  flex: 1;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-light1);
  font-size: 15px;
  padding: 12px 16px;
  outline: none;
  background: var(--bg-gray1);
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

#itsahayata-chatbot-input:focus {
  border-color: var(--primary-color1);
  background: var(--bg-light1);
  box-shadow: 0 0 0 3px rgba(138, 73, 247, 0.1);
}

#itsahayata-chatbot-sendbtn {
  background: linear-gradient(135deg, var(--primary-color1), var(--secondary-color1));
  color: var(--text-light1);
  padding: 10px 16px;
  border-radius: var(--border-radius-md);
  font-weight: 500;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 5px var(--shadow-light1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

#itsahayata-chatbot-sendbtn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.2), 
    transparent
  );
  transition: all 0.6s;
}

#itsahayata-chatbot-sendbtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--shadow-medium1);
}

#itsahayata-chatbot-sendbtn:hover::before {
  left: 100%;
}

#itsahayata-chatbot-sendbtn:active {
  transform: translateY(0);
}

#itsahayata-chatbot-sendbtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Brand Footer */
#itsahayata-chatbot-brand {
  padding: 10px 8px 8px;
  text-align: center;
  color: var(--primary-dark1);
  font-size: 13px;
  opacity: 0.75;
  letter-spacing: 0.5px;
  background: var(--bg-light1);
  position: relative;
  transition: opacity 0.3s ease;
}

#itsahayata-chatbot-brand:hover {
  opacity: 1;
}

#itsahayata-chatbot-brand::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color1), var(--secondary-color1));
  border-radius: 3px;
  opacity: 0.2;
}

/* User Registration Form */
#itsahayata-registration-form {
  padding: 15px;
  background: var(--bg-gray1);
  max-height: 320px;
  overflow-y: auto;
  transition: all var(--transition-normal);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(138, 73, 247, 0.03) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(43, 115, 230, 0.03) 0%, transparent 20%);
}

#itsahayata-registration-form::-webkit-scrollbar {
  width: 6px;
}

#itsahayata-registration-form::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 10px;
}

#itsahayata-registration-form::-webkit-scrollbar-thumb {
  background: rgba(138, 73, 247, 0.15);
  border-radius: 10px;
}

#itsahayata-user-form {
  background: var(--bg-light1);
  border-radius: var(--border-radius-lg);
  padding: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

#itsahayata-user-form::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(138, 73, 247, 0.05) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  border-radius: 50%;
}

#itsahayata-user-form:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

#itsahayata-user-form h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--primary-color1);
  font-size: 16px;
  text-align: center;
  font-weight: 600;
  position: relative;
  padding-bottom: 8px;
}

#itsahayata-user-form h3::after {
  content: '';
  position: absolute;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color1), var(--secondary-color1));
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 3px;
}

.form-group {
  margin-bottom: 6px !important;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--primary-dark1);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-light1);
  border-radius: var(--border-radius-md);
  font-size: 13px;
  transition: all var(--transition-fast);
  background-color: var(--bg-light1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color1);
  box-shadow: 0 0 0 3px rgba(138, 73, 247, 0.1);
  outline: none;
}

.form-group textarea {
  min-height: 58px !important;
  resize: none !important;
}

#itsahayata-submit-details {
  background: linear-gradient(135deg, var(--primary-color1), var(--secondary-color1));
  color: white;
  border: none;
  padding: 10px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  margin-top: 8px;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 10px rgba(43, 115, 230, 0.2);
  position: relative;
  overflow: hidden;
}

#itsahayata-submit-details::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.2), 
    transparent
  );
  transition: all 0.6s;
}

#itsahayata-submit-details:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(43, 115, 230, 0.3);
}

#itsahayata-submit-details:hover::before {
  left: 100%;
}

#itsahayata-submit-details:active {
  transform: translateY(0);
}

/* Promotional Message */
.itsahayata-promo-msg {
  background: linear-gradient(135deg, rgba(138, 73, 247, 0.05), rgba(43, 115, 230, 0.05));
  border: 1px dashed rgba(138, 73, 247, 0.3);
  border-radius: 16px;
  padding: 12px 16px;
  position: relative;
  overflow: hidden;
}

.itsahayata-promo-msg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(138, 73, 247, 0.05) 0%, 
    rgba(43, 115, 230, 0.05) 50%, 
    rgba(138, 73, 247, 0.05) 100%);
  background-size: 200% 200%;
  animation: promoBg 3s ease infinite;
  pointer-events: none;
}

@keyframes promoBg {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.itsahayata-promo-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--primary-color1);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  padding-right: 20px;
}

.itsahayata-promo-link::after {
  content: '→';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
}

.itsahayata-promo-link:hover {
  color: var(--secondary-color1);
  text-decoration: underline;
}

.itsahayata-promo-link:hover::after {
  transform: translate(3px, -50%);
}

/* Responsive Styles */
@media (max-width: 450px) {
  #itsahayata-chatbot-box {
    width: 95vw;
    border-radius: var(--border-radius-md);
    max-height: 85vh;
  }
  
  #itsahayata-chatbot-root {
    right: 2.5vw;
    bottom: 70px;
  }
  
  #itsahayata-chat-icon {
    padding: 10px 15px;
  }
  
  #itsahayata-chat-icon span {
    display: none;
  }
  
  #itsahayata-chatbot-messages {
    max-height: 280px;
    min-height: 200px;
  }
  
  #itsahayata-registration-form {
    padding: 12px;
    max-height: 280px;
  }
  
  #itsahayata-user-form {
    padding: 12px;
  }
  
  #itsahayata-user-form h3 {
    font-size: 15px;
    margin-bottom: 10px;
  }
  
  .form-group {
    margin-bottom: 8px;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 8px 10px;
  }
  
  .form-group textarea {
    height: 50px;
  }
  
  #itsahayata-submit-details {
    padding: 10px;
    font-size: 13px;
  }
}