/**
 * Toast Notification Styles
 * Tražilica Posla v0.3.0
 */

/* Toast Container */
.toast-container {
  position: fixed;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  max-width: 400px;
  pointer-events: none;
}

/* Position variants */
.toast-top-right {
  top: 0;
  right: 0;
}

.toast-top-left {
  top: 0;
  left: 0;
}

.toast-bottom-right {
  bottom: 0;
  right: 0;
}

.toast-bottom-left {
  bottom: 0;
  left: 0;
}

.toast-top-center {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.toast-bottom-center {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* Toast Base */
.toast {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  max-width: 100%;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

.toast-top-left .toast,
.toast-bottom-left .toast {
  transform: translateX(-100%);
}

.toast-top-center .toast,
.toast-bottom-center .toast {
  transform: translateY(-100%);
}

.toast-bottom-center .toast {
  transform: translateY(100%);
}

/* Toast Show State */
.toast-show {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

/* Toast Hide State */
.toast-hide {
  opacity: 0;
  transform: translateX(100%);
}

.toast-top-left .toast-hide,
.toast-bottom-left .toast-hide {
  transform: translateX(-100%);
}

.toast-top-center .toast-hide,
.toast-bottom-center .toast-hide {
  transform: translateY(-100%);
}

/* Toast Icon */
.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

/* Toast Message */
.toast-message {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
}

/* Toast Close Button */
.toast-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #666;
  transition: all 0.2s;
}

.toast-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

/* Type: Success */
.toast-success {
  border-left: 4px solid #28a745;
}

.toast-success .toast-icon {
  background: #d4edda;
  color: #28a745;
}

/* Type: Error */
.toast-error {
  border-left: 4px solid #dc3545;
}

.toast-error .toast-icon {
  background: #f8d7da;
  color: #dc3545;
}

/* Type: Warning */
.toast-warning {
  border-left: 4px solid #ffc107;
}

.toast-warning .toast-icon {
  background: #fff3cd;
  color: #856404;
}

/* Type: Info */
.toast-info {
  border-left: 4px solid #17a2b8;
}

.toast-info .toast-icon {
  background: #d1ecf1;
  color: #17a2b8;
}

/* Dark Mode Support */
[data-theme="dark"] .toast {
  background: #2d2d2d;
  color: #f0f0f0;
}

[data-theme="dark"] .toast-message {
  color: #f0f0f0;
}

[data-theme="dark"] .toast-close {
  color: #ccc;
}

[data-theme="dark"] .toast-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Responsive */
@media (max-width: 480px) {
  .toast-container {
    padding: 15px;
    max-width: calc(100vw - 30px);
  }
  
  .toast {
    min-width: 0;
    padding: 12px 16px;
  }
  
  .toast-message {
    font-size: 13px;
  }
}
