/* Bootstrap 5.1 Compact Theme Overrides
   Designed for desktop displays with higher density layout
   Created for Biddle.DisparateImpact.WebUI
*/

/* Document and root overrides */
:root {
  --bs-body-font-size: 0.875rem;
  --bs-body-line-height: 1.4;
}

/* Global spacing reduction */
.container, .container-fluid, .container-lg, .container-md,
.container-sm, .container-xl, .container-xxl {
  padding-right: 0.75rem;
  padding-left: 0.75rem;
}

.row {
  margin-right: -0.5rem;
  margin-left: -0.5rem;
}

.row > * {
  padding-right: 0.5rem;
  padding-left: 0.5rem;
}

/* Typography scaling */
h1, .h1 { font-size: 1.75rem; margin-bottom: 0.75rem; }
h2, .h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h3, .h3 { font-size: 1.25rem; margin-bottom: 0.6rem; }
h4, .h4 { font-size: 1.15rem; margin-bottom: 0.6rem; }
h5, .h5 { font-size: 1rem; margin-bottom: 0.5rem; }
h6, .h6 { font-size: 0.875rem; margin-bottom: 0.5rem; }

p { margin-bottom: 0.75rem; }

/* Spacing system */
.mt-1, .my-1, .m-1 { margin-top: 0.15rem !important; }
.mb-1, .my-1, .m-1 { margin-bottom: 0.15rem !important; }
.ml-1, .mx-1, .m-1 { margin-left: 0.15rem !important; }
.mr-1, .mx-1, .m-1 { margin-right: 0.15rem !important; }

.mt-2, .my-2, .m-2 { margin-top: 0.3rem !important; }
.mb-2, .my-2, .m-2 { margin-bottom: 0.3rem !important; }
.ml-2, .mx-2, .m-2 { margin-left: 0.3rem !important; }
.mr-2, .mx-2, .m-2 { margin-right: 0.3rem !important; }

.mt-3, .my-3, .m-3 { margin-top: 0.6rem !important; }
.mb-3, .my-3, .m-3 { margin-bottom: 0.6rem !important; }
.ml-3, .mx-3, .m-3 { margin-left: 0.6rem !important; }
.mr-3, .mx-3, .m-3 { margin-right: 0.6rem !important; }

.pt-1, .py-1, .p-1 { padding-top: 0.15rem !important; }
.pb-1, .py-1, .p-1 { padding-bottom: 0.15rem !important; }
.pl-1, .px-1, .p-1 { padding-left: 0.15rem !important; }
.pr-1, .px-1, .p-1 { padding-right: 0.15rem !important; }

.pt-2, .py-2, .p-2 { padding-top: 0.3rem !important; }
.pb-2, .py-2, .p-2 { padding-bottom: 0.3rem !important; }
.pl-2, .px-2, .p-2 { padding-left: 0.3rem !important; }
.pr-2, .px-2, .p-2 { padding-right: 0.3rem !important; }

.pt-3, .py-3, .p-3 { padding-top: 0.6rem !important; }
.pb-3, .py-3, .p-3 { padding-bottom: 0.6rem !important; }
.pl-3, .px-3, .p-3 { padding-left: 0.6rem !important; }
.pr-3, .px-3, .p-3 { padding-right: 0.6rem !important; }

/* Cards */
.card {
  margin-bottom: 0.75rem;
}

.card-body {
  padding: 0.75rem;
}

.card-header,
.card-footer {
  padding: 0.5rem 0.75rem;
}

/* Table */
.table {
  font-size: 0.85rem;
}

.table > :not(caption) > * > * {
  padding: 0.3rem 0.5rem;
  vertical-align: middle;
}

/* Additional table cell alignment fixes */
.table td, .table th {
  vertical-align: middle;
}

/* Form controls inside tables */
.table .form-control, 
.table .form-select {
  margin: 0;
  vertical-align: middle;
}

