/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  background: white;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 300px;
  max-width: 400px;
  pointer-events: all;
  animation: slideInRight 0.3s ease-out;
  border-left: 4px solid var(--primary);
}

.toast.toast-closing {
  animation: slideOutRight 0.3s ease-in forwards;
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 4px 0;
  color: #1a1a1a;
}

.toast-message {
  font-size: 14px;
  margin: 0;
  color: #4a4a4a;
  word-wrap: break-word;
}

.toast-close {
  background: none;
  border: none;
  color: #9a9a9a;
  cursor: pointer;
  padding: 0;
  margin: 0;
  margin-left: 8px;
  font-size: 18px;
  flex-shrink: 0;
  transition: color 0.2s;
  line-height: 1;
}

.toast-close:hover {
  color: #1a1a1a;
}

/* Toast types */
.toast.toast-success {
  border-left-color: #28a745;
}

.toast.toast-success .toast-icon {
  color: #28a745;
}

.toast.toast-error {
  border-left-color: #dc3545;
}

.toast.toast-error .toast-icon {
  color: #dc3545;
}

.toast.toast-warning {
  border-left-color: #ffc107;
}

.toast.toast-warning .toast-icon {
  color: #ffc107;
}

.toast.toast-info {
  border-left-color: #17a2b8;
}

.toast.toast-info .toast-icon {
  color: #17a2b8;
}

/* Animations */
@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}


/* ========================================
   MODAL DIALOGS
   ======================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.modal-overlay.modal-closing {
  animation: fadeOut 0.2s ease-in forwards;
}

.modal-dialog {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: scaleIn 0.2s ease-out;
}

.modal-closing .modal-dialog {
  animation: scaleOut 0.2s ease-in forwards;
}

.modal-header {
  padding: 24px 24px 16px 24px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
}

.modal-close-btn {
  background: none;
  border: none;
  color: #9a9a9a;
  cursor: pointer;
  padding: 4px;
  margin: 0;
  font-size: 24px;
  line-height: 1;
  transition: color 0.2s;
  border-radius: 4px;
}

.modal-close-btn:hover {
  color: #1a1a1a;
  background: #f5f5f5;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  background-color: #eff0eb;
}

.modal-footer {
  padding: 16px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* Modal types */

.modal-dialog .modal-title {
  color: var(--primary);
}

.modal-dialog .modal-header {
  border-bottom-color: #006880;
}

/* Error list in modal */
.modal-error-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.modal-error-list li {
  padding: 8px 12px;
  margin-bottom: 8px;
  background: #f8d7da;
  border-left: 3px solid #dc3545;
  border-radius: 4px;
  color: #721c24;
  font-size: 14px;
}

.modal-error-list li:last-child {
  margin-bottom: 0;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes scaleOut {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(0.9);
    opacity: 0;
  }
}

/* Responsive */
@media (max-width: 640px) {
  .toast-container {
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .toast {
    min-width: 0;
    max-width: none;
  }

  .modal-dialog {
    max-width: 100%;
    border-radius: 12px 12px 0 0;
    margin-top: auto;
    max-height: 95vh;
  }
}
