:root {
    /** Colors **/
    --color-gray-light: #C6C4C4;
    --color-red-bright: #F06A6A;
    --color-orange-peach: #EC8E71;
    --color-yellow-gold: #F1BD6C;
    --color-yellow-light: #F8DF72;
    --color-green-pale: #B3DF97;
    --color-teal-light: #84C9A9;
    --color-cyan: #4ECBC4;
    --color-cyan-light: #9EE7E3;
    --color-blue-vivid: #4673D2;
    --color-purple-lavender: #A69FF3;
    --color-purple-soft: #CE95EA;
    --color-pink-light: #F9AAEF;
    --color-pink-bright: #F26FB2;
    --color-gray-dark: #6D6E6F;
}

/* Light theme styling start here */
[data-bs-theme="light"] {
    --bs-primary: #041E42 !important;
    --bs-text-primary: var(--bs-gray-700);
}

[data-bs-theme="light"] body {
    background-image: url('../images/bg-light.jpg');
}

[data-bs-theme="light"] a,
[data-bs-theme="light"] a:hover {
    color: var(--bs-primary);
}

[data-bs-theme="light"] #accordion h6 a,
[data-bs-theme="light"] #accordion h6 a:hover {
    color: var(--bs-white);
    text-decoration: none;
}

[data-bs-theme="light"] .bg-primary {
    background-color: var(--bs-primary) !important;
}

[data-bs-theme="light"] .btn-link,
[data-bs-theme="light"] .btn-link:hover,
[data-bs-theme="light"] .btn-link:active {
    color: var(--bs-text-primary) !important;
    background-color: transparent;
    text-decoration: none;
}

[data-bs-theme="light"] .btn-outline-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: var(--bs-white);
}

[data-bs-theme="light"] .btn-close {
    --bs-btn-close-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3E%3Cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3E%3C/svg%3E");
    --bs-btn-close-color: #FFFFFF;
    --bs-btn-close-opacity: 0.5;
}

[data-bs-theme="light"] #resetButton {
    border-radius: 0;
    color: var(--bs-white) !important;
}

[data-bs-theme="light"] .code-snippet-container,
[data-bs-theme="light"] .accordion-body {
    background-color: var(--bs-tertiary-bg);
}

[data-bs-theme="light"] .nav-link,
[data-bs-theme="light"] .nav-link:hover,
[data-bs-theme="light"] .nav-link:active {
    color: var(--bs-body-color);
}

[data-bs-theme="light"] .accordion-button:not(.collapsed) {
    color: var(--bs-body-bg);
    background-color: var(--bs-primary);
    border-bottom: var(--bs-card-border-width) solid var(--bs-card-border-color);
}

[data-bs-theme="light"] .accordion-button:not(.collapsed) .rounded-pill {
    background-color: var(--bs-white);
    color: var(--bs-primary);
}

[data-bs-theme="light"] .accordion-button.collapsed {
    color: var(--bs-white);
    background-color: var(--bs-gray-600);
    border-bottom: var(--bs-card-border-width) solid var(--bs-card-border-color);
}

[data-bs-theme="light"] .accordion-button .rounded-pill {
    background-color: var(--bs-primary);
}

[data-bs-theme="light"] .card-header {
    color: var(--bs-body-bg);
    background-color: var(--bs-primary);
}

[data-bs-theme="light"] .tower-view .card-header {
    color: var(--bs-primary) !important;
}

[data-bs-theme="light"] .tower-view .text-primary {
    color: var(--bs-dark-rgb) !important;
}

[data-bs-theme="light"] .list-group-item {
    background-color: transparent;
}

[data-bs-theme="light"] #searchResultsMenu {
    background-color: var(--bs-white);
    color: var(--bs-primary);
    border-width: 1px;
}

[data-bs-theme="light"] .active > .page-link,
[data-bs-theme="light"] .page-link.active,
[data-bs-theme="light"] .active > .page-link:hover,
[data-bs-theme="light"] .page-link.active:hover {
    background-color: var(--bs-primary);
    border: var(--bs-pagination-border-width) solid var(--bs-pagination-border-color);
    color: var(--bs-white);
}

[data-bs-theme="light"] .page-link,
[data-bs-theme="light"] .page-link:hover {
    color: var(--bs-text-primary);
    background-color: transparent;
}

[data-bs-theme="light"] .dropdown-item,
[data-bs-theme="light"] .dropdown-item a {
    color: var(--bs-text-primary);
}

