/**
 * ClassaaS Global Theme Override
 * Anthropic-inspired: black & white only, Inter font, pill buttons
 * Loads LAST to override Bootstrap defaults and per-page styles
 */

/* ============================================================
   ROOT VARIABLES — Anthropic B&W palette
   ============================================================ */
:root {
  --cs-black: #000000;
  --cs-white: #ffffff;
  --cs-gray-50: #fafafa;
  --cs-gray-100: #f5f5f5;
  --cs-gray-200: #e5e5e5;
  --cs-gray-300: #d4d4d4;
  --cs-gray-400: #a3a3a3;
  --cs-gray-500: #737373;
  --cs-gray-600: #525252;
  --cs-gray-700: #404040;
  --cs-gray-800: #262626;
  --cs-gray-900: #171717;

  /* Override Bootstrap semantic colors to grayscale */
  --bs-primary: #000000;
  --bs-primary-rgb: 0, 0, 0;
  --bs-secondary: #525252;
  --bs-secondary-rgb: 82, 82, 82;
  --bs-success: #404040;
  --bs-success-rgb: 64, 64, 64;
  --bs-info: #525252;
  --bs-info-rgb: 82, 82, 82;
  --bs-warning: #737373;
  --bs-warning-rgb: 115, 115, 115;
  --bs-danger: #262626;
  --bs-danger-rgb: 38, 38, 38;
  --bs-light: #f5f5f5;
  --bs-dark: #000000;
  --bs-link-color: #000000;
  --bs-link-hover-color: #404040;
  --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Override any lingering color variables */
  --anthropic-orange: #000000;
  --anthropic-blue: #000000;
  --anthropic-success: #404040;
  --anthropic-warning: #737373;
  --anthropic-danger: #262626;
  --anthropic-info: #525252;
  --color-info: #525252;
  --primary-color: #000000;
}

/* ============================================================
   FONT — Inter everywhere
   ============================================================ */
