/* ============================= */
/* BASE */
/* ============================= */


/* ============================= */
/* FLOATING MIRA BUTTON */
/* ============================= */

#mira-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}

/* Toggle button */
#mira-toggle {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  font-size: 36px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  transition: transform 0.2s ease;
}

#mira-toggle:hover {
  transform: scale(1.1);
}

/* IMPORTANT: REMOVE position: fixed FROM HERE */
#mira-box {
  margin-bottom: 20px;
  width: 380px;
  height: 500px;
  background: #0f172a;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
  overflow: hidden;
}

/* Fade animation */
@keyframes miraFade {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== FIX DROPDOWN HOVER CONFLICT ===== */

#mira-toggle,
#mira-box {
  pointer-events: auto;
}

#mira-box.hidden {
  display: none !important;
  pointer-events: none;
}

/* ============================= */
/* HEADER */
/* ============================= */

.mira-header {
  background: #111c33;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  border-bottom: 1px solid #1e293b;
}

.mira-header button {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 16px;
}

.mira-header button:hover {
  color: white;
}


/* ============================= */
/* MESSAGES */
/* ============================= */

.mira-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  font-size: 14px;
}

.mira-msg.user {
  text-align: right;
  margin-bottom: 10px;
  color: #38bdf8;
}

.mira-msg.bot {
  margin-bottom: 10px;
  color: #e2e8f0;
}


/* ============================= */
/* INPUT */
/* ============================= */

.mira-input {
  display: flex;
  padding: 12px;
  background: #111827;
  gap: 10px;
  border-top: 1px solid #1e293b;
}

.mira-input input {
  flex: 1;
  padding: 14px;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 10px;
  color: white;
  outline: none;
  font-size: 14px;
}

.mira-input input:focus {
  border-color: #2563eb;
}

.mira-input button {
  background: #2563eb;
  border: none;
  padding: 0 18px;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}

.mira-input button:hover {
  background: #1d4ed8;
}


/* ============================= */
/* RESPONSIVE */
/* ============================= */

@media (max-width: 480px) {
  #mira-box {
    width: 92vw;
  }

  #mira-toggle {
    width: 80px;
    height: 80px;
    font-size: 32px;
  }
}
