/**
 * Fixly Qatar brand — sampled from the logo
 * Maroon #8C0F32  |  Gold #CBA346  |  White #FEFDFD
 */
:root,
[data-bs-theme="light"] {
  --fx-maroon: #8C0F32;
  --fx-maroon-dark: #6E0C28;
  --fx-gold: #CBA346;
  --fx-gold-dark: #A88838;
  --fx-ink: #2A0E18;
  --fx-surface: #FBF6F7;
  --bs-primary: #8C0F32;
  --bs-primary-rgb: 140, 15, 50;
  --bs-link-color: #8C0F32;
  --bs-link-hover-color: #6E0C28;
  --bs-primary-bg-subtle: #F8EEF1;
  --bs-primary-border-subtle: #E7C8D1;
  --bs-yellow: #CBA346;
  --c1: #8C0F32;
  --link-color: #8C0F32;
}

.btn-primary,
.iq-button.btn-primary,
.btn-primary:not(:disabled):not(.disabled) {
  background-color: #8C0F32 !important;
  background-image: linear-gradient(135deg, #8C0F32, #6E0C28) !important;
  border-color: #8C0F32 !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: #6E0C28 !important;
  background-image: linear-gradient(135deg, #6E0C28, #8C0F32) !important;
  border-color: #6E0C28 !important;
}

.btn-outline-primary {
  color: #8C0F32 !important;
  border-color: #8C0F32 !important;
}

.btn-outline-primary:hover {
  background-color: #F8EEF1 !important;
  color: #8C0F32 !important;
}

.bg-primary,
.badge.bg-primary,
.page-item.active .page-link,
.nav-pills .nav-link.active {
  background-color: #8C0F32 !important;
  border-color: #8C0F32 !important;
}

.pagination {
  --bs-pagination-color: #8C0F32;
  --bs-pagination-hover-color: #6E0C28;
  --bs-pagination-hover-bg: #F8EEF1;
  --bs-pagination-hover-border-color: #E7C8D1;
  --bs-pagination-focus-color: #8C0F32;
  --bs-pagination-focus-bg: #F8EEF1;
  --bs-pagination-focus-box-shadow: 0 0 0 0.2rem rgba(140, 15, 50, 0.18);
  --bs-pagination-active-color: #fff;
  --bs-pagination-active-bg: #8C0F32;
  --bs-pagination-active-border-color: #8C0F32;
}

.page-link,
.pagination .page-link,
.dataTables_paginate .page-link,
.pagination .pagination-link,
.dataTables_wrapper .dataTables_paginate .paginate_button {
  color: #8C0F32 !important;
}

.page-link:hover,
.pagination .pagination-link:hover:not(:disabled):not(.active),
.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.current):not(.disabled) {
  color: #6E0C28 !important;
  background-color: #F8EEF1 !important;
  border-color: #E7C8D1 !important;
}

.page-item.active .page-link,
.page-link.active,
.pagination .pagination-link.active,
.dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background-color: #8C0F32 !important;
  border-color: #8C0F32 !important;
  color: #fff !important;
}

.page-item.disabled .page-link,
.page-link.disabled,
.pagination .pagination-link:disabled,
.dataTables_paginate .paginate_button.disabled {
  color: #9A8A90 !important;
  background-color: #fff !important;
}

.text-primary,
a.text-primary {
  color: #8C0F32;
}

/* Don't force maroon onto sidebar links (dark background needs light text). */
a:not(.btn):not(.nav-link):not(.iq-sidebar a):hover {
  color: #8C0F32;
}

.iq-sidebar a,
.iq-sidebar a:hover,
.iq-sidebar a:focus {
  color: inherit;
}

.form-control:focus,
.form-select:focus,
.form-check-input:checked {
  border-color: #8C0F32 !important;
}

.form-check-input:checked {
  background-color: #8C0F32 !important;
}

.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(140, 15, 50, 0.18) !important;
}

