/*
 * components/alerts.css — Notification spans, dev/debug banners
 */

 /* ── Alerts NEW (Not in use yet) ─────────────────────────────────────────────────────────────── */
/* Soft tinted background + subtle full border + strong colored text. Pair with
   an inline SVG that has class `alert-icon` for the leading glyph.
   Variant aliases:
     .alert-info  ↔ .alert-notice  (PVM Msg::Output emits 'Notice')
     .alert-danger ↔ .alert-error  (PVM Msg::Output emits 'Error')
*/

.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}
.alert > p { margin: 0; }
.alert-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.alert-info,
.alert-notice {
  background-color: var(--color-notice-bg);
  border-color: var(--alert-info-border);
  color: var(--alert-info-text);
}

.alert-success {
  background-color: var(--color-success-bg);
  border-color: var(--alert-success-border);
  color: var(--alert-success-text);
}

.alert-warning {
  background-color: var(--color-warning-bg);
  border-color: var(--alert-warning-border);
  color: var(--alert-warning-text);
}

.alert-error,
.alert-danger {
  background-color: var(--color-error-bg);
  border-color: var(--alert-error-border);
  color: var(--alert-error-text);
}

.alert-dark {
  background-color: var(--alert-dark-bg);
  border-color: var(--alert-dark-border);
  color: var(--alert-dark-text);
}

/* ─── Notification Alerts ────────────────────────────────────────────────── */

div.content span.Notice,
div.content span.Warning,
div.content span.Error,
div.content span.Success {
  display: block;
  text-align: left;
  margin: 5px 0;
  padding: 5px 20px 5px 45px;
  font-size: 14px;
  background-position: 15px 50%;
  border-radius: 5px;
  background-repeat: no-repeat;
}
div.content span.Notice  { background-color: var(--color-notice-bg);  background-image: url(../../../../images/notice.png); }
div.content span.Warning { background-color: var(--color-warning-bg); background-image: url(../../../../images/warning.png); }
div.content span.Error   { background-color: var(--color-error-bg);   background-image: url(../../../../images/error.png); }
div.content span.Success { background-color: var(--color-success-bg); background-image: url(../../../../images/success.png); }

/* ─── Development Banner ─────────────────────────────────────────────────── */

div#DevelopmentBanner {
  display: block;
  width: 100%;
  background: #ffc7c0;
  border-top: 2px solid #f07070;
  border-bottom: 2px solid #f07070;
  font-size: var(--font-size-xs);
  font-weight: bold;
  text-align: center;
  margin: 0;
  padding: 1px 0;
}

/* ─── Debugger Banner ────────────────────────────────────────────────────── */

div#DebuggerBanner {
  position: absolute;
  display: block;
  font-size: var(--font-size-xs);
  text-align: center;
  margin: 0;
  padding: 1px 0;
  left: 0;
  right: 0;
  z-index: 100;
  pointer-events: none;
}
div#DebuggerBanner form {
  margin: 0;
  padding: 0;
}
div#DebuggerBanner form input.Submit   { font-size: var(--font-size-xs); }
div#DebuggerBanner form input.Checkbox { margin-left: 8px; vertical-align: bottom; }
div#DebuggerBanner input,
div#DebuggerBanner label { pointer-events: all; }

/* ─── Debugger Messages ──────────────────────────────────────────────────── */

.DebuggerMessage {
  clear: both;
  border-style: solid;
  border-width: 2px;
  font-size: var(--font-size-base);
  margin: 4px 5px;
  padding: 10px;
}
.DebuggerMessage span.Message {
  display: block;
  font-size: 14px;
  font-weight: bold;
  padding: 3px 0;
}
.DebuggerMessage table.Backtrace,
.DebuggerMessage table.ExecutionPlan {
  width: 100%;
}
.DebuggerMessage table.Backtrace th,
.DebuggerMessage table.ExecutionPlan th {
  border-top: 1px solid #999;
  font-size: var(--font-size-xs);
  font-weight: bold;
}
.DebuggerMessage table.Backtrace td,
.DebuggerMessage table.ExecutionPlan td {
  border-top: 1px solid #999;
  font-size: var(--font-size-xs);
  padding: 3px;
}
.DebuggerMessage pre {
  border-top: 2px dotted black;
  font-family: "Courier New", monospace;
  padding: 5px;
  width: 100%;
  overflow: auto;
}

/* Debugger message type variants */
.DebuggerMessage.DebuggerError   { background-color: rgba(255, 191, 191, 0.1); border-color: #b30000; }
.DebuggerMessage.DebuggerWarning { background-color: rgba(255, 230, 191, 0.3); border-color: #f90; }
.DebuggerMessage.DebuggerSpecial { background-color: rgba(191, 207, 255, 0.1); border-color: #00248f; }
.DebuggerMessage.DebuggerNotice  { background-color: rgba(255, 248, 189, 0.1); border-color: #ffe600; }
.DebuggerMessage.DebuggerQuery   { background-color: rgba(255, 255, 255, 0.1);    border-color: #fff; }

.DebuggerMessage.DebuggerError   tr:nth-child(even) { background: rgba(255, 150, 150, 0.1); }
.DebuggerMessage.DebuggerWarning tr:nth-child(even) { background: rgba(255, 214, 150, 0.3); }
.DebuggerMessage.DebuggerSpecial tr:nth-child(even) { background: rgba(150, 176, 255, 0.1); }
.DebuggerMessage.DebuggerNotice  tr:nth-child(even) { background: rgba(255, 245, 150, 0.1); }
.DebuggerMessage.DebuggerQuery   tr:nth-child(even) { background: rgba(235, 235, 235, 0.1); }

/* ─── Warning notice box ─────────────────────────────────────────────────── */

.warning-notice {
	background: #fcf8e3 url('../../../../images/warning.png') no-repeat 15px 50%;
	padding: 5px 20px 5px 45px;
}
