/* ===== Container principal ===== */
.esb-cfn-container {
  position: fixed;
  z-index: 999999;
  pointer-events: none;
}

.esb-cfn-container.bottom-left {
  left: 16px;
  bottom: 16px;
}
.esb-cfn-container.bottom-right {
  right: 16px;
  bottom: 16px;
}
.esb-cfn-container.top-left {
  left: 16px;
  top: 16px;
}
.esb-cfn-container.top-right {
  right: 16px;
  top: 16px;
}

/* ===== Toast ===== */
.esb-cfn-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;

  width: 320px;
  max-width: 85vw;

  background: #111827;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);

  padding: 12px;
  margin-top: 10px;
  pointer-events: auto;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";

  animation: esb-cfn-in 0.35s ease both;
}

/* Links */
.esb-cfn-toast a {
  color: #93c5fd;
  text-decoration: underline;
}

/* Imagem */
.esb-cfn-toast .img {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: #222;
}
.esb-cfn-toast .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Corpo */
.esb-cfn-toast .body {
  flex: 1;
}
.esb-cfn-toast .title {
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 4px;
}
.esb-cfn-toast .price {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 6px;
}
.esb-cfn-toast .note {
  font-size: 12px;
  opacity: 0.95;
}

/* Botão fechar */
.esb-cfn-toast .close {
  background: none;
  border: 0;
  color: #9ca3af;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

/* ===== Animações ===== */
@keyframes esb-cfn-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.esb-cfn-exit {
  animation: esb-cfn-out 0.25s ease both;
}

@keyframes esb-cfn-out {
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* ===== Mobile - Tablets ===== */
@media (max-width: 768px) {
  .esb-cfn-container.bottom-left,
  .esb-cfn-container.bottom-right {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .esb-cfn-toast {
    width: auto;
    max-width: 100%;
  }
}

/* ===== Mobile - Smartphones ===== */
@media (max-width: 480px) {
  .esb-cfn-container {
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    top: auto !important;
  }

  .esb-cfn-toast {
    width: auto;
    max-width: 100%;
    padding: 10px;
    gap: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  }

  .esb-cfn-toast .title {
    font-size: 13px;
  }

  .esb-cfn-toast .price {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .esb-cfn-toast .note {
    font-size: 11px;
  }

  .esb-cfn-toast .close {
    font-size: 20px;
    padding: 4px;
  }

  .esb-cfn-toast .img {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
  }
}

/* ===== Mobile muito pequeno ===== */
@media (max-width: 360px) {
  .esb-cfn-container {
    left: 4px !important;
    right: 4px !important;
    bottom: 4px !important;
  }

  .esb-cfn-toast {
    padding: 8px;
    gap: 8px;
  }

  .esb-cfn-toast .title {
    font-size: 12px;
  }

  .esb-cfn-toast .note {
    font-size: 10px;
  }
}
