/* ================================================================
   NewsGo — Admin UI
   Layered on Bootstrap 5 + app.css
   Purpose: accessible inputs, clear forms, polished admin chrome
   ================================================================ */

/* ── Footer ── */
.sp-footer {
  border-top: 1px solid #e5e5cb;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: #828282;
}
.sp-footer a {
  color: #828282;
  text-decoration: none;
}
.sp-footer a:hover { color: #1a1a1a; }
.sp-footer-btn {
  background: none;
  border: none;
  color: #828282;
  font-size: 0.75rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}
.sp-footer-btn:hover { color: #1a1a1a; }

/* ── Font ── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Page title: Inter instead of Playfair Display ── */
.ng-page-title {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ── Form labels ── */
.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #2c2c2c;
  margin-bottom: 0.375rem;
}

/* ── Inputs and selects ── */
.form-control,
.form-select {
  font-family: inherit;
  font-size: 0.875rem;
  color: #1a1a1a;
  background: #fff;
  border: 1px solid #d0d0d0;
  border-radius: 3px;
  padding: 0.5rem 0.75rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: none;
}

.form-control::placeholder { color: #aaa; }

.form-control:focus,
.form-select:focus {
  border-color: var(--ng-red);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
  outline: none;
}

.form-control-sm,
.form-select-sm {
  font-size: 0.8125rem;
  padding: 0.35rem 0.65rem;
}

/* invalid state */
.form-control:invalid:not(:placeholder-shown),
.form-select:invalid:not([value=""]) {
  border-color: #e57373;
}

/* ── Checkboxes ── */
.form-check-input:checked {
  background-color: var(--ng-red);
  border-color: var(--ng-red);
}
.form-check-input:focus {
  border-color: var(--ng-red);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}
.form-check-label {
  font-size: 0.875rem;
  color: #2c2c2c;
}

/* ── Alerts ── */
.alert {
  font-size: 0.875rem;
  border-radius: 3px;
  border-left-width: 3px;
}
.alert-danger {
  background: #fdf2f2;
  border-color: #e5a5a5;
  border-left-color: var(--ng-red);
  color: #6b1010;
}
.alert-warning {
  background: #fffbf0;
  border-color: #f0d080;
  border-left-color: #e8a000;
  color: #7a5800;
}
.alert-success {
  background: #f0faf5;
  border-color: #a5d4bb;
  border-left-color: #27ae60;
  color: #0a4a28;
}

/* ── Image upload slots ── */
.img-slot {
  border: 2px dashed #d0d0d0;
  border-radius: 4px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
  overflow: hidden;
}
.img-slot:hover { border-color: var(--ng-red); background: #fdf5f4; }
.img-slot.has-image { border-style: solid; border-color: #bbb; }
.img-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-slot .slot-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.img-slot:hover .slot-overlay { opacity: 1; }
.img-slot .slot-label {
  font-size: 0.8rem;
  color: #888;
  text-align: center;
  padding: 0.5rem;
}
.img-slot .slot-uploading { font-size: 0.8rem; color: var(--ng-red); }

/* ── EasyMDE editor tweaks ── */
.EasyMDEContainer .CodeMirror {
  min-height: 320px;
  font-size: 0.95rem;
  border-radius: 0 0 3px 3px;
}
.EasyMDEContainer .editor-toolbar { border-radius: 3px 3px 0 0; }