body,
input, textarea, select, button,
.form-control, .form-select,
.btn, .nav-link, .card, .modal {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ============================================================
   BUTTONS — Black fill, white text, pill shape (999px)
   ============================================================ */
.btn {
  border-radius: 999px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-primary,
.btn-primary:focus {
  background-color: #000000;
  border-color: #000000;
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:active {
  background-color: #262626;
  border-color: #262626;
  color: #ffffff;
}

.btn-outline-primary,
.btn-outline-primary:focus {
  color: #000000;
  border-color: #000000;
  background-color: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary:active {
  background-color: #000000;
  border-color: #000000;
  color: #ffffff;
}

.btn-secondary,
.btn-secondary:focus {
  background-color: #525252;
  border-color: #525252;
  color: #ffffff;
  border-radius: 999px;
}

.btn-success,
.btn-success:focus {
  background-color: #000000;
  border-color: #000000;
  color: #ffffff;
}

.btn-danger,
.btn-danger:focus {
  background-color: #262626;
  border-color: #262626;
  color: #ffffff;
}

.btn-warning,
.btn-warning:focus {
  background-color: #737373;
  border-color: #737373;
  color: #ffffff;
}

.btn-info,
.btn-info:focus {
  background-color: #525252;
  border-color: #525252;
  color: #ffffff;
}

.btn-light {
  background-color: #f5f5f5;
  border-color: #e5e5e5;
  color: #000000;
}

.btn-dark {
  background-color: #000000;
  border-color: #000000;
  color: #ffffff;
}

/* Outline variants */
.btn-outline-secondary { color: #525252; border-color: #525252; }
.btn-outline-secondary:hover { background-color: #525252; color: #fff; }
.btn-outline-success { color: #000; border-color: #000; }
.btn-outline-success:hover { background-color: #000; color: #fff; }
.btn-outline-danger { color: #262626; border-color: #262626; }
.btn-outline-danger:hover { background-color: #262626; color: #fff; }
.btn-outline-info { color: #525252; border-color: #525252; }
.btn-outline-info:hover { background-color: #525252; color: #fff; }

/* Submit / CTA buttons */
.submit-btn,
button[type="submit"],
input[type="submit"] {
  border-radius: 999px;
}

/* ============================================================
   LINKS — Black, no blue
   ============================================================ */
a {
  color: #000000;
  text-decoration: underline;
  text-decoration-color: #d4d4d4;
  text-underline-offset: 2px;
}

a:hover {
  color: #404040;
  text-decoration-color: #404040;
}

/* ============================================================
   FORM CONTROLS — No blue focus glow
   ============================================================ */
.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: #000000;
  box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.1);
  outline: none;
}

.form-check-input:checked {
  background-color: #000000;
  border-color: #000000;
}

.form-switch .form-check-input:checked {
  background-color: #000000;
  border-color: #000000;
}

/* ============================================================
   BADGES — Grayscale
   ============================================================ */
.badge.bg-primary { background-color: #000000 !important; }
.badge.bg-secondary { background-color: #525252 !important; }
.badge.bg-success { background-color: #404040 !important; }
.badge.bg-danger { background-color: #262626 !important; }
.badge.bg-warning { background-color: #737373 !important; color: #fff !important; }
.badge.bg-info { background-color: #525252 !important; }

/* ============================================================
   ALERTS — Grayscale
   ============================================================ */
.alert-primary { background-color: #f5f5f5; border-color: #e5e5e5; color: #000; }
.alert-success { background-color: #f5f5f5; border-color: #d4d4d4; color: #000; }
.alert-danger { background-color: #fafafa; border-color: #d4d4d4; color: #262626; }
.alert-warning { background-color: #fafafa; border-color: #e5e5e5; color: #404040; }
.alert-info { background-color: #f5f5f5; border-color: #e5e5e5; color: #525252; }

/* ============================================================
   CARDS — Clean white, subtle border
   ============================================================ */
.card {
  border: 1px solid #e5e5e5;
  box-shadow: none;
  border-radius: 12px;
}

.card-header {
  background-color: #fafafa;
  border-bottom: 1px solid #e5e5e5;
}

/* ============================================================
   NAVIGATION — Black active, no blue
   ============================================================ */
.nav-link {
  color: #525252;
}

.nav-link:hover {
  color: #000000;
}

.nav-link.active {
  color: #000000;
  font-weight: 600;
}

.nav-tabs .nav-link.active {
  color: #000000;
  border-bottom-color: #000000;
}

.nav-pills .nav-link.active {
  background-color: #000000;
  color: #ffffff;
  border-radius: 999px;
}

/* ============================================================
   TABLES — Clean grayscale
   ============================================================ */
.table thead th {
  background-color: #fafafa;
  border-bottom: 2px solid #e5e5e5;
  color: #525252;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

/* ============================================================
   PAGINATION — Pill shaped, B&W
   ============================================================ */
.page-link {
  color: #000000;
  border-color: #e5e5e5;
}

.page-item.active .page-link {
  background-color: #000000;
  border-color: #000000;
  color: #ffffff;
}

.page-link:hover {
  color: #000000;
  background-color: #f5f5f5;
}

/* ============================================================
   PROGRESS BARS — Black
   ============================================================ */
.progress-bar {
  background-color: #000000;
}

/* ============================================================
   SPINNERS — Black
   ============================================================ */
.spinner-border {
  color: #000000;
}

/* ============================================================
   TEXT UTILITIES — Override Bootstrap color utilities
   ============================================================ */
.text-primary { color: #000000 !important; }
.text-success { color: #404040 !important; }
.text-danger { color: #262626 !important; }
.text-warning { color: #525252 !important; }
.text-info { color: #525252 !important; }

.bg-primary { background-color: #000000 !important; }
.bg-success { background-color: #404040 !important; }
.bg-danger { background-color: #262626 !important; }
.bg-warning { background-color: #737373 !important; }
.bg-info { background-color: #525252 !important; }

/* ============================================================
   DROPDOWN — No blue highlight
   ============================================================ */
.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active,
.dropdown-item:active {
  background-color: #f5f5f5;
  color: #000000;
}

/* ============================================================
   MODAL — Clean
   ============================================================ */
.modal-content {
  border: 1px solid #e5e5e5;
  border-radius: 12px;
}

.modal-header {
  border-bottom: 1px solid #e5e5e5;
}

.modal-footer {
  border-top: 1px solid #e5e5e5;
}

/* ============================================================
   TOOLTIP — Black
   ============================================================ */
.tooltip-inner {
  background-color: #000000;
}

.tooltip .tooltip-arrow::before {
  border-top-color: #000000;
}

/* ============================================================
   LIST GROUP — No blue
   ============================================================ */
.list-group-item.active {
  background-color: #000000;
  border-color: #000000;
}
