/* mco-ui.css — Modais e toasts padrão do Hub MCO */

.mco-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(8, 14, 35, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .18s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.mco-modal-backdrop.is-open { opacity: 1; }

.mco-modal {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(2, 8, 30, .35), 0 2px 6px rgba(2, 8, 30, .12);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  transform: translateY(8px) scale(.98);
  transition: transform .22s cubic-bezier(.2,.8,.2,1);
  display: flex;
  flex-direction: column;
}
.mco-modal-backdrop.is-open .mco-modal { transform: translateY(0) scale(1); }

.mco-modal-head {
  padding: 20px 22px 6px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.mco-modal-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
}
.mco-modal-icon.is-info    { background: #dbeafe; color: #1d4ed8; }
.mco-modal-icon.is-success { background: #d1fae5; color: #047857; }
.mco-modal-icon.is-warn    { background: #fef3c7; color: #b45309; }
.mco-modal-icon.is-danger  { background: #fee2e2; color: #b91c1c; }
.mco-modal-icon.is-prompt  { background: #ede9fe; color: #6d28d9; }

.mco-modal-titlewrap { flex: 1 1 auto; min-width: 0; }
.mco-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  margin: 4px 0 6px;
  word-wrap: break-word;
}
.mco-modal-msg {
  font-size: 14px;
  color: #475569;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.mco-modal-body { padding: 6px 22px 0; }
.mco-modal-input {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  margin-top: 12px;
  transition: border-color .15s, background .15s, box-shadow .15s;
  box-sizing: border-box;
  font-family: inherit;
}
.mco-modal-input:focus {
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
textarea.mco-modal-input { resize: vertical; min-height: 80px; }

.mco-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 18px 22px 20px;
  margin-top: 4px;
}
.mco-modal-btn {
  border: 0;
  padding: 10px 18px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform .08s, box-shadow .15s, background .15s, color .15s, border-color .15s;
  min-width: 88px;
}
.mco-modal-btn:active { transform: translateY(1px); }
.mco-modal-btn:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

.mco-modal-btn.is-cancel {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}
.mco-modal-btn.is-cancel:hover { background: #e2e8f0; }

.mco-modal-btn.is-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .25);
}
.mco-modal-btn.is-primary:hover { box-shadow: 0 6px 18px rgba(37, 99, 235, .35); }

.mco-modal-btn.is-danger {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, .25);
}
.mco-modal-btn.is-danger:hover { box-shadow: 0 6px 18px rgba(220, 38, 38, .35); }

@media (max-width: 480px) {
  .mco-modal { max-width: 100%; border-radius: 14px; }
  .mco-modal-head { padding: 18px 18px 4px; }
  .mco-modal-body { padding: 4px 18px 0; }
  .mco-modal-actions { padding: 16px 18px 18px; flex-direction: column-reverse; }
  .mco-modal-btn { width: 100%; }
}

/* Toasts (notificação não bloqueante) */
.mco-toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: calc(100vw - 36px);
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.mco-toast {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(2, 8, 30, .18), 0 1px 3px rgba(2, 8, 30, .08);
  padding: 12px 16px 12px 14px;
  min-width: 260px;
  max-width: 380px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), opacity .25s;
  border-left: 4px solid #2563eb;
}
.mco-toast.is-show { transform: translateX(0); opacity: 1; }
.mco-toast.is-success { border-left-color: #059669; }
.mco-toast.is-warn    { border-left-color: #d97706; }
.mco-toast.is-danger  { border-left-color: #dc2626; }
.mco-toast.is-info    { border-left-color: #2563eb; }

.mco-toast-icon {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}
.mco-toast.is-success .mco-toast-icon { background: #d1fae5; color: #047857; }
.mco-toast.is-warn    .mco-toast-icon { background: #fef3c7; color: #b45309; }
.mco-toast.is-danger  .mco-toast-icon { background: #fee2e2; color: #b91c1c; }
.mco-toast.is-info    .mco-toast-icon { background: #dbeafe; color: #1d4ed8; }

.mco-toast-msg {
  flex: 1 1 auto;
  font-size: 13.5px;
  color: #1e293b;
  line-height: 1.4;
  word-wrap: break-word;
}
.mco-toast-close {
  background: none;
  border: 0;
  cursor: pointer;
  color: #94a3b8;
  font-size: 16px;
  padding: 0 2px;
  line-height: 1;
}
.mco-toast-close:hover { color: #475569; }

@media (max-width: 480px) {
  .mco-toast-stack { left: 12px; right: 12px; top: 12px; }
  .mco-toast { min-width: 0; max-width: 100%; }
}
