/* Crabarn Alert Modal (works in admin + frontend) */
:root{
  --cb-modal-bg: #ffffff;
  --cb-overlay: rgba(17,24,39,.55);
  --cb-radius: 10px;
  --cb-shadow: 0 12px 30px rgba(0,0,0,.25);
  --cb-title: #0f172a;
  --cb-text: #334155;
  --cb-border: #e2e8f0;
  --cb-primary: #1f7aec;
  --cb-danger: #dc2626;
  --cb-success: #16a34a;
  --cb-info: #2563eb;
  --cb-muted: #64748b;
}

.cb-alert-overlay{
  position: fixed; inset:0; background: var(--cb-overlay);
  display: none; align-items: center; justify-content: center; z-index: 999999;
}
.cb-alert-overlay.cb-open{ display: flex; }

.cb-alert{
  background: var(--cb-modal-bg);
  border-radius: var(--cb-radius);
  box-shadow: var(--cb-shadow);
  width: 92vw; max-width: 520px; color: var(--cb-text);
  border: 1px solid var(--cb-border);
  transform: translateY(10px) scale(.98);
  opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
}
.cb-alert.cb-enter{
  transform: translateY(0) scale(1); opacity: 1;
}

.cb-alert__head{
  padding: 16px 20px;
  border-bottom: 1px solid var(--cb-border);
  display: flex; justify-content: space-between; align-items: center;
}
.cb-alert__title{
  margin:0; font-size: 18px; font-weight: 700; color: var(--cb-title);
}
.cb-alert__close{
  background: transparent; border: none; font-size: 18px; cursor: pointer; color: #64748b;
}

.cb-alert__body{ padding: 16px 20px; line-height: 1.55; }
.cb-alert__body p{ margin: 0; }

.cb-alert__foot{
  padding: 14px 20px; display: flex; gap: 8px; justify-content: flex-end;
  border-top: 1px solid var(--cb-border);
}

/* Buttons */
.cb-btn{
  appearance: none; border: 1px solid var(--cb-border); background: #fff; color: #111827;
  padding: 8px 14px; border-radius: 8px; font-weight: 600; cursor: pointer;
}
.cb-btn:hover{ filter: brightness(98%); }
.cb-btn:focus{ outline: 2px solid var(--cb-primary); outline-offset: 2px; }

.cb-btn--primary{ background: var(--cb-primary); color: #fff; border-color: var(--cb-primary); }
.cb-btn--danger{ background: var(--cb-danger); color:#fff; border-color: var(--cb-danger); }

.cb-pill{
  display:inline-flex; gap:6px; align-items:center; font-size:12px; padding:4px 8px; border-radius:999px;
}
.cb-variant-info   { background: rgba(37,99,235,.1); color: var(--cb-info); }
.cb-variant-success{ background: rgba(22,163,74,.12); color: var(--cb-success); }
.cb-variant-danger { background: rgba(220,38,38,.12); color: var(--cb-danger); }
.cb-variant-muted  { background: rgba(100,116,139,.12); color: var(--cb-muted); }

/* Compact on small screens */
@media (max-width: 420px){
  .cb-alert__title{ font-size: 16px; }
  .cb-alert__foot{ flex-wrap: wrap; }
}
