[data-bs-theme="light"] {
    --bs-body-color-rgb: 255, 0, 0;
    --bs-heading-color: rgba(255, 0, 0, .75);
    --bs-card-border-color: rgba(255, 0, 0, .5);
    --bs-nav-link-color: #992D2D;
    --bs-list-group-border-color: #FF4C4C;
    --sidebar-width-expanded: 15rem;
    --sidebar-width-collapsed: 4.5rem;
    --bs-card-color: rgba(245, 245, 245, 1);
}

[data-bs-theme="dark"] {
    color-scheme: dark;
    --bs-heading-color: rgba(172, 0, 0, 1);
    --bs-card-border-color: rgba(172, 0, 0, .5);
    --bs-nav-link-color: #992D2D;
    --bs-list-group-border-color: #FF4C4C;
    --sidebar-width-expanded: 15rem;
    --sidebar-width-collapsed: 4.5rem;
}

html {
  font-size: 70%;
}

.card .card-header,
.modal-header,
.sidebar-header {
    background-color: rgba(255, 0, 0, .15);
    border-color: rgba(172, 0, 0, .5);
}

#wrapper {
    display: flex;
}

#sidebar-wrapper {
    width: var(--sidebar-width-expanded);
    transition: width 0.25s ease-out;
}

#page-content-wrapper {
    flex: 1;
    min-width: 0; /* Important for flex items */
}

#sidebar-wrapper .sidebar-heading {
    padding: 0.875rem 1.25rem;
    font-size: 1.2rem;
    */ background-color: var(--bs-heading-color); */
    color: #ffffff;
}

#sidebar-wrapper .sidebar-heading img {
    padding-left: .5rem
}

.list-group-item,
.list-group-item.active,
.border-bottom,
#sidebar-wrapper .sidebar-heading {
    border-color: var(--bs-card-border-color) !important;
}

.nav-link,
.btn-link,
.link-primary {
    color: rgba(255, 0, 0, .75) !important;
}

.link-primary {
    color: rgba(255, 0, 0, .75) !important;
    text-decoration-line: underline;
    text-decoration-color: rgba(255, 0, 0, .75) !important;
}

[data-bs-theme="dark"] .nav-link,
[data-bs-theme="dark"] .btn-link {
    color: rgba(172, 0, 0, 1);
    font-weight: bold;
}

/* input */
.form-range::-moz-range-thumb {
    margin-right: 1px;
    background-color: #ff0000;
}

.form-check-input:checked {
    background-color: #ff0000;
    border-color: #ff0000;
}

[data-bs-theme="dark"] .form-range::-moz-range-track,
[data-bs-theme="dark"] #timeline-chart {
    background-color: #2b3035;
}

/* buttons */
.btn {
    font-weight: bold;
    /* min-height: 30px */
}

.btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-primary {
   background-color: #ff0000;
   border-color: #ff0000;
}

.btn-primary:hover, .btn-primary:active {
    background-color: #cc3c3c !important;
    border-color: #992D2D !important;
}

.btn-info {
    background-color: #074694;
    border-color: #074694;
    color: #ffffff;
}

.btn-info:hover {
    background-color: #075e94;
    border-color: #075e94;
    color: #ffffff;
}

.btn-secondary {
    background-color: #484848;
    border-color: #484848;
}

.btn-outline-secondary {
    border-color: #484848;
}

.sidebar-text svg {
    color: var(--bs-body-color);
}

/* Collapsed State */
#wrapper.toggled #sidebar-wrapper {
    width: var(--sidebar-width-collapsed);
}

#wrapper.toggled .sidebar-text {
    display: none;
}

#wrapper.toggled #sidebar-wrapper .sidebar-heading {
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}

#wrapper.toggled #sidebar-wrapper .list-group-item {
    text-align: center;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

#wrapper.toggled #sidebar-wrapper .list-group-item .me-2 {
    margin-right: 0 !important;
}

#sidebar-wrapper .list-group-item {
    background-color: transparent;
}

#sidebar-wrapper .list-group-item:hover {
    background-color: rgba(255, 0, 0, 0.25);
}

#sidebar-wrapper .list-group-item.active {
    background-color: rgba(255, 0, 0, 0.5);
    color: var(--bs-list-group-color);
    border-left: 4px solid var(--bs-list-group-border-color);
    border-bottom: none;
    border-top: none
}

