/* ========================================
   USER NOTIFICATIONS STYLES
   Unified notification system for user-facing pages
   ======================================== */

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-notification {
  min-width: 300px;
  max-width: 400px;
  padding: 16px 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: all;
  animation: slideInRight 0.3s ease-out;
  border-left: 4px solid #ddd;
  position: relative;
  overflow: hidden;
}

.toast-notification.hiding {
  animation: slideOutRight 0.3s ease-in forwards;
}

.toast-notification::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: currentColor;
  animation: shrinkWidth 5s linear;
}

/* Toast Icons */
.toast-notification .toast-icon {
  font-size: 24px;
  flex-shrink: 0;
}

/* Toast Content */
.toast-notification .toast-content {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

/* Toast Close Button */
.toast-notification .toast-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.toast-notification .toast-close:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* Toast Variants */
.toast-notification.toast-success {
  border-left-color: #28a745;
}

.toast-notification.toast-success .toast-icon {
  color: #28a745;
}

.toast-notification.toast-error {
  border-left-color: #dc3545;
}

.toast-notification.toast-error .toast-icon {
  color: #dc3545;
}

.toast-notification.toast-warning {
  border-left-color: #ffc107;
}

.toast-notification.toast-warning .toast-icon {
  color: #ffc107;
}

.toast-notification.toast-info {
  border-left-color: #17a2b8;
}

.toast-notification.toast-info .toast-icon {
  color: #17a2b8;
}

/* ===== INLINE NOTIFICATIONS ===== */
.notification-inline {
  margin-bottom: 20px;
  border-radius: 8px;
  border: none;
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.notification-inline i {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.notification-inline .btn-close {
  font-size: 12px;
  opacity: 0.5;
}

.notification-inline .btn-close:hover {
  opacity: 1;
}

.notification-inline ul {
  padding-left: 20px;
}

.notification-inline ul li {
  margin-bottom: 4px;
}

/* Override Bootstrap alert colors for better design */
.notification-inline.alert-success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  border-left: 4px solid #28a745;
}

.notification-inline.alert-danger {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
  border-left: 4px solid #dc3545;
}

.notification-inline.alert-warning {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  color: #856404;
  border-left: 4px solid #ffc107;
}

.notification-inline.alert-info {
  background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
  color: #0c5460;
  border-left: 4px solid #17a2b8;
}

/* ===== CONFIRMATION MODALS ===== */
.modal-content {
  border-radius: 12px;
}

.modal-header {
  padding: 20px 24px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.modal-body {
  padding: 24px;
  font-size: 15px;
  line-height: 1.6;
}

.modal-footer {
  padding: 16px 24px;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* Modal Buttons */
.modal-footer .btn {
  padding: 10px 24px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-footer .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Loading State */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ===== 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;
  }
}

@keyframes shrinkWidth {
  from {
    width: 100%;
  }
  to {
    width: 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 576px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }

  .toast-notification {
    min-width: auto;
    max-width: 100%;
  }

  .notification-inline {
    font-size: 13px;
    padding: 14px 16px;
  }

  .modal-dialog {
    margin: 10px;
  }
}
