/* ═══════════════════════════════════════════════
   Biznez Klinik — Toast Notification Component
   ═══════════════════════════════════════════════ */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 380px;
  width: auto;
  min-width: 280px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px 20px;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  border-left: 4px solid #1565C0;
  z-index: 10000;
  overflow: hidden;
  cursor: pointer;
  font-family: 'DM Sans', 'Inter', -apple-system, sans-serif;

  /* Hidden state */
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;  
  visibility: hidden;
}

/* Visible state — toggled by JS */
.toast--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

/* ── Icon ── */
.toast__icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Message ── */
#toastMsg {
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.5;
  flex: 1;
}

/* ── Progress Bar ── */
.toast__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background: #1565C0;
  transform-origin: left;
}

.toast--visible .toast__progress {
  animation: toast-progress var(--toast-duration, 5000ms) linear forwards;
}

@keyframes toast-progress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ═══════════════════════════════════════════════
   Type Modifiers
   ═══════════════════════════════════════════════ */

/* Success */
.toast--success                  { border-left-color: #10913B; }
.toast--success .toast__progress { background: #10913B; }

/* Error */
.toast--error                    { border-left-color: #D32F2F; }
.toast--error .toast__progress   { background: #D32F2F; }

/* Warning */
.toast--warning                  { border-left-color: #F57C00; }
.toast--warning .toast__progress { background: #F57C00; }

/* Info */
.toast--info                     { border-left-color: #1565C0; }
.toast--info .toast__progress    { background: #1565C0; }

/* ═══════════════════════════════════════════════
   Mobile — full-width bottom-anchored
   ═══════════════════════════════════════════════ */

@media (max-width: 480px) {
  .toast {
    bottom: 0;
    right: 0;
    left: 0;
    max-width: none;
    width: 100%;
    min-width: 0;
    border-radius: 5px 5px 0 0;
  }
}

/***Tooltips***/
#app-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(26,26,26,0.75);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 14px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 999999;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#app-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}