/*
|--------------------------------------------------------------------------
| Custom CSS - FPOETV
|--------------------------------------------------------------------------
|
| Diese Datei überschreibt die Standard-Template-Farben
| Stammfarbe: #095DA8 (ersetzt #574fec)
|
*/

/* CSS-Variablen überschreiben */
:root,
[data-bs-theme="light"] {
  --bs-primary: #095DA8 !important;
  --bs-primary-rgb: 9, 93, 168 !important;
  --bs-primary-text-emphasis: #032749 !important;
  --bs-primary-bg-subtle: #cce0f4 !important;
  --bs-primary-border-subtle: #99c1e9 !important;
}

[data-bs-theme="dark"] {
  --bs-primary: #095DA8 !important;
  --bs-primary-rgb: 9, 93, 168 !important;
  --bs-primary-text-emphasis: #4da3e8 !important;
  --bs-primary-bg-subtle: #021a2b !important;
  --bs-primary-border-subtle: #053451 !important;
}

/* Bootstrap Komponenten überschreiben */
.btn-primary {
  background-color: #095DA8 !important;
  border-color: #095DA8 !important;
  color: #fff !important;
}

.btn-primary:hover {
  background-color: #074a8a !important;
  border-color: #074a8a !important;
  color: #fff !important;
}

.btn-primary:focus,
.btn-primary.focus {
  background-color: #074a8a !important;
  border-color: #074a8a !important;
  color: #fff !important;
  box-shadow: 0 0 0 0.2rem rgba(9, 93, 168, 0.25) !important;
}

.btn-primary:active,
.btn-primary.active {
  background-color: #063c71 !important;
  border-color: #063c71 !important;
  color: #fff !important;
}

.btn-outline-primary {
  color: #095DA8 !important;
  border-color: #095DA8 !important;
  background-color: transparent !important;
}

.btn-outline-primary:hover {
  background-color: #095DA8 !important;
  border-color: #095DA8 !important;
  color: #fff !important;
}

.btn-outline-primary:focus {
  background-color: #095DA8 !important;
  border-color: #095DA8 !important;
  color: #fff !important;
  box-shadow: 0 0 0 0.2rem rgba(9, 93, 168, 0.25) !important;
}

.btn-outline-primary:active,
.btn-outline-primary.active {
  background-color: #074a8a !important;
  border-color: #074a8a !important;
  color: #fff !important;
}

/* Links */
.link-primary,
a.text-primary {
  color: #095DA8 !important;
}

.link-primary:hover,
a.text-primary:hover {
  color: #074a8a !important;
}

/* Badges */
.badge.bg-primary {
  background-color: #095DA8 !important;
}

/* Alerts */
.alert-primary {
  background-color: #cce0f4 !important;
  border-color: #99c1e9 !important;
  color: #032749 !important;
}

/* Progress Bars */
.progress-bar {
  background-color: #095DA8 !important;
}

/* Nav Tabs/Pills */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background-color: #095DA8 !important;
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus {
  border-color: #d9e2ef #d9e2ef #095DA8 !important;
}

.nav-tabs .nav-item.show .nav-link,
.nav-tabs .nav-link.active {
  border-color: #095DA8 #095DA8 #fff !important;
}

/* Forms */
.form-control:focus {
  border-color: #095DA8 !important;
  box-shadow: 0 0 0 0.2rem rgba(9, 93, 168, 0.25) !important;
}

.form-check-input:checked {
  background-color: #095DA8 !important;
  border-color: #095DA8 !important;
}

.form-check-input:focus {
  border-color: #4da3e8 !important;
  box-shadow: 0 0 0 0.2rem rgba(9, 93, 168, 0.25) !important;
}

/* Text Colors */
.text-primary {
  color: #095DA8 !important;
}

/* Background Colors */
.bg-primary {
  background-color: #095DA8 !important;
}

/* Border Colors */
.border-primary {
  border-color: #095DA8 !important;
}

/* Accordion */
.accordion-button:not(.collapsed) {
  background-color: #cce0f4 !important;
  color: #032749 !important;
}

.accordion-button:focus {
  border-color: #095DA8 !important;
  box-shadow: 0 0 0 0.2rem rgba(9, 93, 168, 0.25) !important;
}

/* Pagination */
.page-link {
  color: #095DA8 !important;
  background-color: #fff !important;
  border-color: #dee2e6 !important;
}