[data-bs-theme="light"] .dropdown-item.active,
[data-bs-theme="light"] .dropdown-item:active,
[data-bs-theme="light"] .dropdown-item:focus,
[data-bs-theme="light"] .dropdown-item:hover {
    background-color: transparent;
    color: var(--bs-text-primary);
}

[data-bs-theme="light"] .btn.disabled,
[data-bs-theme="light"] .btn:disabled,
[data-bs-theme="light"] fieldset:disabled .btn {
    background-color: var(--bs-gray-300);
    border-color: var(--bs-gray-300);
    color: var(--bs-gray-500);
}

[data-bs-theme="light"] .btn-primary {
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-disabled-bg: var(--bs-gray-800);
    --bs-btn-disabled-color: var(--bs-gray-600);
    --bs-btn-disabled-border-color: var(--bs-gray-800);
}

[data-bs-theme="light"] #goToResultsBtn.disabled {
    background-color: var(--bs-gray-400);
    color: var(--bs-gray-500);
    border-width: 0;
    opacity: 1;
}

[data-bs-theme="light"] #goToResultsBtn {
    background-color: var(--bs-primary);
    color: var(--bs-white);
    border-width: 0;
}

[data-bs-theme="light"] .btn-outline-primary {
    border: var(--bs-pagination-border-width) solid var(--bs-pagination-border-color);
}

[data-bs-theme="light"] .card .dropdown-toggle,
[data-bs-theme="light"] .card .dropdown-toggle:hover,
[data-bs-theme="light"] .card .dropdown-toggle:active {
    background-color: var(--bs-primary);
    border: 1px solid var(--bs-primary);
    color: var(--bs-white);
}

[data-bs-theme="light"] .card ul.dropdown-menu.show {
    background-color: var(--bs-gray-200);
}

[data-bs-theme="light"] .form-control:focus {
    border-color: var(--bs-border-color);
}

[data-bs-theme="light"] a.btn-primary {
    color: var(--bs-white);
}

/* Light theme styling end here */

/* Dark theme styling start here */
[data-bs-theme="dark"] {
    --bs-primary: #212529 !important;
}

[data-bs-theme="dark"] body {
    background-image: url('../images/bg-dark.jpg');
}

[data-bs-theme="dark"] a {
    color: var(--bs-heading-color);
}

[data-bs-theme="dark"] .bg-primary {
    background-color: var(--bs-primary) !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: var(--bs-secondary-bg) !important;
}

[data-bs-theme="dark"] .btn-link,
[data-bs-theme="dark"] .btn-link:hover,
[data-bs-theme="dark"] .btn-link:active {
    background-color: transparent;
    border-color: transparent;
    text-decoration: none;
    color: var(--bs-white);
}

[data-bs-theme="dark"] .btn-outline-primary {
    background-color: var(--bs-secondary-bg);
    border-color: var(--bs-body-bg);
    color: var(--bs-secondary-color);
}

[data-bs-theme="dark"] #resetButton {
    border-radius: 0;
    color: var(--bs-gray-600) !important;
}

[data-bs-theme="dark"] .code-snippet-container,
[data-bs-theme="dark"] .accordion-body {
    background-color: var(--bs-tertiary-bg);
}

[data-bs-theme="dark"] .nav-link,
[data-bs-theme="dark"] .nav-link:hover,
[data-bs-theme="dark"] .nav-link:active {
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
    color: var(--bs-card-cap-color);
    background-color: var(--bs-border-color);
    border-bottom: var(--bs-card-border-width) solid var(--bs-card-border-color);
}

[data-bs-theme="dark"] .accordion-button.collapsed {
    color: var(--bs-card-cap-color);
    background-color: var(--bs-body-bg);
    border-bottom: var(--bs-card-border-width) solid var(--bs-card-border-color);
}

[data-bs-theme="dark"] .accordion-button .rounded-pill {
    background-color: var(--bs-tertiary-color) !important;
}

[data-bs-theme="dark"] .list-group-item {
    background-color: transparent;
}

[data-bs-theme="dark"] .btn-primary {
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-disabled-bg: var(--bs-gray-800);
    --bs-btn-disabled-color: var(--bs-gray-600);
    --bs-btn-disabled-border-color: var(--bs-gray-800);
}

[data-bs-theme="dark"] #goToResultsBtn.disabled {
    background-color: var(--bs-gray-400);
    color: var(--bs-gray-700);
    border-width: 0;
    opacity: 1;
}

