/*
 * CVDB - Informativos UI
 * Versão: 20260718_06 (V266)
 * Escopo: layout dos informativos/alertas do frontend.
 * Regras e rotinas de negócio: preservadas.
 */

:root {
  --cvdb-info-bg: rgba(7, 17, 41, 0.92);
  --cvdb-info-panel: linear-gradient(180deg, rgba(18, 31, 67, 0.98), rgba(9, 19, 44, 0.98));
  --cvdb-info-border: rgba(88, 132, 255, 0.38);
  --cvdb-info-border-strong: rgba(110, 152, 255, 0.60);
  --cvdb-info-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
  --cvdb-info-text: #eef4ff;
  --cvdb-info-text-soft: rgba(222, 231, 255, 0.74);
  --cvdb-info-blue: #3d7bff;
  --cvdb-info-blue-soft: rgba(61, 123, 255, 0.18);
  --cvdb-info-success: #18c37e;
  --cvdb-info-warning: #ffb547;
  --cvdb-info-error: #ff6b7d;
}

.cvdb-info-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(2, 7, 22, 0.58);
  backdrop-filter: blur(10px);
  z-index: 99998;
  padding: 24px;
}

.cvdb-info-overlay.is-open {
  display: flex;
}

.cvdb-info-modal {
  width: min(540px, calc(100vw - 32px));
  color: var(--cvdb-info-text);
  background: var(--cvdb-info-panel);
  border: 1px solid var(--cvdb-info-border);
  border-radius: 18px;
  box-shadow: var(--cvdb-info-shadow);
  overflow: hidden;
}

.cvdb-info-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(110, 152, 255, 0.16);
}

.cvdb-info-modal__title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.cvdb-info-modal__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  background: var(--cvdb-info-blue-soft);
  border: 1px solid var(--cvdb-info-border-strong);
  color: #dbe7ff;
  flex-shrink: 0;
}

.cvdb-info-modal[data-type="success"] .cvdb-info-modal__icon {
  background: rgba(24, 195, 126, 0.16);
  border-color: rgba(24, 195, 126, 0.44);
  color: #a7ffd6;
}

.cvdb-info-modal[data-type="warning"] .cvdb-info-modal__icon {
  background: rgba(255, 181, 71, 0.16);
  border-color: rgba(255, 181, 71, 0.44);
  color: #ffe2ad;
}

.cvdb-info-modal[data-type="error"] .cvdb-info-modal__icon {
  background: rgba(255, 107, 125, 0.16);
  border-color: rgba(255, 107, 125, 0.44);
  color: #ffd0d6;
}

.cvdb-info-modal__eyebrow {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cvdb-info-text-soft);
}

.cvdb-info-modal__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--cvdb-info-text);
}

.cvdb-info-modal__close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(110, 152, 255, 0.26);
  background: rgba(255, 255, 255, 0.02);
  color: var(--cvdb-info-text);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.cvdb-info-modal__close:hover {
  transform: translateY(-1px);
  border-color: rgba(110, 152, 255, 0.44);
  background: rgba(61, 123, 255, 0.08);
}

.cvdb-info-modal__body {
  padding: 18px 20px 8px;
}

.cvdb-info-modal__message {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(235, 243, 255, 0.92);
}

.cvdb-info-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 20px 20px;
}

.cvdb-info-button {
  min-width: 108px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid rgba(103, 142, 255, 0.42);
  background: linear-gradient(180deg, rgba(34, 79, 201, 0.96), rgba(47, 94, 222, 0.96));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(35, 83, 214, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.cvdb-info-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 14px 26px rgba(35, 83, 214, 0.32);
}

.cvdb-info-button:active {
  transform: translateY(0);
}

.cvdb-info-button--secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(145, 169, 224, 0.34);
  color: rgba(238, 244, 255, 0.90);
  box-shadow: none;
}

.cvdb-info-button--secondary:hover {
  background: rgba(61, 123, 255, 0.10);
  box-shadow: none;
}

.cvdb-info-toasts {
  position: fixed;
  top: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 99997;
  pointer-events: none;
}

.cvdb-info-toast {
  width: min(390px, calc(100vw - 32px));
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(18, 31, 67, 0.98), rgba(9, 19, 44, 0.98));
  color: var(--cvdb-info-text);
  border: 1px solid rgba(103, 142, 255, 0.30);
  box-shadow: var(--cvdb-info-shadow);
  pointer-events: auto;
}

.cvdb-info-toast__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(61, 123, 255, 0.14);
  border: 1px solid rgba(103, 142, 255, 0.34);
}

.cvdb-info-toast[data-type="success"] .cvdb-info-toast__icon {
  background: rgba(24, 195, 126, 0.14);
  border-color: rgba(24, 195, 126, 0.34);
  color: #a7ffd6;
}

.cvdb-info-toast[data-type="warning"] .cvdb-info-toast__icon {
  background: rgba(255, 181, 71, 0.14);
  border-color: rgba(255, 181, 71, 0.34);
  color: #ffe2ad;
}

.cvdb-info-toast[data-type="error"] .cvdb-info-toast__icon {
  background: rgba(255, 107, 125, 0.14);
  border-color: rgba(255, 107, 125, 0.34);
  color: #ffd0d6;
}

.cvdb-info-toast__content {
  min-width: 0;
  flex: 1;
}

.cvdb-info-toast__title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 800;
  color: var(--cvdb-info-text);
}

.cvdb-info-toast__message {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(235, 243, 255, 0.82);
  white-space: pre-wrap;
  word-break: break-word;
}

.cvdb-inline-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(103, 142, 255, 0.24);
  background: linear-gradient(180deg, rgba(19, 34, 74, 0.84), rgba(10, 20, 48, 0.84));
  color: rgba(238, 244, 255, 0.94);
}

.cvdb-inline-info::before {
  content: "i";
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(61, 123, 255, 0.18);
  border: 1px solid rgba(103, 142, 255, 0.34);
  color: #dce8ff;
  font-weight: 800;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .cvdb-info-modal__header,
  .cvdb-info-modal__body,
  .cvdb-info-modal__footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cvdb-info-modal__title {
    font-size: 18px;
  }

  .cvdb-info-button {
    width: 100%;
  }

  .cvdb-info-modal__footer {
    justify-content: stretch;
  }
}
