/* Widget del asistente de Mireloworld */
.mw-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 900;
  display: inline-flex; align-items: center; gap: .6rem;
  min-height: 56px; padding: 0 1.3rem 0 1rem;
  background: #0cbccc; color: #05060e;
  border: 0; border-radius: 999px; cursor: pointer;
  font: 650 1rem/1 var(--font-body, system-ui, sans-serif);
  box-shadow: 0 10px 30px -8px rgba(5, 6, 14, .55);
  transition: transform .15s, background-color .15s;
}
.mw-fab:hover { background: #09a3b1; }
.mw-fab:active { transform: translateY(1px); }
.mw-fab svg { width: 26px; height: 26px; flex: none; }

.mw-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 950;
  width: 392px; max-width: calc(100vw - 24px);
  height: min(640px, calc(100dvh - 40px));
  display: none; flex-direction: column;
  background: #fff; color: #15297c;
  border-radius: 24px; overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(5, 6, 14, .6);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 1rem; line-height: 1.45;
}
.mw-panel.open { display: flex; }

.mw-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem .75rem .75rem 1.1rem;
  background: #05060e; color: #ffffff; flex: none;
}
.mw-head strong { font: 650 1.05rem var(--font-head, system-ui, sans-serif); }
.mw-close {
  width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
  background: transparent; color: #ffffff; font-size: 1.6rem; line-height: 1;
}
.mw-close:hover { background: rgba(255, 255, 255, .12); }

.mw-note {
  display: flex; align-items: flex-start; gap: .6rem; flex: none;
  padding: .55rem 1rem; background: #e1f1f5; color: #15297c;
  font-size: 13px; line-height: 1.35;
}
.mw-note b { flex: none; background: #0cbccc; color: #05060e; border-radius: 6px; padding: .1rem .4rem; font-size: 12px; }
.mw-note a { color: #15297c; }

.mw-msgs { flex: 1 1 auto; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; background: #f3f8fb; min-height: 0; }
.mw-m { max-width: 88%; padding: .6rem .85rem; border-radius: 16px; overflow-wrap: anywhere; font-size: .97rem; }
.mw-m a { color: inherit; font-weight: 600; }
.mw-m--bot { align-self: flex-start; background: #fff; border: 1px solid #cfe3ea; border-bottom-left-radius: 5px; }
.mw-m--bot a { color: #15297c; }
.mw-m--me { align-self: flex-end; background: #0cbccc; color: #05060e; border-bottom-right-radius: 5px; }
.mw-m--sys { align-self: center; background: transparent; color: #4c5f86; font-size: .88rem; text-align: center; }
.mw-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: .8rem .9rem; background: #fff; border: 1px solid #cfe3ea; border-radius: 16px; border-bottom-left-radius: 5px; }
.mw-typing i { width: 7px; height: 7px; border-radius: 50%; background: #8fa3c6; animation: mw-blink 1s infinite; }
.mw-typing i:nth-child(2) { animation-delay: .15s; }
.mw-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes mw-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.mw-sugg { flex: none; display: flex; gap: .5rem; overflow-x: auto; padding: .5rem 1rem; background: #f3f8fb; scrollbar-width: none; }
.mw-sugg::-webkit-scrollbar { display: none; }
.mw-sugg button {
  flex: none; white-space: nowrap; cursor: pointer; min-height: 40px;
  padding: .45rem .9rem; border-radius: 999px; border: 1.5px solid #bccbe8; background: #fff; color: #15297c;
  font: 500 .92rem var(--font-body, system-ui, sans-serif);
}
.mw-sugg button:hover { background: #e1f1f5; }

.mw-consent { flex: none; display: none; gap: .6rem; align-items: flex-start; padding: .6rem 1rem; background: #e1f1f5; color: #15297c; font-size: .88rem; }
.mw-consent.show { display: flex; }
.mw-consent input { width: 22px; height: 22px; flex: none; margin-top: .05rem; accent-color: #0cbccc; }
.mw-consent a { color: #15297c; }

.mw-form { flex: none; display: flex; gap: .5rem; align-items: flex-end; padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #cfe3ea; background: #fff; }
.mw-form textarea {
  flex: 1; min-height: 44px !important; max-height: 112px; resize: none; padding: .6rem .8rem;
  border: 1.5px solid #bccbe8; border-radius: 12px; font: 400 16px/1.35 var(--font-body, system-ui, sans-serif); color: #15297c; background: #fff;
}
.mw-form textarea:focus { outline: 3px solid #3dd4e0; outline-offset: 1px; border-color: #0cbccc; }
.mw-send {
  flex: none; min-height: 44px; padding: 0 1rem; border: 0; border-radius: 12px; cursor: pointer;
  background: #0cbccc; color: #05060e; font: 600 .95rem var(--font-body, system-ui, sans-serif);
}
.mw-send:hover { background: #09a3b1; }
.mw-send[disabled], .mw-form textarea[disabled] { opacity: .55; cursor: not-allowed; }
.mw-count { flex: none; text-align: center; font-size: 12px; color: #5f7396; padding: 0 1rem .5rem; background: #fff; }

.mw-fab:focus-visible, .mw-close:focus-visible, .mw-send:focus-visible, .mw-sugg button:focus-visible { outline: 3px solid #3dd4e0; outline-offset: 2px; }

@media (max-width: 640px) {
  .mw-fab { width: 56px; padding: 0; justify-content: center; right: 16px; bottom: 16px; }
  .mw-fab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .mw-panel { inset: 8px; width: auto; max-width: none; height: auto; max-height: none; border-radius: 20px; }
  .site-footer { padding-bottom: 5.5rem; }
  .legal { padding-bottom: 6rem; }
}
body.mw-lock { overflow: hidden; }
@media (min-width: 641px) { body.mw-lock { overflow: auto; } }
@media (prefers-reduced-motion: reduce) { .mw-typing i { animation: none; } .mw-fab { transition: none; } }