[data-bs-theme="dark"] #goToResultsBtn {
    background-color: var(--bs-gray-800) !important;
    color: var(--bs-gray-500) !important;
    border-width: 0;
}

[data-bs-theme="dark"] .active > .page-link,
[data-bs-theme="dark"] .page-link.active,
[data-bs-theme="dark"] .active > .page-link:hover,
[data-bs-theme="dark"] .page-link.active:hover {
    background-color: var(--bs-primary);
    border: var(--bs-pagination-border-width) solid var(--bs-pagination-border-color);
    color: var(--bs-white);
}

[data-bs-theme="dark"] .page-link,
[data-bs-theme="dark"] .page-link:hover {
    color: var(--bs-secondary-color);
    background-color: transparent;
}

[data-bs-theme="dark"] ul.dropdown-menu.show {
    background-color: var(--bs-gray-600) !important;
}

[data-bs-theme="dark"] .scrolling-wrapper .btn {
    background-color: var(--bs-gray-700) !important;
}

[data-bs-theme="dark"] .btn.disabled,
[data-bs-theme="dark"] .btn:disabled,
[data-bs-theme="dark"] fieldset:disabled .btn {
    background-color: var(--bs-gray-900) !important;
    border-color: var(--bs-gray-900) !important;
    color: var(--bs-gray-700) !important;
}

[data-bs-theme="dark"] .btn-outline-primary {
    border: var(--bs-pagination-border-width) solid var(--bs-pagination-border-color);
}

[data-bs-theme="dark"] .tower-view .card-header {
    color: var(--bs-white) !important;
}

/* Dark theme styling end here */

/* Base styling start here */
.pagination {
    --bs-pagination-font-size: 0.875rem !important;
}

body {
    background-size: cover;
    background-position: bottom;
    background-repeat: no-repeat;
    background-attachment: fixed;
    /*-webkit-user-select: none;*/
    /*-moz-user-select: none;*/,
    /*-ms-user-select: none;*/
    /*user-select: none;*/
}

/* Base styling end here */


.fixed-top .dropdown-toggle::after {
    display: none;
}

*:focus {
    /*border-color: var(--bs-border-color) !important;*/
    box-shadow: none !important;
    outline: none !important;
}

.text-justify {
    text-align: justify;
}

#searchResultsMenu::after {
    display: none;
}

#mainContainer {
    overflow-y: auto; /* Allows vertical scrolling */
    scrollbar-width: none; /* For Firefox */
    -ms-overflow-style: none; /* For Internet Explorer 10+ */
}

/* For Webkit browsers like Chrome, Safari */
#mainContainer::-webkit-scrollbar {
    display: none;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.5);
    }
    100% {
        transform: scale(1);
    }
}

.favorite-heart {
    cursor: pointer;
    display: inline-block;
    animation-fill-mode: forwards; /* Ensure the animation stays at the end state when finished */
}

.favorite-heart.blink {
    animation: pulse 0.6s ease;
}

i.fa-solid.fa-heart.text-light {
    color: #CCCCCC !important;
}

.rounded-pill {
    width: 40px;
}

.train-pill {
    color: #FFFFFF !important;
    --bs-btn-padding-y: .1rem !important;
    --bs-btn-padding-x: .5rem !important;
    --bs-btn-font-size: .75rem !important;
}

.filter-list-icon:after {
    display: none;
}

.card-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-control {
    border-left: 0;
}

.list-view .card-body {
    display: flex;
    flex-direction: column;
    height: 150px;
}

.first-item {
    padding-top: 2.5rem;
}

.list-view .card-text {
    margin-top: auto; /* Pushes it to the bottom */
}

#suggestionBox {
    max-height: 57.1vh;
    overflow-y: auto;
    scrollbar-width: none; /* For Firefox */
    -ms-overflow-style: none; /* For Internet Explorer 10+ */
    z-index: 1060;
}

#suggestionBox::-webkit-scrollbar {
    display: none; /* For WebKit browsers like Chrome and Safari */
}

#suggestionBox .image-container {
    max-height: 85px; /* Fixed height */
    overflow: hidden; /* Hide overflow */
}

#suggestionBox .image-container img {
    object-fit: fill; /* The image will fill the entire container */
    width: 100%; /* Make sure the image stretches to fill the container width */
    height: 100%; /* Make sure the image stretches to fill the container height */
}


#suggestionBox img {
    width: 100%;
}

#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1020;
}

.fixed-bottom {
    z-index: 1020 !important;
}

.modal-backdrop.show {
    opacity: 0.75 !important;
}