.iq-sidebar .iq-sidebar-menu .nav-item a.active,
.iq-sidebar .iq-sidebar-menu .nav-item.active > a,
.iq-sidebar-menu .nav-link.active {
  background: linear-gradient(135deg, #8C0F32, #6E0C28) !important;
  color: #fff !important;
}

.progress-bar,
.swiper-pagination-bullet-active {
  background-color: #8C0F32 !important;
}

.search-form .search-icon,
.circle-progress .circle {
  background-color: #8C0F32 !important;
  color: #fff !important;
}

.rating i,
.star,
.text-warning.rating {
  color: #CBA346 !important;
}

/* Old theme used teal/blue soft-primary; keep light UI on-brand */
.bg-soft-primary,
.badge.bg-soft-primary {
  color: #8C0F32 !important;
  background-color: rgba(140, 15, 50, 0.12) !important;
}

a.bg-soft-primary:hover,
a.bg-soft-primary:focus,
button.bg-soft-primary:hover,
button.bg-soft-primary:focus {
  color: #6E0C28 !important;
  background-color: rgba(140, 15, 50, 0.2) !important;
}

/* ---------- Dark theme ---------- */
html[data-bs-theme="dark"],
html[data-bs-theme="dark"] body,
body.dark {
  --fx-ink: #14080C;
  --fx-surface: #1E1014;
  --fx-card: #261318;
  --fx-border: #3D252C;
  --fx-text: #F4E8EB;
  --fx-muted: #C4B0B6;
  --bs-body-bg: #14080C;
  --bs-body-color: #E8DDE0;
  --bs-emphasis-color: #F7EDEE;
  --bs-secondary-color: #C4B0B6;
  --bs-border-color: #3D252C;
  --bs-tertiary-bg: #1E1014;
  --bs-primary-bg-subtle: #2A1218;
  --bs-link-color: #E0B4BE;
  --bs-link-hover-color: #CBA346;
  --heading-color: #F7EDEE;
  --ms-bg: #1E1014;
  background-color: #14080C !important;
  color: #E8DDE0 !important;
}

html[data-bs-theme="dark"] h1,
html[data-bs-theme="dark"] h2,
html[data-bs-theme="dark"] h3,
html[data-bs-theme="dark"] h4,
html[data-bs-theme="dark"] h5,
html[data-bs-theme="dark"] h6,
html[data-bs-theme="dark"] .h1,
html[data-bs-theme="dark"] .h2,
html[data-bs-theme="dark"] .h3,
body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark h5,
body.dark h6 {
  color: #F7EDEE !important;
}

html[data-bs-theme="dark"] a:not(.btn):not(.nav-link):not(.page-link):not(.home-hero__link),
body.dark a:not(.btn):not(.nav-link):not(.page-link):not(.home-hero__link) {
  color: #E0B4BE;
}

html[data-bs-theme="dark"] .btn-outline-primary,
body.dark .btn-outline-primary {
  color: #F4E8EB !important;
  border-color: #CBA346 !important;
  background: transparent !important;
}

html[data-bs-theme="dark"] .btn-outline-primary:hover,
body.dark .btn-outline-primary:hover {
  background: rgba(203, 163, 70, 0.16) !important;
  color: #CBA346 !important;
}

html[data-bs-theme="dark"] .dropdown-menu,
body.dark .dropdown-menu {
  background-color: #1E1014 !important;
  border-color: #3D252C !important;
  color: #F4E8EB !important;
}

html[data-bs-theme="dark"] .dropdown-menu .dropdown-item,
body.dark .dropdown-menu .dropdown-item {
  color: #F4E8EB !important;
}

html[data-bs-theme="dark"] .dropdown-menu .dropdown-item:hover,
body.dark .dropdown-menu .dropdown-item:hover {
  background: rgba(140, 15, 50, 0.35) !important;
  color: #fff !important;
}

html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select,
html[data-bs-theme="dark"] .form-select option,
body.dark .form-control,
body.dark .form-select {
  background-color: #1E1014 !important;
  color: #F4E8EB !important;
  border-color: #3D252C !important;
}

html[data-bs-theme="dark"] .modal-content,
body.dark .modal-content {
  background-color: #1E1014 !important;
  color: #F4E8EB !important;
}

html[data-bs-theme="dark"] .pagination,
body.dark .pagination {
  --bs-pagination-color: #E0B4BE;
  --bs-pagination-hover-color: #CBA346;
  --bs-pagination-hover-bg: #2A1218;
  --bs-pagination-hover-border-color: #CBA346;
  --bs-pagination-bg: #1E1014;
  --bs-pagination-border-color: #3D252C;
  --bs-pagination-disabled-bg: #1E1014;
  --bs-pagination-disabled-color: #8A737A;
}

html[data-bs-theme="dark"] .page-link,
html[data-bs-theme="dark"] .pagination .pagination-link,
body.dark .page-link,
body.dark .pagination .pagination-link {
  color: #E0B4BE !important;
  background-color: #1E1014 !important;
  border-color: #3D252C !important;
}

html[data-bs-theme="dark"] .page-item.active .page-link,
html[data-bs-theme="dark"] .pagination .pagination-link.active,
body.dark .page-item.active .page-link,
body.dark .pagination .pagination-link.active {
  background-color: #8C0F32 !important;
  border-color: #8C0F32 !important;
  color: #fff !important;
}

html[data-bs-theme="dark"] .page-item.disabled .page-link,
body.dark .page-item.disabled .page-link {
  color: #8A737A !important;
  background-color: #1E1014 !important;
}

html[data-bs-theme="dark"] .bg-soft-primary,
body.dark .bg-soft-primary {
  color: #E0B4BE !important;
  background-color: rgba(140, 15, 50, 0.28) !important;
}

html[data-bs-theme="dark"] .fx-legal p,
html[data-bs-theme="dark"] .fx-legal span,
html[data-bs-theme="dark"] .fx-legal div,
body.dark .fx-legal p,
body.dark .fx-legal span,
body.dark .fx-legal div {
  background: transparent !important;
  background-color: transparent !important;
  color: #E8DDE0 !important;
}

html[data-bs-theme="dark"] header .navbar,
html[data-bs-theme="dark"] .iq-navbar.navbar,
html[data-bs-theme="dark"] .iq-top-navbar,
html[data-bs-theme="dark"] .iq-top-navbar .navbar,
body.dark header .navbar,
body.dark .iq-navbar.navbar,
body.dark .iq-top-navbar,
body.dark .iq-top-navbar .navbar {
  border-bottom: none !important;
  box-shadow: none !important;
}

html[data-bs-theme="dark"] .iq-top-navbar,
body.dark .iq-top-navbar {
  background: #1E1014 !important;
}

html[data-bs-theme="dark"] .content-page,
html[data-bs-theme="dark"] .card,
html[data-bs-theme="dark"] .iq-card,
body.dark .content-page,
body.dark .card,
body.dark .iq-card {
  background-color: #261318;
}

html[data-bs-theme="dark"] .content-page {
  background-color: #14080C !important;
}

body.dark .content-page {
  background-color: #14080C !important;
}

.table a.btn-link,
.table a.btn-link-hover,
a.btn-link {
  color: #8C0F32 !important;
}
