/**
 * Tabler Overrides
 * Customizations to Tabler's default styles
 * Scoped under .rauda-theme for explicit opt-in
 */

/* ========================================
   GLOBAL
   ======================================== */

.rauda-theme {
  font-family: var(--rauda-font-sans);
  background-color: var(--rauda-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

.rauda-theme h1,
.rauda-theme .h1,
.rauda-theme .page-title {
  font-size: var(--rauda-text-3xl) !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
}

.rauda-theme h2,
.rauda-theme .h2 {
  font-size: var(--rauda-text-2xl) !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
}

.rauda-theme h3,
.rauda-theme .h3 {
  font-size: var(--rauda-text-xl) !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
}

.rauda-theme h4,
.rauda-theme .h4 {
  font-size: var(--rauda-text-lg) !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
}

.rauda-theme h5,
.rauda-theme .h5 {
  font-size: var(--rauda-text-md) !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
}

.rauda-theme h6,
.rauda-theme .h6 {
  font-size: var(--rauda-text-base) !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
}

/* ========================================
   BUTTONS
   ======================================== */

.rauda-theme .btn-primary {
  --tblr-btn-bg: var(--rauda-accent);
  --tblr-btn-border-color: var(--rauda-accent);
  --tblr-btn-hover-bg: var(--rauda-accent-hover);
  --tblr-btn-hover-border-color: var(--rauda-accent-hover);
}

/* ========================================
   TEXT COLORS
   ======================================== */

.rauda-theme .text-primary {
  color: var(--rauda-accent) !important;
}

/* ========================================
   CARDS
   ======================================== */

.rauda-theme .card {
  border: 1px solid var(--rauda-grey-light);
  border-radius: var(--rauda-radius-xl);
  overflow: hidden;
  box-shadow: none;
  background-color: var(--rauda-white);
}

.rauda-theme .card-body {
  padding: var(--rauda-space-6);
}

.rauda-theme .card-title {
  font-size: var(--rauda-text-sm);
  font-weight: 500;
  color: var(--rauda-grey-text);
}

.rauda-theme .card .table {
  margin-bottom: 0;
}

.rauda-theme .card .table thead th:first-child,
.rauda-theme .card .table thead th:last-child {
  border-radius: 0 !important;
}

.rauda-theme .card .table-responsive:first-child .table thead th:first-child,
.rauda-theme .card .table-responsive:first-child .table thead th:last-child {
  border-radius: 0 !important;
}

/* ========================================
   TABLES
   ======================================== */

.rauda-theme .table thead th {
  background-color: var(--rauda-grey-light);
  border-radius: 0 !important;
  padding-top: var(--rauda-space-3);
  padding-bottom: var(--rauda-space-3);
}

.rauda-theme .table>tbody>tr {
  cursor: pointer;
  transition: background-color var(--rauda-transition-fast);
}

.rauda-theme .table>tbody>tr:hover {
  background-color: var(--rauda-grey-light);
}

/* ========================================
   NAVBAR / SIDEBAR
   ======================================== */

.rauda-theme .navbar-brand img {
  height: 80px !important;
  width: auto !important;
}

.rauda-theme .navbar-vertical .nav-section-title {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  list-style: none;
  margin: var(--rauda-space-4) var(--rauda-space-3) var(--rauda-space-2);
  text-transform: uppercase;
}

/* ========================================
   PAGE LAYOUT
   ======================================== */

.rauda-theme .page-header {
  padding: var(--rauda-space-3) 0;
}

/* ========================================
   DROPDOWNS
   ======================================== */

.rauda-theme .dropdown-item.active,
.rauda-theme .dropdown-item:active {
  background-color: var(--rauda-grey-light);
  color: var(--rauda-black);
}

/* ========================================
   BRAND THEME OVERRIDES
   Scoped under .brand-theme for explicit opt-in
   ======================================== */

/* ========================================
   GLOBAL
   ======================================== */

.brand-theme {
  font-family: var(--brand-font-sans);
  background-color: var(--brand-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.brand-theme .page,
.brand-theme .page-wrapper {
  background-color: var(--brand-background);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

.brand-theme h1,
.brand-theme .h1,
.brand-theme .page-title {
  font-size: var(--brand-text-3xl) !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
}

.brand-theme h2,
.brand-theme .h2 {
  font-size: var(--brand-text-2xl) !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
}

.brand-theme h3,
.brand-theme .h3 {
  font-size: var(--brand-text-xl) !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
}

.brand-theme h4,
.brand-theme .h4 {
  font-size: var(--brand-text-lg) !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
}

.brand-theme h5,
.brand-theme .h5 {
  font-size: var(--brand-text-md) !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
}

.brand-theme h6,
.brand-theme .h6 {
  font-size: var(--brand-text-base) !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
}

/* ========================================
   BUTTONS
   ======================================== */

.brand-theme .btn-primary {
  --tblr-btn-bg: var(--brand-accent);
  --tblr-btn-border-color: var(--brand-accent);
  --tblr-btn-hover-bg: var(--brand-accent-hover);
  --tblr-btn-hover-border-color: var(--brand-accent-hover);
  --tblr-btn-active-bg: var(--brand-accent-hover);
  --tblr-btn-active-border-color: var(--brand-accent-hover);
  box-shadow: var(--brand-shadow-btn);
}

.brand-theme .btn-outline-primary {
  --tblr-btn-color: var(--brand-accent);
  --tblr-btn-border-color: var(--brand-accent-border-soft);
  --tblr-btn-hover-bg: var(--brand-accent);
  --tblr-btn-hover-border-color: var(--brand-accent);
}

.brand-theme .form-control:focus,
.brand-theme .form-select:focus {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 0.25rem var(--brand-accent-ring);
}

/* ========================================
   TEXT COLORS
   ======================================== */

.brand-theme .text-primary {
  color: var(--brand-accent) !important;
}

/* ========================================
   CARDS
   ======================================== */

.brand-theme .card {
  border: 1px solid var(--brand-grey-light);
  border-radius: var(--brand-radius-xl);
  overflow: clip;
  box-shadow: none;
  background-color: var(--brand-white);
}

.brand-theme .card-body {
  padding: var(--brand-space-6);
}

.brand-theme .card-title {
  font-size: var(--brand-text-sm);
  font-weight: 500;
  color: var(--brand-grey-text);
}

.brand-theme .card .table {
  margin-bottom: 0;
}

.brand-theme .card .table thead th:first-child,
.brand-theme .card .table thead th:last-child {
  border-radius: 0 !important;
}

.brand-theme .card .table-responsive:first-child .table thead th:first-child,
.brand-theme .card .table-responsive:first-child .table thead th:last-child {
  border-radius: 0 !important;
}

/* ========================================
   TABLES
   ======================================== */

.brand-theme .table thead th {
  background-color: var(--brand-grey-light);
  border-radius: 0 !important;
  padding-top: var(--brand-space-3);
  padding-bottom: var(--brand-space-3);
  color: var(--brand-blue-text);
  font-size: var(--brand-text-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-theme .table>tbody>tr {
  cursor: pointer;
  transition: background-color var(--brand-transition-fast);
}

.brand-theme .table>tbody>tr:hover {
  background-color: var(--brand-grey-light);
}

/* ========================================
   NAVBAR / SIDEBAR
   ======================================== */

.brand-theme .app-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--brand-space-2);
  padding-block: var(--brand-space-2);
  color: var(--brand-blue-text);
  text-decoration: none;
}

.brand-theme .app-brand-shape {
  display: block;
  height: 28px;
  width: 28px;
  object-fit: contain;
}

.brand-theme .app-brand-text {
  color: var(--brand-grey-text);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1;
}

.brand-theme .navbar-vertical .nav-section-title {
  color: var(--brand-grey-text);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  list-style: none;
  margin: var(--brand-space-4) var(--brand-space-3) var(--brand-space-2);
  text-transform: uppercase;
}

/* ========================================
   PAGE LAYOUT
   ======================================== */

.brand-theme .page-header {
  padding: var(--brand-space-6) 0 var(--brand-space-3);
}


.brand-theme .page-pretitle {
  color: var(--brand-accent);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-theme .page-body {
  padding-top: var(--brand-space-4);
}

/* ========================================
   DROPDOWNS
   ======================================== */

.brand-theme .dropdown-item.active,
.brand-theme .dropdown-item:active {
  background-color: var(--brand-grey-light);
  color: var(--brand-black);
}
