/* ==========================================================================
   ITC Michalk - High-Tech AI Chat Widget (Neon Cyan & Dark Glass Style)
   ========================================================================== */

#itc-chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.45), 0 8px 24px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99999;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#itc-chat-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.7), 0 10px 28px rgba(0, 0, 0, 0.6);
}

#itc-chat-toggle svg {
  width: 28px;
  height: 28px;
  fill: #ffffff;
  transition: transform 0.3s ease;
}

#itc-chat-toggle.active {
  background: #1e293b;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

#itc-chat-toggle.active svg {
  transform: rotate(90deg);
}

/* Chat Widget Container */
#itc-chat-widget {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 120px);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(6, 182, 212, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#itc-chat-widget.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Header */
.itc-chat-header {
  padding: 16px 20px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.6));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.itc-chat-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.itc-chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.5);
}

.itc-chat-avatar svg {
  width: 20px;
  height: 20px;
  fill: #ffffff;
}

.itc-chat-info h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.5px;
}

.itc-chat-status {
  font-size: 11px;
  color: #06b6d4;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.itc-chat-status::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #10b981;
}

.itc-chat-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  font-size: 18px;
  line-height: 1;
  transition: color 0.2s;
}

.itc-chat-close:hover {
  color: #ffffff;
}

/* Messages Area */
.itc-chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(6, 182, 212, 0.3) transparent;
}

.itc-msg {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.45;
  word-wrap: break-word;
  animation: itcMsgIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.itc-msg-bot {
  align-self: flex-start;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border-bottom-left-radius: 4px;
}

.itc-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.itc-msg a {
  color: #38bdf8;
  text-decoration: underline;
}

.itc-typing {
  display: flex;
  gap: 5px;
  padding: 12px 16px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  width: fit-content;
}

.itc-typing span {
  width: 6px;
  height: 6px;
  background: #06b6d4;
  border-radius: 50%;
  animation: itcDot 1.4s infinite ease-in-out both;
}

.itc-typing span:nth-child(1) { animation-delay: -0.32s; }
.itc-typing span:nth-child(2) { animation-delay: -0.16s; }

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

/* Quick Action Badges */
.itc-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.itc-quick-btn {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #38bdf8;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.itc-quick-btn:hover {
  background: rgba(6, 182, 212, 0.25);
  border-color: #06b6d4;
  color: #ffffff;
}

/* Footer / Input Area */
.itc-chat-footer {
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 8px;
  align-items: center;
}

#itc-chat-input {
  flex: 1;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 10px 16px;
  color: #ffffff;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#itc-chat-input:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

#itc-chat-input::placeholder {
  color: #64748b;
}

#itc-chat-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, opacity 0.2s;
}

#itc-chat-send:hover {
  transform: scale(1.05);
}

#itc-chat-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

#itc-chat-send svg {
  width: 16px;
  height: 16px;
  fill: #ffffff;
}

/* Mobile Friendly */
@media (max-width: 480px) {
  #itc-chat-widget {
    bottom: 80px;
    right: 16px;
    width: calc(100vw - 32px);
    height: 480px;
  }
  #itc-chat-toggle {
    bottom: 16px;
    right: 16px;
  }
}
