/* 
_utilities.css
Utility classes for common patterns and missing CSS definitions
Consolidates: form controls, alerts, badges, helpers
*/

/* ===== Field Wrapper ===== */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
}

/* ===== Alert/Banner Classes ===== */
.alert,
.alert-error,
.alert-success,
.info-banner {
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 4px solid;
  margin-bottom: 16px;
  font-size: 14px;
}

.alert {
  background: #fef3c7;
  border-left-color: #d97706;
  color: #92400e;
}

.alert-error {
  background: #fee2e2;
  border-left-color: #dc2626;
  color: #7f1d1d;
}

.alert-success {
  background: #dcfce7;
  border-left-color: #16a34a;
  color: #166534;
}

.info-banner {
  background: var(--background);
  border-left-color: var(--brand);
  color: var(--ink);
}

.success-banner {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 500;
  margin-top: 16px;
}

/* ===== Badge Classes ===== */
.badge {
  display: inline-block;
  padding: 4px 8px;
  gap: 4px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  background: var(--background);
  color: var(--brand);
}

.badge.green {
    background: rgba(22, 163, 74, .12);
    color: #16a34a
}

.badge.red {
    background: rgba(220, 38, 38, .14);
    color: #dc2626
}

.doc-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  background-color: #e8f0ff;
  border-radius: 12px;
  font-size: 1em;
  font-weight: 500;
  color: #0066cc;
}

input {
    padding: 6px 9px;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 14px;
    background: var(--panel);
    color: var(--ink)
}

input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, .35)
}

/* ===== Spacing Utilities ===== */
.mt-lg {
  margin-top: 18px;
}

.mt-sm {
    margin-top: 0px;
}

.mb-lg {
  margin-bottom: 18px;
}

.mb-md {
  margin-bottom: 12px;
}

.ml-20 {
  margin-left: 20px;
}

.no-margin {
  margin: 0;
}

.spacer-top {
  margin-top: 10px;
}

/* ===== Text Utilities ===== */
.nowrap {
  white-space: nowrap;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.red {
    color: red;
}

/* ===== Position Helpers ===== */
.left {
  text-align: left;
}

.wide {
    width: 100%
}

.search {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

/* Help Button */

.btn-help {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.btn-help:hover {
  background: var(--brand-secondary);
}

/* ===== Indent Helpers (for tables) ===== */
.indentPhase {
  display: none;
  min-width: 5vw;
}

.indentMaterial {
  display: none;
  min-width: 10vw;
}
