.fxatost {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(calc(-100% - 50%));
  background: #1c1c1e;
  color: #fff;
  border-radius: 12px;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  width: fit-content;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.fxatost.show {
  transform: translateX(-50%);
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

/* ── content area ── */
.fxatost-content {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  flex-grow: 1;
  min-width: 0;
}
.fxatost-content i {
  font-size: 20px;
  flex-shrink: 0;
}
.fxatost-content span {
  white-space: nowrap;
}

/* ── icon colors ── */
.fxatost.toast-success .fxatost-content i {
  color: #34c759;
}
.fxatost.toast-error .fxatost-content i {
  color: #ff3b30;
}
.fxatost.toast-warning .fxatost-content i {
  color: #ff9500;
}
.fxatost.toast-info .fxatost-content i {
  color: #007aff;
}

/* ── divider ── */
.fxatost-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  display: none;
}
.fxatost.has-actions .fxatost-divider,
.fxatost.has-close .fxatost-divider,
.fxatost.has-link .fxatost-divider {
  display: block;
}

/* ── actions area (confirm buttons) ── */
.fxatost-actions {
  display: none;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
}
.fxatost.has-actions .fxatost-actions {
  display: flex;
}

.fxatost-btn {
  border: none;
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    opacity 0.15s;
  line-height: 1;
}
.fxatost-btn:hover {
  opacity: 0.85;
}

.fxatost-btn-yes {
  background: #fff;
  color: #1c1c1e;
}
.fxatost-btn-no {
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
}
.fxatost-btn-no:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* ── close button ── */
.fxatost-close {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  font-size: 18px;
  cursor: pointer;
  padding: 6px 12px 6px 0;
  line-height: 1;
  display: none;
  transition: color 0.15s;
}
.fxatost-close:hover {
  color: #fff;
}
.fxatost.has-close .fxatost-close {
  display: block;
}

/* ── href link ── */
.fxatost-link {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  line-height: 1;
  display: none;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.fxatost-link:hover {
  opacity: 0.7;
}
.fxatost.has-link .fxatost-link {
  display: block;
}

/* ── responsive ── */
@media (max-width: 768px) {
  .fxatost {
    top: 16px;
    left: 50%;
    right: auto;
    width: fit-content;
    max-width: calc(100% - 32px);
    transform: translateX(calc(-100% - 50%));
  }
  .fxatost.show {
    transform: translateX(-50%);
  }
  .fxatost-content span {
    white-space: normal;
  }

  /* confirm: apilar icono+texto arriba, botones abajo */
  .fxatost.has-actions {
    flex-wrap: wrap;
    left: 16px;
    right: 16px;
    width: auto;
    max-width: none;
    transform: translateX(calc(-100% - 32px));
  }
  .fxatost.has-actions.show {
    transform: translateX(0);
  }
  .fxatost.has-actions .fxatost-content {
    width: 100%;
    padding-bottom: 8px;
  }
  .fxatost.has-actions .fxatost-divider {
    display: none;
  }
  .fxatost.has-actions .fxatost-actions {
    width: 100%;
    justify-content: flex-end;
    padding: 0 12px 10px 12px;
    gap: 6px;
  }
}
