:root {
  --color-background: white;
  --color-fillground: #e0e0e0;
  --color-shadow: rgba(0, 0, 0, 0.1);
  --color-text: #333;
  --color-primary: #4a90e2;
  --color-primary-hover: #3a7bc8;
  --color-secondary: #f0f0f0;
  --color-secondary-hover: #e0e0e0;
}

.alert-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  z-index: 9999;
}

.alert {
  background-color: var(--color-background);
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 10px var(--color-shadow);
  margin-bottom: 10px;
  width: 300px;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.3s, transform 0.9s, margin-bottom 0.3s;
}

.alert.show {
  opacity: 1;
  transform: translateX(0);
}

.alert.closing {
  margin-bottom: -80px;
  opacity: 0;
}

.alert-content {
  display: flex;
  align-items: center;
}

.alert-icon {
  margin-right: 15px;
  width: 24px;
  height: 24px;
}

.alert-message {
  font-family: Arial, sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text);
  flex-grow: 1;
}

.alert-buttons {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.alert-progress {
  height: 3px;
  background-color: var(--color-progress-bg);
  margin-top: 10px;
  border-radius: 1.5px;
  overflow: hidden;
  position: relative;
}

.alert-progress::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 100%;
  background-color: var(--color-primary);
  transform: translateX(0);
  animation: progress-load 4s linear forwards;
}

@keyframes progress-load {
  0% {
    transform: translateX(0); /* Inicia al 100% */
  }
  100% {
    transform: translateX(-100%); /* Termina al 0% */
  }
}

.alert-button {
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
}

.alert-button.primary {
  background-color: var(--color-primary);
  color: white;
  border: none;
}

.alert-button.primary:hover {
  background-color: var(--color-primary-hover);
}

.alert-button.secondary {
  background-color: var(--color-secondary);
  color: var(--color-text);
  border: 1px solid var(--color-secondary);
  margin-right: 8px;
}

.alert-button.secondary:hover {
  background-color: var(--color-secondary-hover);
}

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

.loading-animation {
  animation: spin 2s linear infinite;
}