.page-item.active .page-link {
  background-color: #095DA8 !important;
  border-color: #095DA8 !important;
  color: #fff !important;
}

.page-link:hover {
  color: #fff !important;
  background-color: #095DA8 !important;
  border-color: #095DA8 !important;
}

.page-link:focus {
  color: #fff !important;
  background-color: #095DA8 !important;
  border-color: #095DA8 !important;
  box-shadow: 0 0 0 0.2rem rgba(9, 93, 168, 0.25) !important;
}

/* Dropdowns */
.dropdown-item.active,
.dropdown-item:active {
  background-color: #095DA8 !important;
}

/* List Groups */
.list-group-item.active {
  background-color: #095DA8 !important;
  border-color: #095DA8 !important;
}

/* Tables */
.table-primary {
  background-color: #cce0f4 !important;
}

/* Offcanvas */
.offcanvas-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* Custom Components */
.btn-check:checked + .btn-outline-primary,
.btn-check:active + .btn-outline-primary {
  background-color: #095DA8 !important;
  border-color: #095DA8 !important;
  color: #fff !important;
}

/* 2FA Button Group Fix */
.btn-group .btn-outline-primary:not(.active):not(:checked):hover {
  background-color: rgba(9, 93, 168, 0.1) !important;
  border-color: #095DA8 !important;
  color: #095DA8 !important;
}

.btn-group .btn-check:not(:checked) + .btn-outline-primary:hover {
  background-color: rgba(9, 93, 168, 0.1) !important;
  border-color: #095DA8 !important;
  color: #095DA8 !important;
}

.btn-group .btn-check:checked + .btn-outline-primary:hover {
  background-color: #074a8a !important;
  border-color: #074a8a !important;
  color: #fff !important;
}

/* Profile Edit Button Fix with Maximum Specificity */
body .btn.btn-sm.btn-outline-primary.js-ajax-modal,
body a.btn.btn-sm.btn-outline-primary.js-ajax-modal,
body .js-ajax-modal.btn.btn-sm.btn-outline-primary,
body a.js-ajax-modal.btn.btn-sm.btn-outline-primary,
body .btn.btn-sm.btn-outline-primary,
body .btn-sm.btn-outline-primary.js-ajax-modal,
body a.btn.btn-sm.btn-outline-primary {
  color: #095DA8 !important;
  border-color: #095DA8 !important;
  background-color: transparent !important;
}

body .btn.btn-sm.btn-outline-primary.js-ajax-modal:hover,
body a.btn.btn-sm.btn-outline-primary.js-ajax-modal:hover,
body .js-ajax-modal.btn.btn-sm.btn-outline-primary:hover,
body a.js-ajax-modal.btn.btn-sm.btn-outline-primary:hover,
body .btn.btn-sm.btn-outline-primary:hover,
body .btn-sm.btn-outline-primary.js-ajax-modal:hover,
body a.btn.btn-sm.btn-outline-primary:hover {
  background-color: #095DA8 !important;
  border-color: #095DA8 !important;
  color: #fff !important;
}

body .btn.btn-sm.btn-outline-primary.js-ajax-modal:focus,
body a.btn.btn-sm.btn-outline-primary.js-ajax-modal:focus,
body .js-ajax-modal.btn.btn-sm.btn-outline-primary:focus,
body a.js-ajax-modal.btn.btn-sm.btn-outline-primary:focus,
body .btn.btn-sm.btn-outline-primary:focus,
body .btn-sm.btn-outline-primary.js-ajax-modal:focus,
body a.btn.btn-sm.btn-outline-primary:focus {
  background-color: #095DA8 !important;
  border-color: #095DA8 !important;
  color: #fff !important;
  box-shadow: 0 0 0 0.2rem rgba(9, 93, 168, 0.25) !important;
}

body .btn.btn-sm.btn-outline-primary.js-ajax-modal:active,
body a.btn.btn-sm.btn-outline-primary.js-ajax-modal:active,
body .js-ajax-modal.btn.btn-sm.btn-outline-primary:active,
body a.js-ajax-modal.btn.btn-sm.btn-outline-primary:active,
body .btn.btn-sm.btn-outline-primary:active,
body .btn-sm.btn-outline-primary.js-ajax-modal:active,
body a.btn.btn-sm.btn-outline-primary:active {
  background-color: #074a8a !important;
  border-color: #074a8a !important;
  color: #fff !important;
}

/* Even more specific override for stubborn styles */
html body div .btn-outline-primary {
  color: #095DA8 !important;
  border-color: #095DA8 !important;
}

