/* spinner.css - Loading Spinner Overlay */

/* ==================== SPINNER OVERLAY ==================== */
.spinner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-lg);
  z-index: var(--z-modal);
  transition: opacity var(--transition-base);
}

.spinner-overlay.active {
  display: flex;
}

/* ==================== SPINNER ANIMATION ==================== */
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--neutral-200);
  border-top-color: var(--primary-500);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==================== SPINNER MESSAGE ==================== */
.spinner-message {
  font-size: var(--text-lg);
  font-weight: var(--font-medium);
  color: var(--neutral-700);
  text-align: center;
}

/* ==================== SPINNER SIZES ==================== */
.spinner-sm {
  width: 24px;
  height: 24px;
  border-width: 2px;
}

.spinner-lg {
  width: 64px;
  height: 64px;
  border-width: 5px;
}

/* ==================== INLINE SPINNER ==================== */
.spinner-inline {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

/* ==================== BUTTON SPINNER ==================== */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  color: white;
}



/* Add to the end of spinner.css if not already present */

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: calc(var(--z-modal) + 100);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 400px;
}

.modern-toast {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
    min-width: 300px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
}

.modern-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.toast-message {
    flex: 1;
    font-size: 0.9rem;
    color: var(--neutral-900);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--neutral-600);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--neutral-900);
}

/* Toast variants */
.toast-success {
    border-left: 4px solid var(--success-500);
}

.toast-success .toast-icon {
    color: var(--success-500);
}

.toast-error {
    border-left: 4px solid var(--error-500);
}

.toast-error .toast-icon {
    color: var(--error-500);
}

.toast-warning {
    border-left: 4px solid var(--warning-500);
}

.toast-warning .toast-icon {
    color: var(--warning-500);
}

.toast-info {
    border-left: 4px solid var(--primary-500);
}

.toast-info .toast-icon {
    color: var(--primary-500);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .toast-container {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }
    
    .modern-toast {
        min-width: auto;
        max-width: none;
    }
}