@import url('funt.css');

/* =====================
   VARIABLES
===================== */
:root {
  --toast-radius: 4px;
  --toast-shadow: -1px 1px 10px rgba(0, 0, 0, 0.3);
  --toast-width: 300px;
  --toast-z: 1023;

  --success: #2ecc71;
  --danger: #e74c3c;
  --info: #3498db;
  --warning: #ebcc52;
}

/* =====================
   BUTTONS
===================== */
.toast-buttons {
  max-width: 700px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 2em auto;
}

.toast-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1em 0;
  padding: 1rem;
}

button.custom-toast {
  width: 150px;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--info);
  color: #2c2b37;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
  transition: filter 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

button.custom-toast:hover {
  filter: brightness(0.9);
  transform: translateY(-1px);
}

button.success-toast { background: var(--success); }
button.danger-toast  { background: var(--danger); }
button.info-toast    { background: var(--info); }
button.warning-toast { background: var(--warning); }

/* =====================
   TOAST CONTAINER
===================== */
.toast {
  position: fixed;
  top: 25px;
  right: 25px;
  max-width: var(--toast-width);
  padding: 0.5rem;
  background: #fff;
  border-radius: var(--toast-radius);
  box-shadow: var(--toast-shadow);
  z-index: var(--toast-z);
  transform: translateX(110%);
  animation: slideInRight 0.3s ease forwards,
             fadeOut 0.5s ease forwards 3s;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,
               'Open Sans', 'Helvetica Neue', sans-serif;
}

.toast.closing {
  animation: slideOutRight 0.5s ease forwards;
}

/* =====================
   CONTENT
===================== */
.toast-content-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast-icon {
  font-size: 1.5rem;
  padding: 0.35rem 0.5rem;
}

.toast-message {
  flex: 1;
  font-size: 0.9rem;
  padding: 0.5rem;
  color: #2c2b37;
}

/* =====================
   PROGRESS BAR
===================== */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background: #b7b7b7;
  animation: toastProgress 3s linear forwards;
}

/* =====================
   TYPES
===================== */
.toast-success { background: #95eab8; }
.toast-success .toast-progress { background: var(--success); }

.toast-danger { background: #fff; }
.toast-danger .toast-progress { background: #a26316; }

.toast-info { background: #bddaed; }
.toast-info .toast-progress { background: var(--info); }

.toast-warning { background: #f3d00b; color: #070101 }
.toast-warning .toast-progress { background: #fdd122; }

/* =====================
   HEADINGS
===================== */
h1 {
  color: #2c2b37;
}

/* =====================
   ANIMATIONS
===================== */
@keyframes slideInRight {
  from { transform: translateX(110%); }
  to   { transform: translateX(0); }
}

@keyframes slideOutRight {
  from { transform: translateX(0); }
  to   { transform: translateX(110%); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes toastProgress {
  from { width: 100%; }
  to   { width: 0%; }
}