/* ========================================
   ALERT COMPONENT STYLES
   ======================================== */

.alert-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  width: calc(100% - 4rem);
}

.alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1),
              0 8px 10px -6px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid;
  position: relative;
  overflow: hidden;
}

.alert::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  transition: width 0.3s ease;
}

.alert:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 35px -5px rgba(0, 0, 0, 0.15),
              0 10px 15px -6px rgba(0, 0, 0, 0.1);
}

.alert:hover::before {
  width: 6px;
}

.alert__content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  font-size: 0.9375rem;
  line-height: 1.5;
  font-weight: 500;
}

.alert__content i {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.alert__content span {
  flex: 1;
}

.alert__close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
}

.alert__close i {
  font-size: 1.25rem;
  transition: transform 0.2s ease;
}

.alert__close:hover i {
  transform: rotate(90deg);
}

/* Error Alert */
.alert--error {
  background: linear-gradient(135deg, 
    rgba(254, 242, 242, 0.95) 0%, 
    rgba(254, 226, 226, 0.95) 100%);
  border-color: rgba(239, 68, 68, 0.3);
  color: #991b1b;
}

.alert--error::before {
  background: var(--color-error);
}

.alert--error .alert__content i {
  color: var(--color-error);
}

.alert--error .alert__close {
  color: #991b1b;
}

.alert--error .alert__close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
}

/* Success Alert */
.alert--success {
  background: linear-gradient(135deg, 
    rgba(240, 253, 244, 0.95) 0%, 
    rgba(220, 252, 231, 0.95) 100%);
  border-color: rgba(34, 197, 94, 0.3);
  color: #166534;
}

.alert--success::before {
  background: var(--color-success);
}

.alert--success .alert__content i {
  color: var(--color-success);
}

.alert--success .alert__close {
  color: #166534;
}

.alert--success .alert__close:hover {
  background: rgba(34, 197, 94, 0.1);
  color: var(--color-success);
}

/* Warning Alert */
.alert--warning {
  background: linear-gradient(135deg, 
    rgba(254, 252, 232, 0.95) 0%, 
    rgba(254, 249, 195, 0.95) 100%);
  border-color: rgba(234, 179, 8, 0.3);
  color: #854d0e;
}

.alert--warning::before {
  background: var(--color-warning);
}

.alert--warning .alert__content i {
  color: var(--color-warning);
}

.alert--warning .alert__close {
  color: #854d0e;
}

.alert--warning .alert__close:hover {
  background: rgba(234, 179, 8, 0.1);
  color: var(--color-warning);
}

/* Animations */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.alert--closing {
  animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* Auto-hide progress bar */
.alert--auto-hide::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: currentColor;
  opacity: 0.3;
  animation: progressBar 5s linear forwards;
}

@keyframes progressBar {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .alert-container {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    width: calc(100% - 2rem);
    max-width: none;
  }

  .alert {
    padding: 0.875rem 1rem;
  }

  .alert__content {
    font-size: 0.875rem;
    gap: 0.625rem;
  }

  .alert__content i {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .alert-container {
    top: 0.5rem;
    right: 0.5rem;
    left: 0.5rem;
    width: calc(100% - 1rem);
  }

  .alert {
    padding: 0.75rem;
    border-radius: 0.5rem;
  }

  .alert__content {
    font-size: 0.8125rem;
  }
}
