/* JMK Tenant Visual Customization Stylesheet */

/* 1. Typography */
@font-face {
  font-family: 'Matter SQ';
  src: url('../fonts/matterSQ.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

body,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6,
.navbar,
.navbar-brand,
.nav-link,
.btn,
.form-control,
.card-title,
.table {
  font-family: "Matter SQ", "Inter", "Roboto", -apple-system, sans-serif !important;
}

/* 2. Brand Colors System Override */
:root {
  --jmk-blue: #1D34FE;
  --jmk-magenta: #FB5271;
  --jmk-black: #000000;
  --jmk-gray: #646569;

  --bs-primary: #1D34FE;
  --bs-primary-rgb: 29, 52, 254;
}

/* 3. Gradient primary overrides (Replaces Creative Tim pink gradient with JMK Blue to JMK Magenta) */
.bg-gradient-primary {
  background-image: linear-gradient(195deg, var(--jmk-blue) 0%, var(--jmk-magenta) 100%) !important;
}

/* Sidebar active link when data-color is primary */
.sidenav[data-color="primary"] .navbar-nav>.nav-item .nav-link.active {
  background-image: linear-gradient(195deg, var(--jmk-blue) 0%, var(--jmk-magenta) 100%) !important;
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(29, 52, 254, 0.4) !important;
}

/* Shadow Primary Override */
.shadow-primary {
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(29, 52, 254, 0.4) !important;
}

/* 4. Button Overrides */
.btn-primary {
  background-color: var(--jmk-blue) !important;
  border-color: var(--jmk-blue) !important;
  box-shadow: 0 3px 3px 0 rgba(29, 52, 254, 0.15), 0 3px 1px -2px rgba(29, 52, 254, 0.2), 0 1.5px 5px 0 rgba(29, 52, 254, 0.1) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
  background-color: #1026d3 !important;
  /* Slightly darker shade of JMK Blue for hover state */
  border-color: #1026d3 !important;
  box-shadow: 0 14px 26px -12px rgba(29, 52, 254, 0.4), 0 4px 23px 0px rgba(0, 0, 0, 0.15), 0 8px 10px -5px rgba(29, 52, 254, 0.2) !important;
}

.btn-outline-primary {
  border-color: var(--jmk-blue) !important;
  color: var(--jmk-blue) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--jmk-blue) !important;
  color: #fff !important;
}

/* 5. Text and Link Highlights */
.text-primary {
  color: var(--jmk-blue) !important;
}

.text-gradient.text-primary {
  background-image: linear-gradient(195deg, var(--jmk-blue), var(--jmk-magenta)) !important;
  color: var(--jmk-blue) !important;
  /* Fallback */
}

a.text-primary:hover,
a.text-primary:focus {
  color: var(--jmk-magenta) !important;
}

/* Active Indicator border on tables or items */
.border-primary {
  border-color: var(--jmk-blue) !important;
}

/* Form inputs focus highlights */
.input-group.is-focused .form-line {
  background-image: linear-gradient(0deg, var(--jmk-blue) 2px, rgba(156, 39, 176, 0) 0), linear-gradient(0deg, #d2d2d2 1px, rgba(209, 209, 209, 0) 0) !important;
}

.input-group.is-focused.input-group-outline .form-label {
  color: var(--jmk-blue) !important;
}

.input-group.is-focused.input-group-outline .form-control {
  border-color: var(--jmk-blue) !important;
  box-shadow: inset 1px 0 var(--jmk-blue), inset -1px 0 var(--jmk-blue), inset 0 -1px var(--jmk-blue) !important;
}

.form-check-input:checked {
  background-color: var(--jmk-blue) !important;
  border-color: var(--jmk-blue) !important;
}

/* Badge highlights */
.badge-primary {
  background-color: var(--jmk-blue) !important;
  color: #ffffff !important;
}

/* Pagination active state */
.page-item.active .page-link {
  background-color: var(--jmk-blue) !important;
  border-color: var(--jmk-blue) !important;
  box-shadow: 0 3px 5px -1px rgba(29, 52, 254, 0.3), 0 6px 10px 0 rgba(29, 52, 254, 0.15), 0 1px 18px 0 rgba(29, 52, 254, 0.1) !important;
}

/* Sidebar logo layout for JMK */
.navbar-brand img.jmk-logo {
  max-height: 2.2rem !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain;
  transition: all 0.2s ease-in-out;
}

/* Adjust padding/alignment when minimized */
.g-sidenav-hidden .navbar-vertical:not(:hover) .navbar-brand img.jmk-logo {
  max-height: 1.5rem !important;
}