html body div .btn-outline-primary:hover {
  background-color: #095DA8 !important;
  border-color: #095DA8 !important;
  color: #fff !important;
}

/* Nuclear option - target by exact class combination */
.js-ajax-modal.btn.btn-sm.btn-outline-primary.js-modalified {
  color: #095DA8 !important;
  border-color: #095DA8 !important;
  background-color: transparent !important;
}

.js-ajax-modal.btn.btn-sm.btn-outline-primary.js-modalified:hover {
  background-color: #095DA8 !important;
  border-color: #095DA8 !important;
  color: #fff !important;
}

/* Override CSS Custom Properties for btn-outline-primary */
.btn-outline-primary {
  --bs-btn-color: #095DA8 !important;
  --bs-btn-border-color: #095DA8 !important;
  --bs-btn-hover-color: #fff !important;
  --bs-btn-hover-bg: #095DA8 !important;
  --bs-btn-hover-border-color: #095DA8 !important;
  --bs-btn-focus-shadow-rgb: 9, 93, 168 !important;
  --bs-btn-active-color: #fff !important;
  --bs-btn-active-bg: #074a8a !important;
  --bs-btn-active-border-color: #074a8a !important;
  --bs-btn-disabled-color: #095DA8 !important;
  --bs-btn-disabled-border-color: #095DA8 !important;
}

/* Also override for specific button combinations */
body .btn-outline-primary,
body a.btn-outline-primary,
body .js-ajax-modal.btn-outline-primary {
  --bs-btn-color: #095DA8 !important;
  --bs-btn-border-color: #095DA8 !important;
  --bs-btn-hover-color: #fff !important;
  --bs-btn-hover-bg: #095DA8 !important;
  --bs-btn-hover-border-color: #095DA8 !important;
  --bs-btn-focus-shadow-rgb: 9, 93, 168 !important;
  --bs-btn-active-color: #fff !important;
  --bs-btn-active-bg: #074a8a !important;
  --bs-btn-active-border-color: #074a8a !important;
  --bs-btn-disabled-color: #095DA8 !important;
  --bs-btn-disabled-border-color: #095DA8 !important;
}

/* Spinners */
.spinner-border.text-primary {
  color: #095DA8 !important;
}

.spinner-grow.text-primary {
  color: #095DA8 !important;
}

/* Toast */
.toast-header {
  border-bottom: 1px solid rgba(9, 93, 168, 0.2) !important;
}

/* Modal */
.modal-header {
  border-bottom: 1px solid rgba(9, 93, 168, 0.125) !important;
}

/* Range Slider */
.form-range:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(9, 93, 168, 0.25) !important;
}

.form-range:focus::-moz-range-thumb {
  box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(9, 93, 168, 0.25) !important;
}

.form-range::-webkit-slider-thumb:active {
  background-color: #b3d9ff !important;
}

.form-range::-moz-range-thumb:active {
  background-color: #b3d9ff !important;
}

/* Final Override - Force Blue Color on ALL outline-primary buttons */
* .btn-outline-primary,
*[class*="btn-outline-primary"] {
  --bs-btn-color: #095DA8 !important;
  --bs-btn-border-color: #095DA8 !important;
  --bs-btn-hover-bg: #095DA8 !important;
  --bs-btn-hover-color: #fff !important;
  --bs-btn-active-bg: #074a8a !important;
  --bs-btn-active-color: #fff !important;
  color: #095DA8 !important;
  border-color: #095DA8 !important;
}

* .btn-outline-primary:hover,
*[class*="btn-outline-primary"]:hover {
  background-color: #095DA8 !important;
  border-color: #095DA8 !important;
  color: #fff !important;
}

/* Ultimate Nuclear Option - target exact selector */
a[href*="user_profile_edit"].btn.btn-sm.btn-outline-primary {
  --bs-btn-color: #095DA8 !important;
  --bs-btn-border-color: #095DA8 !important;
  color: #095DA8 !important;
  border-color: #095DA8 !important;
}

