/* Alert boxes */
.alert {
  padding: 15px 20px;
  margin: 15px 0;
  border: 1px solid;
  border-radius: var(--radius-medium);
  background: transparent;
  display: block;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Icon positioning for alerts - inline with text */
.alert i:first-child {
  display: inline-block;
  font-size: 18px;
  margin-right: 6px;
  vertical-align: middle;
  line-height: 1;
  position: relative;
  top: -2px;
}

/* Icon colors - distinct from alert color for better visibility */
.alert-info i:first-child {
  color: #64b5f6; /* Lighter blue that stands out */
}

.alert-success i:first-child {
  color: #81c784; /* Lighter green that stands out */
}

.alert-warning i:first-child {
  color: #ffb74d; /* Lighter orange that stands out */
}

.alert-error i:first-child,
.alert-danger i:first-child {
  color: #e57373; /* Lighter red that stands out */
}

/* Light theme icon colors - adjusted for contrast */
body.theme-light .alert-info i:first-child {
  color: #1976d2; /* Darker blue for light theme */
}

body.theme-light .alert-success i:first-child {
  color: #388e3c; /* Darker green for light theme */
}

body.theme-light .alert-warning i:first-child {
  color: #f57c00; /* Darker orange for light theme */
}

body.theme-light .alert-error i:first-child,
body.theme-light .alert-danger i:first-child {
  color: #d32f2f; /* Darker red for light theme */
}

/* Ensure inline elements flow naturally within alerts */
.alert strong {
  display: inline !important; /* Override base_style.css which sets display: block */
  font-weight: 600;
}

.alert a {
  /* Inherit base link styles (inline-flex, dotted border, etc.) */
  /* Just ensure proper wrapping without changing display */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.alert code {
  display: inline;
  padding: 0.125em 0.375em;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

body.theme-light .alert code {
  background: rgba(0, 0, 0, 0.05);
}
.alert-info {
  border-color: #4a9eff;
  color: #4a9eff;
  background: rgba(74, 158, 255, 0.1);
}
.alert-success {
  border-color: #66bb6a;
  color: #66bb6a;
  background: rgba(102, 187, 106, 0.1);
}
.alert-warning {
  border-color: #ffa726;
  color: #ffa726;
  background: rgba(255, 167, 38, 0.1);
}
.alert-error,
.alert-danger {
  border-color: #ef5350;
  color: #ef5350;
  background: rgba(239, 83, 80, 0.1);
}

/* Light theme tuned tints */
body.theme-light .alert-info {
  border-color: #0066cc;
  color: #0066cc;
  background: rgba(0, 102, 204, 0.1);
}
body.theme-light .alert-success {
  border-color: #28a745;
  color: #28a745;
  background: rgba(40, 167, 69, 0.1);
}
body.theme-light .alert-warning {
  border-color: #e65100;
  color: #8b3a00;
  background: rgba(255, 152, 0, 0.15);
}
body.theme-light .alert-error {
  border-color: #dc3545;
  color: #dc3545;
  background: rgba(220, 53, 69, 0.1);
}