.btn-poi {
    width: 32px;
    height: 32px;
    padding: 4px;
    margin: .25em;
    display: inline-block;
	color: var(--bs-light-text-emphasis);
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid var(--bs-light-border-subtle);
	border-radius: 4px;
	background-color: var(--bs-light-bg-subtle);
	transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.btn-poi:hover {
   color: var(--bs-light-bg-subtle);
   border: 1px solid var(--bs-light-bg-subtle);
   background-color: var(--bs-light-text-emphasis);
}

.lucide {margin-bottom: 2px}
.bg-sidebar, .bg-light, footer, .card {background-color: rgba(245, 245, 245, 1);}
[data-bs-theme="dark"] .bg-sidebar, [data-bs-theme="dark"] .bg-light, [data-bs-theme="dark"] footer, [data-bs-theme="dark"] .card {background-color: #2b3035 !important}


#pseudo-terminal {
    background-color: #212529;
    color: #f8f9fa;
    font-family: 'Courier New', Courier, monospace;
    padding: 15px;
    border-radius: 5px;
    height: 150px;
    overflow-y: auto;
    font-size: 0.9em;
    position: relative;
}

#pseudo-terminal-output p {
    margin: 0;
    line-height: 1.5;
    white-space: pre-wrap;
}

#cursor {
    display: inline-block;
    background-color: #f8f9fa;
    width: 10px;
    height: 1.2em;
    animation: blink 1s step-end infinite;
    vertical-align: bottom;
}

@keyframes blink {
    from, to { background-color: transparent }
    50% { background-color: #f8f9fa; }
}

#sidebar-wrapper {
    position: relative;
    z-index: 0;
}

#sidebar-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/sidebar-bg.svg');
    background-repeat: no-repeat;
    background-position: top center;
    background-size: 100% 100%;
    opacity: 0.1;
    z-index: -1;
    color: var(--bs-emphasis-color);
}

[data-bs-theme="dark"] #sidebar-wrapper::before {
    opacity: 0.05;
}


/* Login Page Styles */
@keyframes animated-bg {
    from { background-position: 0 0; }
    to { background-position: -2000px -2000px; }
}

body.login-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/animated-rail-yard-bg.svg');
    background-size: 2000px 2000px;
    animation: animated-bg 40s linear infinite;
    z-index: -1;
    opacity: 0.1;
    color: var(--bs-emphasis-color);
}

[data-bs-theme="dark"] body.login-page::before {
    opacity: 0.2;
}

.login-container {
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    z-index: 2;
    background-color: rgba(var(--bs-body-bg-rgb), 0.75) !important;
}

[data-bs-theme="dark"] .login-container {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* Unassigned Sidebar Panel */
.unassigned-sidebar-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background-color: var(--bs-light-bg-subtle);
    border-left: 1px solid var(--bs-border-color);
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1040;
    display: flex;
    flex-direction: column;
}

.unassigned-sidebar-header {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--bs-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bs-tertiary-bg);
}

.unassigned-sidebar-header h5 {
    margin: 0;
}

.unassigned-sidebar-content {
    overflow-y: auto;
    flex-grow: 1;
}

.unassigned-sidebar-panel.is-open {
    transform: translateX(0);
}

/* Override gantt_printable.css to allow the sidebar to slide over the gantt chart */
.gantt-body {
    position: static;
}

body {
    overflow-x: hidden;
}

.bg-info {
    background-color: #074694 !important;
    border-color: #074694 !important;
    color: #ffffff;
}

.bg-info h6 {
    color: #ffffff !important;

}

[data-bs-theme="dark"] .message-meta,
[data-bs-theme="dark"] .message-content {
    color: #fff
}

.btn-ai,
.bg-ai {
    background-color: #910337;
    border-color: #910337;
    color: #ffffff;
}

.bg-ai h6 {color: #ffffff !important;}

.btn-ai:hover {
   background-color: #a3335c;
   border-color: #a3335c;
   color: #ffffff;
}
/* Ai chat widget */
.ai-chat-container {
    width: 100%;
    z-index: 1050;
    transition: all 0.3s ease-in-out;
}

#ai-chat-messages::-webkit-scrollbar {
    width: 6px;
}

#ai-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

#ai-chat-messages::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.message-bubble {
    word-wrap: break-word;
    position: relative;
    animation: bubble-fade-in 0.3s ease-out forwards;
}

@keyframes bubble-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    column-gap: 4px;
    padding: 8px 12px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: #90949c;
    border-radius: 50%;
    animation: typing-bounce 1.3s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

#ai-chat-toggle-btn {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

#ai-chat-toggle-btn:hover {
    transform: scale(1.1);
}

.ai-chat-body {
    background-color: var(--bs-body-bg);
    scroll-behavior: smooth;
}

/* Feedback & Star Rating */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.star-rating input {
    display: none;
}

.star-rating label {
    cursor: pointer;
    width: 25px;
    height: 25px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ccc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'%3E%3C/polygon%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    margin-right: 5px;
    transition: transform 0.1s ease;
}

.star-rating label:hover {
    transform: scale(1.2);
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%23ffc107' stroke='%23ffc107' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'%3E%3C/polygon%3E%3C/svg%3E");
}

.transition-transform {
    transition: transform 0.2s ease-in-out;
    display: inline-block;
}

.rotate-180 {
    transform: rotate(180deg);
}

.italic {
    font-style: italic;
}

.feedback-item {
    transition: background-color 0.3s ease;
}

.feedback-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.02);
}

[data-bs-theme="dark"] .feedback-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}
