/* ============================================
   DSCore — Brand Theme
   Based on DS Bergen logo colour #1B6E8C

   Bootstrap 5.3.3 is bundled locally.
   BS 5.3 compiles SASS to hardcoded values —
   CSS variable overrides alone don't work for
   component styles. We use !important where
   needed to override compiled defaults.
   ============================================ */

:root, [data-bs-theme="light"] {

  /* --- Primary — DS Bergen Blue --- */
  --ds-primary:        #1B6E8C;
  --ds-primary-dark:   #155669;
  --ds-primary-light:  #E8F3F7;
  --ds-primary-rgb:    27, 110, 140;

  /* --- Accent — Teal --- */
  --ds-teal:           #2A9D8F;
  --ds-teal-light:     #E6F5F3;

  /* --- Status --- */
  --ds-amber:          #E9950A;
  --ds-amber-light:    #FEF3DC;
  --ds-red:            #D64045;
  --ds-red-light:      #FFE9EA;

  /* --- Text --- */
  --ds-text-primary:   #1A2E35;
  --ds-text-secondary: #4A6572;
  --ds-text-muted:     #7A9AAA;

  /* --- Borders --- */
  --ds-border:         #D0D8DC;
  --ds-border-strong:  #B0BEC5;

  /* --- Backgrounds --- */
  --ds-bg-page:        #F4F6F7;
  --ds-bg-card:        #FFFFFF;
  --ds-bg-subtle:      #F0F4F5;

  /* --- Bootstrap variable overrides --- */
  --bs-primary:        #1B6E8C;
  --bs-primary-rgb:    27, 110, 140;
  --bs-success:        #2A9D8F;
  --bs-warning:        #E9950A;
  --bs-danger:         #D64045;
  --bs-body-bg:        #F4F6F7;
  --bs-body-color:     #1A2E35;
  --bs-border-color:   #D0D8DC;
  --bs-border-radius:  0.5rem;
  --bs-border-radius-sm: 0.375rem;
  --bs-border-radius-lg: 0.75rem;
  --bs-link-color:     #1B6E8C;
  --bs-link-hover-color: #155669;
}


/* ============================================
   BUTTONS — direct overrides with !important
   ============================================ */

/* Primary */
.btn-primary {
  background-color: #1B6E8C !important;
  border-color: #1B6E8C !important;
  color: #ffffff !important;
}
.btn-primary:hover, .btn-primary:focus {
  background-color: #155669 !important;
  border-color: #155669 !important;
  color: #ffffff !important;
}
.btn-primary:active, .btn-primary.active {
  background-color: #104353 !important;
  border-color: #104353 !important;
}
.btn-primary:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(27, 110, 140, 0.5) !important;
}

/* Outline Primary */
.btn-outline-primary {
  color: #1B6E8C !important;
  border-color: #1B6E8C !important;
  background-color: transparent !important;
}
.btn-outline-primary:hover, .btn-outline-primary:focus {
  background-color: #1B6E8C !important;
  border-color: #1B6E8C !important;
  color: #ffffff !important;
}
.btn-outline-primary:active, .btn-outline-primary.active {
  background-color: #155669 !important;
  border-color: #155669 !important;
  color: #ffffff !important;
}
.btn-outline-primary:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(27, 110, 140, 0.5) !important;
}

/* Success */
.btn-success {
  background-color: #2A9D8F !important;
  border-color: #2A9D8F !important;
  color: #ffffff !important;
}
.btn-success:hover, .btn-success:focus {
  background-color: #218376 !important;
  border-color: #218376 !important;
}

/* Outline Success */
.btn-outline-success {
  color: #2A9D8F !important;
  border-color: #2A9D8F !important;
}
.btn-outline-success:hover {
  background-color: #2A9D8F !important;
  color: #ffffff !important;
}

/* Danger */
.btn-danger {
  background-color: #D64045 !important;
  border-color: #D64045 !important;
}
.btn-outline-danger {
  color: #D64045 !important;
  border-color: #D64045 !important;
}
.btn-outline-danger:hover {
  background-color: #D64045 !important;
  color: #ffffff !important;
}

/* Warning */
.btn-warning {
  background-color: #E9950A !important;
  border-color: #E9950A !important;
  color: #ffffff !important;
}


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

.navbar-dark,
.navbar[data-bs-theme="dark"] {
  background-color: #1B6E8C !important;
}

.navbar-dark .nav-link,
.navbar-dark .navbar-nav .nav-link {
  color: rgba(255,255,255,0.9) !important;
}
.navbar-dark .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:hover {
  color: #ffffff !important;
}
.navbar-dark .navbar-brand {
  color: #ffffff !important;
}
.navbar-dark .navbar-toggler {
  border-color: rgba(255,255,255,0.3) !important;
}
.navbar-dark .navbar-toggler-icon {
  filter: invert(1);
}
.navbar-dark .dropdown-toggle::after {
  color: rgba(255,255,255,0.9);
}

/* Admin context selects (Customer/Location) in navbar */
.navbar-dark .form-select,
.navbar-dark select {
  background-color: rgba(255,255,255,0.15) !important;
  border-color: rgba(255,255,255,0.3) !important;
  color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}