/* Table header styling */
.table thead th {
  vertical-align: middle;
  font-weight: 600;
}

/* Forms */
.form-label {
  margin-bottom: 0.25rem;
}

.form-control,
.form-select {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  min-height: unset;
  height: calc(1.5em + 0.5rem + 2px);
}

.form-control-sm,
.form-select-sm {
  padding: 0.15rem 0.4rem;
  font-size: 0.8rem;
  height: calc(1.5em + 0.3rem + 2px);
}

.form-control-lg,
.form-select-lg {
  padding: 0.375rem 0.75rem;
  font-size: 0.95rem;
  height: calc(1.5em + 0.75rem + 2px);
}

.form-check {
  min-height: 1.2rem;
  margin-bottom: 0.25rem;
}

.form-check-input {
  width: 0.9rem;
  height: 0.9rem;
  margin-top: 0.25rem;
}

.form-check-label {
  margin-bottom: 0;
}

.input-group-text {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* Buttons */
.btn {
  padding: 0.25rem 0.6rem;
  font-size: 0.875rem;
}

.btn-sm {
  padding: 0.15rem 0.4rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.375rem 0.75rem;
  font-size: 0.95rem;
}

/* Dropdowns */
.dropdown-menu {
  padding: 0.25rem 0;
  font-size: 0.875rem;
}

.dropdown-item {
  padding: 0.2rem 0.5rem;
}

/* Modals */
.modal-header {
  padding: 0.75rem;
}

.modal-body {
  padding: 0.75rem;
}

.modal-footer {
  padding: 0.5rem;
}

/* Nav and Tabs */
.nav-link {
  padding: 0.3rem 0.75rem;
}

.nav-tabs .nav-link {
  padding: 0.25rem 0.75rem;
}

.tab-content {
  padding-top: 0.5rem;
}

/* List Group */
.list-group-item {
  padding: 0.5rem 0.75rem;
}

/* Tooltips and Popovers */
.tooltip {
  font-size: 0.8rem;
}

.popover {
  font-size: 0.85rem;
}

.popover-header {
  padding: 0.5rem 0.75rem;
}

.popover-body {
  padding: 0.5rem 0.75rem;
}

/* Badges */
.badge {
  padding: 0.2em 0.4em;
  font-size: 0.75em;
}

/* Alerts */
.alert {
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
}

/* Breadcrumbs */
.breadcrumb {
  padding: 0.375rem 0.75rem;
  margin-bottom: 0.75rem;
}

.breadcrumb-item {
  font-size: 0.875rem;
}

/* Pagination */
.pagination {
  font-size: 0.875rem;
}

.page-link {
  padding: 0.25rem 0.5rem;
}

/* Progress */
.progress {
  height: 0.75rem;
  margin-bottom: 0.75rem;
}

/* Toasts */
.toast {
  font-size: 0.85rem;
}

.toast-header {
  padding: 0.25rem 0.5rem;
}

.toast-body {
  padding: 0.5rem;
}

/* Accordion */
.accordion-button {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

.accordion-body {
  padding: 0.5rem 0.75rem;
}

/* Utility classes */
.rounded {
  border-radius: 0.2rem !important;
}

.shadow-sm {
  box-shadow: 0 0.05rem 0.15rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.075) !important;
}

.shadow-lg {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.075) !important;
}

/* Smaller gaps for grid system */
@media (min-width: 992px) {
  .gx-lg-3 {
    --bs-gutter-x: 0.75rem;
  }
  
  .gy-lg-3 {
    --bs-gutter-y: 0.75rem;
  }
}

/* Reduce line height for data-dense tables in desktop view */
@media (min-width: 992px) {
  .table-sm td,
  .table-sm th {
    padding: 0.2rem 0.4rem;
  }
  
  /* Tighter spacing for card groups and deck in desktop view */
  .card-group > .card {
    margin-bottom: 0.5rem;
  }
  
  /* Reduce padding on desktop */
  .container, .container-fluid {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
  }
} 