@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

/* Container for the alerts */
#alert-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 90%;
  max-width: 24rem;
  margin-right: 100px;
}

/* Individual alert styling */
.alert {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  color: white;
  transform: translateX(120%);
  transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
  opacity: 0;
}

.alert.show {
  transform: translateX(0);
  opacity: 1;
}

.alert-error {
  background-color: #ef4444;
  /* red-500 */
}

.alert-success {
  background-color: #22c55e;
  /* green-500 */
}

.alert-info {
  background-color: #3b82f6;
  /* blue-500 */
}

.alert-icon {
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.75rem;
}

.alert-content {
  flex-grow: 1;
}

.alert-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.alert-message {
  font-weight: 400;
  font-size: 0.875rem;
}


/* new */




/*
 * Custom Alert Styles
 * These styles provide a modern, fixed-position, and animated notification.
 */

/* 1. Alert Container */
#alert-container {
  position: fixed;
  top: 1.5rem;
  /* 24px - position from top */
  right: 1.5rem;
  /* 24px - position from right */
  z-index: 50;
  /* Tailwind z-50 for high stacking order */
  display: flex;
  flex-direction: column;
  gap: 1rem;
  /* Space between multiple alerts */
  width: 100%;
  max-width: 320px;
  /* Max width for a clean look on desktop */
  pointer-events: none;
  /* Allows clicks through the container */
}

/* 2. Individual Alert Wrapper (Handles position and transition) */
.alert-wrapper {
  pointer-events: auto;
  /* Re-enable pointer events for the alert itself */
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.alert-wrapper.show {
  opacity: 1;
  transform: translateX(0);
}

/* 3. Styled Alert Content (The actual visual block) */
.alert-content-styled {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  /* 12px 16px */
  background-color: #ffffff;
  /* White background */
  border-radius: 0.5rem;
  /* rounded-lg */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  /* shadow-xl */
  border-left-width: 0.5rem;
  /* Thicker left border for color */
  border-left-style: solid;
  /* The border color is set dynamically via PHP/JS class (border-red-500, etc.) */
}

/* 4. Icon Styles */
.alert-icon {
  width: 1.5rem;
  /* w-6 */
  height: 1.5rem;
  /* h-6 */
  margin-right: 0.75rem;
  /* mr-3 */
  flex-shrink: 0;
  /* Prevents icon from shrinking */
}

/* 5. Text Container */
.alert-text-container {
  flex-grow: 1;
  line-height: 1.25;
}

/* 6. Title and Message */
.alert-title-styled {
  font-weight: 700;
  /* font-bold */
  color: #1f2937;
  /* text-gray-800 */
  font-size: 0.875rem;
  /* text-sm */
  margin-bottom: 0.125rem;
}

.alert-message-styled {
  font-weight: 500;
  /* font-medium */
  color: #6b7280;
  /* text-gray-500 */
  font-size: 0.75rem;
  /* text-xs */
}

/* 7. Close Button */
.alert-close-btn {
  margin-left: 0.75rem;
  padding: 0.25rem;
  border-radius: 0.375rem;
  background-color: transparent;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  /* text-gray-400 */
  transition: color 0.2s;
  flex-shrink: 0;
}

.alert-close-btn:hover {
  color: #6b7280;
  /* text-gray-500 */
  background-color: #f3f4f6;
  /* hover:bg-gray-100 */
}

.alert-close-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
}