.navbar-dark .form-select option {
  color: #1A2E35;
  background: #ffffff;
}
.navbar-dark .btn-link {
  color: rgba(255,255,255,0.7) !important;
}


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

.card {
  border: 0.5px solid #D0D8DC !important;
  border-radius: 10px;
  box-shadow: none;
  background: #FFFFFF;
}

.card-header {
  background-color: transparent !important;
  border-bottom: none !important;
  font-size: 11px;
  font-weight: 500;
  color: #1B6E8C;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 16px 16px 0 16px;
}

/* Section title class — for use inside card-body */
.section-title {
  font-size: 11px;
  font-weight: 500;
  color: #1B6E8C;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}


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

.table {
  --bs-table-border-color: #D0D8DC;
  --bs-table-striped-bg:   #F4F6F7;
  --bs-table-hover-bg:     #EEF3F5;
}

thead th {
  background-color: #F0F4F5 !important;
  color: #4A6572;
  font-size: 0.75rem;
  font-weight: 500;
  border-bottom: 1px solid #D0D8DC !important;
}


/* ============================================
   FORMS
   ============================================ */

.form-control,
.form-select {
  border-color: #D0D8DC;
  color: #1A2E35;
  font-size: 0.8125rem;
}

.form-control:focus,
.form-select:focus {
  border-color: #1B6E8C !important;
  box-shadow: 0 0 0 3px rgba(27, 110, 140, 0.15) !important;
}

.form-label {
  font-size: 0.6875rem;
  color: #4A6572;
  margin-bottom: 0.25rem;
}

.form-check-input:checked {
  background-color: #1B6E8C !important;
  border-color: #1B6E8C !important;
}
.form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(27, 110, 140, 0.25) !important;
}
.form-switch .form-check-input:checked {
  background-color: #1B6E8C !important;
}


/* ============================================
   BADGES
   ============================================ */

.badge.bg-primary  { background-color: #1B6E8C !important; }
.badge.bg-success  { background-color: #2A9D8F !important; }
.badge.bg-warning  { background-color: #E9950A !important; color: #fff !important; }
.badge.bg-danger   { background-color: #D64045 !important; }
.badge.bg-info     { background-color: #1B6E8C !important; }


/* ============================================
   NAV TABS / PILLS
   ============================================ */

.nav-pills .nav-link.active {
  background-color: #1B6E8C !important;
}
.nav-tabs .nav-link, .nav-pills .nav-link {
  color: #1B6E8C;
}
.nav-tabs .nav-link:hover, .nav-pills .nav-link:hover {
  color: #155669;
}
.nav-tabs .nav-link.active {
  color: #1B6E8C !important;
  border-bottom-color: #1B6E8C !important;
}


/* ============================================
   PAGINATION
   ============================================ */

.page-link {
  color: #1B6E8C;
  border-color: #D0D8DC;
}
.page-link:hover {
  color: #155669;
  background-color: #E8F3F7;
}
.page-item.active .page-link {
  background-color: #1B6E8C !important;
  border-color: #1B6E8C !important;
  color: #ffffff !important;
}


/* ============================================
   ALERTS
   ============================================ */

.alert-info {
  background-color: #E8F3F7;
  border-color: #B8D8E8;
  color: #155669;
}
.alert-success {
  background-color: #E6F5F3;
  border-color: #A8DDD8;
  color: #1A6B60;
}
.alert-warning {
  background-color: #FEF3DC;
  border-color: #E9C97A;
  color: #633806;
}
.alert-danger {
  background-color: #FFE9EA;
  border-color: #F5A3A6;
  color: #8B1A1E;
}


/* ============================================
   LINKS
   ============================================ */

a {
  color: #1B6E8C;
}
a:hover {
  color: #155669;
}


/* ============================================
   BODY / PAGE
   ============================================ */

body {
  background-color: #F4F6F7;
  color: #1A2E35;
}


/* ============================================
   JOB TYPE COLOR CODING
   ============================================ */

.job-workshop { background-color: #E8F3F7; color: #155669; border-color: #B8D8E8; }
.job-field    { background-color: #E6F5F2; color: #1A6B60; border-color: #A8DDD5; }

.job-badge-workshop { background-color: #155669 !important; color: #E8F3F7 !important; }
.job-badge-field    { background-color: #1A6B60 !important; color: #E6F5F2 !important; }

/* Row coloring in tables */
tr.job-workshop td { background-color: #E8F3F7; }
tr.job-field td    { background-color: #E6F5F2; }
tr.job-workshop:hover td { background-color: #D8EBF2 !important; }
tr.job-field:hover td    { background-color: #D6EDE8 !important; }

/* Chips in work planning */
.wp-chip-workshop { background: #155669 !important; color: #E8F3F7 !important; }
.wp-chip-field    { background: #1A6B60 !important; color: #E6F5F2 !important; }

/* Month view chips */
.mc-chip-workshop { background: #155669 !important; color: #E8F3F7 !important; }
.mc-chip-field    { background: #1A6B60 !important; color: #E6F5F2 !important; }
