/* ============================================================
   SUPPORTIXIT - Chat Widget (Maria) Styles
   ============================================================ */

/* ─── Widget Container ─────────────────────────────────── */
#maria-chat-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 100000;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-size: 15px;
}

/* ─── Toggle Button ─────────────────────────────────────── */
#maria-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #acd126 0%, #7fa81e 100%);
  color: #111;
  border: none;
  border-radius: 50px;
  padding: 12px 20px 12px 14px;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(172, 209, 38, 0.45), 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  font-weight: 600;
  letter-spacing: 0.01em;
  user-select: none;
}

#maria-toggle:hover {
  transform: scale(1.07) translateY(-2px);
  box-shadow: 0 12px 40px rgba(172, 209, 38, 0.6), 0 4px 15px rgba(0, 0, 0, 0.4);
}

#maria-toggle:active {
  transform: scale(0.97);
}

.maria-toggle-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1c2140 0%, #131629 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #acd126;
  position: relative;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.maria-led {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #22c55e;
  position: absolute;
  bottom: 0;
  right: 0;
  border: 2px solid #acd126;
  box-shadow: 0 0 6px #22c55e, 0 0 12px rgba(34, 197, 94, 0.5);
  animation: maria-led-pulse 2s ease-in-out infinite;
}

@keyframes maria-led-pulse {

  0%,
  100% {
    box-shadow: 0 0 4px #22c55e, 0 0 10px rgba(34, 197, 94, 0.4);
    opacity: 1;
  }

  50% {
    box-shadow: 0 0 8px #22c55e, 0 0 22px rgba(34, 197, 94, 0.7);
    opacity: 0.85;
  }
}

.maria-toggle-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.maria-toggle-label {
  font-size: 13px;
  font-weight: 700;
  color: #0f1221;
  letter-spacing: 0.02em;
}

.maria-toggle-sub {
  font-size: 11px;
  color: rgba(15, 18, 33, 0.65);
  font-weight: 500;
}

.maria-notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #e63535;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #acd126;
  animation: maria-badge-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes maria-badge-pop {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

/* ─── Chat Window ───────────────────────────────────────── */
#maria-window {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 370px;
  max-height: 560px;
  background: rgba(19, 22, 41, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(172, 209, 38, 0.2);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(172, 209, 38, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform-origin: bottom right;
  animation: maria-window-open 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#maria-window.closing {
  animation: maria-window-close 0.25s ease forwards;
}

@keyframes maria-window-open {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes maria-window-close {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  to {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
}

/* ─── Header ────────────────────────────────────────────── */
.maria-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(172, 209, 38, 0.12) 0%, rgba(172, 209, 38, 0.05) 100%);
  border-bottom: 1px solid rgba(172, 209, 38, 0.15);
  position: relative;
}

.maria-header-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #acd126 0%, #7fa81e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: #0f1221;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 4px 15px rgba(172, 209, 38, 0.3);
}

.maria-header-led {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22c55e;
  position: absolute;
  bottom: 1px;
  right: 1px;
  border: 2px solid #131629;
  box-shadow: 0 0 6px #22c55e;
  animation: maria-led-pulse 2s ease-in-out infinite;
}

.maria-header-info {
  flex: 1;
}

.maria-header-name {
  font-size: 15px;
  font-weight: 700;
  color: #eef0f8;
  letter-spacing: 0.01em;
}

.maria-header-status {
  font-size: 12px;
  color: #22c55e;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

.maria-header-status::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: maria-led-pulse 2s ease-in-out infinite;
}

.maria-close-btn {
  background: rgba(255, 255, 255, 0.07);
  border: none;
  color: #8892b0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.maria-close-btn:hover {
  background: rgba(230, 53, 53, 0.2);
  color: #e63535;
  transform: scale(1.1);
}

/* ─── Messages Area ─────────────────────────────────────── */
.maria-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.maria-messages::-webkit-scrollbar {
  width: 4px;
}

.maria-messages::-webkit-scrollbar-track {
  background: transparent;
}

.maria-messages::-webkit-scrollbar-thumb {
  background: rgba(172, 209, 38, 0.3);
  border-radius: 4px;
}

/* ─── Message Bubbles ───────────────────────────────────── */
.maria-msg {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  animation: maria-msg-in 0.3s ease forwards;
}

@keyframes maria-msg-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.maria-msg.user {
  flex-direction: row-reverse;
}

.maria-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #acd126, #7fa81e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #0f1221;
  flex-shrink: 0;
}

