/* ===== Contenedor flotante ===== */
.mio-floating-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* ===== Icono de Mio ===== */
.mio-icon-wrapper {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mio-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.6s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}

.mio-icon-wrapper:hover .mio-icon {
  transform: scale(1.15) rotateY(360deg);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* ===== Tooltip ===== */
.mio-tooltip {
  position: absolute;
  right: 72px;
  top: 50%;
  transform: translateY(-50%);
  background-color: #333;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mio-tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent transparent #333;
}

.mio-icon-wrapper:hover .mio-tooltip {
  opacity: 1;
}

/* ===== Popup ===== */
.mio-popup {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 340px;
  max-height: 480px;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  padding: 20px;
  animation: mioSlideUp 0.25s ease-out;
}

@keyframes mioSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Header del popup ===== */
.mio-popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.mio-popup-header h5 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

.mio-popup-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

/* ===== Formulario ===== */
.mio-popup-form .form-group {
  margin-bottom: 10px;
}

.mio-popup-form label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 3px;
}

.mio-popup-form .form-control {
  font-size: 13px;
  border-radius: 6px;
}

.mio-popup-form .form-control:focus {
  border-color: #4a90d9;
  box-shadow: 0 0 0 0.15rem rgba(74, 144, 217, 0.25);
}

.mio-popup-form textarea {
  resize: vertical;
}

.mio-popup-form .btn-primary {
  background-color: #4a90d9;
  border-color: #4a90d9;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.mio-popup-form .btn-primary:hover:not(:disabled) {
  background-color: #3a7bc8;
  border-color: #3a7bc8;
}

.mio-popup-form .text-danger {
  font-size: 11px;
}

/* ===== Estado de carga ===== */
.mio-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 16px;
}

.mio-loading p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #555;
}

.mio-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e0e0e0;
  border-top-color: #4a90d9;
  border-radius: 50%;
  animation: mioSpin 0.8s linear infinite;
}

@keyframes mioSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== Responsive ===== */
@media (max-width: 400px) {
  .mio-popup {
    width: 290px;
    right: -8px;
  }
}