/* Fix btn-link CSS Variables to use blue instead of purple */
.btn-link {
  --bs-btn-font-weight: 400 !important;
  --bs-btn-color: #095DA8 !important;
  --bs-btn-bg: transparent !important;
  --bs-btn-border-color: transparent !important;
  --bs-btn-hover-color: #fff !important;
  --bs-btn-hover-bg: #095DA8 !important;
  --bs-btn-hover-border-color: transparent !important;
  --bs-btn-active-color: #fff !important;
  --bs-btn-active-bg: #074a8a !important;
  --bs-btn-active-border-color: transparent !important;
  --bs-btn-disabled-color: #869ab8 !important;
  --bs-btn-disabled-border-color: transparent !important;
  --bs-btn-box-shadow: 0 0 0 #000 !important;
  --bs-btn-focus-shadow-rgb: 9, 93, 168 !important;
  text-decoration: none !important;
  color: #095DA8 !important;
}

.btn-link:hover {
  color: #fff !important;
  background-color: #095DA8 !important;
}

.btn-link:focus {
  color: #fff !important;
  background-color: #095DA8 !important;
  box-shadow: 0 0 0 0.2rem rgba(9, 93, 168, 0.25) !important;
}

.btn-link:active {
  color: #fff !important;
  background-color: #074a8a !important;
}

/* Fix btn-secondary hover contrast */
.btn-secondary {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  color: #fff !important;
}

.btn-secondary:hover {
  background-color: #5c636a !important;
  border-color: #565e64 !important;
  color: #fff !important;
}

.btn-secondary:focus {
  background-color: #5c636a !important;
  border-color: #565e64 !important;
  color: #fff !important;
  box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25) !important;
}

.btn-secondary:active {
  background-color: #565e64 !important;
  border-color: #51585e !important;
  color: #fff !important;
}

/* Fix app store buttons hover visibility */
.btn-outline-secondary {
  color: #6c757d !important;
  border-color: #6c757d !important;
  background-color: transparent !important;
}

.btn-outline-secondary:hover {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  color: #fff !important;
}

.btn-outline-secondary:focus {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  color: #fff !important;
  box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25) !important;
}

.btn-outline-secondary:active {
  background-color: #5c636a !important;
  border-color: #565e64 !important;
  color: #fff !important;
}

/* Ensure app store button text and icons are visible on hover */
.btn-outline-secondary svg {
  color: inherit !important;
}

/* Fix text color for small elements in outline secondary buttons on hover */
.btn-outline-secondary:hover small,
.btn-outline-secondary:hover .text-muted {
  color: #fff !important;
}

.btn-outline-secondary:focus small,
.btn-outline-secondary:focus .text-muted {
  color: #fff !important;
}

.btn-outline-secondary:active small,
.btn-outline-secondary:active .text-muted {
  color: #fff !important;
}

/* Fix btn-success hover contrast */
.btn-success {
  background-color: #198754 !important;
  border-color: #198754 !important;
  color: #fff !important;
}

.btn-success:hover {
  background-color: #157347 !important;
  border-color: #146c43 !important;
  color: #fff !important;
}

.btn-success:focus {
  background-color: #157347 !important;
  border-color: #146c43 !important;
  color: #fff !important;
  box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25) !important;
}

.btn-success:active {
  background-color: #146c43 !important;
  border-color: #13653f !important;
  color: #fff !important;
}

/* Fix btn-outline-danger hover contrast */
.btn-outline-danger {
  color: #dc3545 !important;
  border-color: #dc3545 !important;
  background-color: transparent !important;
}

.btn-outline-danger:hover {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
  color: #fff !important;
}

.btn-outline-danger:focus {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
  color: #fff !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.btn-outline-danger:active {
  background-color: #b02a37 !important;
  border-color: #a02834 !important;
  color: #fff !important;
}

/* Fix notification and account dropdown button hover */
.btn-light {
  background-color: #f8f9fa !important;
  border-color: #f8f9fa !important;
  color: #212529 !important;
}

.btn-light:hover {
  background-color: #095DA8 !important;
  border-color: #095DA8 !important;
  color: #fff !important;
}

.btn-light:focus {
  background-color: #095DA8 !important;
  border-color: #095DA8 !important;
  color: #fff !important;
  box-shadow: 0 0 0 0.2rem rgba(9, 93, 168, 0.25) !important;
}

.btn-light:active {
  background-color: #074a8a !important;
  border-color: #074a8a !important;
  color: #fff !important;
}

/* Fix for dropdown button icons and text on hover */
.btn-light:hover svg,
.btn-light:hover .small {
  color: #fff !important;
}

.btn-light:focus svg,
.btn-light:focus .small {
  color: #fff !important;
}

.btn-light:active svg,
.btn-light:active .small {
  color: #fff !important;
}