.maria-msg-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
  border: 1px solid #ffffff2b;
  background-color: rgba(172, 209, 38, 0.1);
}

.maria-msg.agent .maria-msg-bubble {
  background: rgba(172, 209, 38, 0.1);
  border: 1px solid rgba(172, 209, 38, 0.18);
  color: #eef0f8;
  border-bottom-left-radius: 4px;
}

.maria-msg.user .maria-msg-bubble {
  background: linear-gradient(135deg, #acd126 0%, #8bab18 100%);
  color: #0f1221;
  font-weight: 500;
  border-bottom-right-radius: 4px;
  border: none;
}

/* Links inside agent bubbles */
.maria-msg.agent .maria-msg-bubble a {
  color: #acd126;
  text-decoration: underline;
}

/* Bold text inside bubbles */
.maria-msg-bubble strong {
  font-weight: 700;
}

/* ─── Typing Indicator ──────────────────────────────────── */
.maria-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
  background: rgba(172, 209, 38, 0.07);
  border: 1px solid rgba(172, 209, 38, 0.15);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}

.maria-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #acd126;
  animation: maria-dot 1.2s ease-in-out infinite;
}

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

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

@keyframes maria-dot {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

/* ─── Input Area ────────────────────────────────────────── */
.maria-input-area {
  padding: 12px 14px;
  border-top: 1px solid rgba(172, 209, 38, 0.12);
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: rgba(15, 18, 33, 0.6);
}

#maria-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(172, 209, 38, 0.2);
  border-radius: 12px;
  padding: 10px 14px;
  color: #eef0f8;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
  line-height: 1.5;
  max-height: 120px;
  overflow-y: auto;
}

#maria-input::placeholder {
  color: #5a6480;
}

#maria-input:focus {
  border-color: rgba(172, 209, 38, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

#maria-send {
  background: linear-gradient(135deg, #acd126, #7fa81e);
  border: none;
  border-radius: 12px;
  color: #0f1221;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

#maria-send:hover {
  transform: scale(1.12);
  box-shadow: 0 4px 15px rgba(172, 209, 38, 0.4);
}

#maria-send:active {
  transform: scale(0.95);
}

#maria-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ─── Welcome Prompt ────────────────────────────────────── */
.maria-welcome-hint {
  position: absolute;
  bottom: 78px;
  right: 0;
  background: rgba(19, 22, 41, 0.97);
  border: 1px solid rgba(172, 209, 38, 0.25);
  border-radius: 14px;
  padding: 12px 16px;
  width: 240px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  animation: maria-hint-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 3s both;
  pointer-events: none;
}

@keyframes maria-hint-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.maria-welcome-hint p {
  font-size: 13px;
  color: #eef0f8;
  margin: 0;
  line-height: 1.5;
}

.maria-welcome-hint::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 22px;
  width: 14px;
  height: 14px;
  background: rgba(19, 22, 41, 0.97);
  border-right: 1px solid rgba(172, 209, 38, 0.25);
  border-bottom: 1px solid rgba(172, 209, 38, 0.25);
  transform: rotate(45deg);
}

.maria-hint-name {
  color: #acd126;
  font-weight: 700;
}

/* ─── Powered by ────────────────────────────────────────── */
.maria-footer {
  text-align: center;
  padding: 6px 10px 10px;
  font-size: 10.5px;
  color: #5a6480;
  background: rgba(15, 18, 33, 0.4);
}

.maria-footer a {
  color: #acd126;
  text-decoration: none;
}

/* ─── Mobile responsive ─────────────────────────────────── */
@media (max-width: 480px) {
  #maria-chat-widget {
    bottom: 16px;
    right: 16px;
    left: auto;
  }

  #maria-window {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
    border: none;
    z-index: 99999;
  }

  #maria-toggle {
    float: none;
  }
}