.modal-body {
    min-height: 68px;
}

#spinner-overlay .spinner-border {
    color: white; /* Directly apply the color to the spinner inside the overlay */
}

#spinner-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    justify-content: center;
    align-items: center;
}

#save-modal-spinner-overlay,
#edit-modal-spinner-overlay,
#delete-modal-spinner-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    justify-content: center;
    align-items: center;
}

.form-control:focus {
    border-color: var(--bs-border-color);
}

.suggestionBox {
    background-color: var(--bs-body-bg);
}

.accordion-button::after {
    display: none;
}

/* Custom CSS to ensure the image covers the full height */
.img-cover {
    height: 100%; /* Ensure the div takes the full height of its parent */
    background-size: cover; /* Cover the entire area of the div */
    background-position: center; /* Center the background image */
}

/* Optional: Adjust the card body height to fill the available space */
.card-body {
    display: flex;
    flex-direction: column;
}

.accordion-button:not(.collapsed) {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.accordion-collapse.show {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

/* Pagination styling start here */
.page-link,
.page-link:hover,
.active > .page-link,
.page-link.active,
.active > .page-link:hover,
.page-link.active:hover {
    font-size: var(--bs-pagination-font-size);
}

/* Pagination styling end here */

/* Scrolling wrapper styling start here */
.scrolling-wrapper .card {
    flex: 0 0 auto; /* Prevents cards from growing or shrinking */
    width: calc((100% - 40px) / 2.15); /* Default width for larger screens */
}

.scrolling-wrapper {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 20px;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.scrolling-wrapper::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari, Opera */
}

.scrolling-wrapper .card-img-top {
    width: 100%;
    height: 200px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Scrolling wrapper styling end here */

/* Header Button */
.card-header .btn-primary {
    background-color: #FFFFFF;
}

.tower-view .card-header button:after {
    display: none;
}

#dataTableContainer td {
    padding: 0;
}

#dataTableContainer .sticky-header {
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 10;
}

#dataTableContainer .sticky-column {
    position: sticky;
    left: 0;
    background-color: white;
    z-index: 10;
}

#dataTableContainer .sticky-header.sticky-column {
    z-index: 11;
}

#transactionBody .auto-width {
    min-width: 1%; /* Ensures columns take only as much space as needed but can expand */
    max-width: none; /* Prevents Bootstrap from limiting width */
    white-space: nowrap; /* Prevents text wrapping */
    overflow: hidden; /* Hides any overflow */
    text-overflow: ellipsis; /* Adds an ellipsis if the text overflows */
    text-align: center;
}

#transactionBody .blue-background {
    background-color: var(--color-blue-vivid);
    color: white; /* Ensures text is readable on a dark background */
}

#transactionBody .orange-background {
    background-color: var(--color-yellow-gold);
}

/** Live Bank Rates **/
.htns-text-sm a {
    text-decoration: none;
}

#popupModal .modal-header {
    background-color: var(--bs-primary);
    color: var(--bs-white);
}

#popupModal .modal-body {
    max-height: 80vh;
    overflow-y: auto;
}

#popupModal .card .card-body .card-body {
    border-radius: var(--bs-border-radius);
}

/** Handover Reports **/
.card-header a.btn.btn-sm.btn-primary,
.card-header a.btn-primary {
    color: var(--bs-primary);
}

.note-btn {
    background-color: initial !important;
    color: initial !important;
    border: initial !important;
}

.btn.btn-huttons-orange {
    background-color: #FF9900 !important;
}

.btn.btn-default {
    border-color: var(--bs-primary) !important;
}

#filters .btn {
    width: 100% !important;
}

/* Menu Round Icons */
.favourites-container .icon-container {
    text-align: center;
    height: 100%; /* Ensure the container takes full height */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center items horizontally */
    justify-content: flex-start; /* Align items at the top */
}

.favourites-container .icon-circle-title {
    display: block;
    width: 100%;
    white-space: normal; /* Allow text to wrap */
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: x-small;
    font-weight: bold;
    margin-top: 0.5rem; /* Space between icon and text */
    line-height: normal;
}

.favourites-container .icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 48px; /* Adjust size as needed */
    height: 48px; /* Ensure it's square */
    margin: 0 auto; /* Center */
}

.favourites-container .fa {
    font-size: 1.5rem; /* Adjust as needed */
}

@media (min-width: 576px) {
    .favourites-container .col-2 {
        flex: 0 0 auto;
        width: 20%;
    }
}