ul.ui-autocomplete {z-index: 1100;}

pre.jCode{counter-reset: line;
	border-right: solid;}
pre.jCode div {
	display: block;
	counter-increment: line !important;
	padding: 0px !important;
	margin-top: 0px !important;
	margin-bottom: 0px !important;
	line-height:1 !important; }
pre.jCode div:before{
	content: counter(line);
	margin-right: 10px !important;
	-webkit-user-select: none;
}
pre div:nth-of-type(odd){background-color: #daf7a6 !important;}

body {
	font-family: "Open Sans";
}

.appTitle {text-decoration: none !important;}

.navbar-title {
    display: flex;
    justify-content: center;
}
.navbar-brand {
    padding: 0;
}
/* Adjust the positioning of the navbar toggler and theme toggle */
.navbar-nav {
    flex-grow: 1;
    justify-content: flex-end; /* Align navbar items to the right on wide screens */
}
.theme-nav {
    display: flex;
    align-items: center;
}
.navbar .theme-nav .btn {
    margin-left: 10px; /* Spacing between nav items and theme toggle button */
}

/* Improve the responsive navbar positioning */
.navbar-nav {
    flex-grow: 1;
    justify-content: flex-end; /* Keep right-aligned to match LOGOUT button */
}

.theme-nav {
    display: flex;
    align-items: center;
    margin-left: 10px; /* Small gap between menu and theme toggle */
}

.navbar .theme-nav .btn {
    margin-left: 10px;
}

/* Adjust positioning specifically for wide screens */
@media (min-width: 992px) {
    #theme-toggle-container {
        display: none;
    }
    
    .navbar-nav {
        justify-content: flex-end; /* Keep menu items right-aligned on desktop */
    }
    
    /* Ensure proper spacing between navbar items and logout/theme toggle */
    .navbar-text {
        margin-left: 15px; /* Add space between menu items and logout */
    }
}

@media (max-width: 991px) {
    /* Ensure navbar has minimum height to contain absolutely positioned elements */
    .navbar {
        min-height: 56px; /* Standard Bootstrap navbar height */
    }
    
    .navbar .container-fluid {
        min-height: 40px; /* Ensure container has enough height */
        position: relative;
    }
    
    #theme-toggle-container {
        position: absolute;
        right: 15px;
        top: 8px;
        z-index: 1050;
    }
    
    .navbar-toggler {
        position: absolute;
        right: 65px;
        top: 8px;
        z-index: 1040;
    }
    
    /* Ensure collapsed menu clears the fixed positioned elements */
    #navbarSupportedContent {
        clear: both;
        margin-top: 10px;
    }
    
    /* Improve navbar title positioning on mobile */
    .navbar-title {
        max-width: calc(100% - 120px);
        overflow: hidden;
        /* Add padding to ensure proper spacing */
        padding-top: 8px;
        padding-bottom: 8px;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
        /* Ensure the brand takes up proper space */
        min-height: 32px;
        display: flex;
        align-items: center;
    }
    
    /* Make sure LOGOUT doesn't overlap with theme toggle */
    .navbar-text {
        margin-left: 0;
        order: 999;
        padding-right: 50px; /* Add padding to avoid theme toggle overlap */
    }
}

/* Fix for very small screens to prevent wrapping */
@media (max-width: 480px) {
    .navbar-brand span {
        font-size: 1rem !important;
    }
    
    #theme-toggle-container {
        right: 12px;
    }
    
    .navbar-toggler {
        right: 55px;
    }
    
    .navbar-text {
        padding-right: 70px; /* Adjust for smaller screens */
    }
}

/* Specific fix for RAP menu item wrapping around 864px */
@media (max-width: 900px) and (min-width: 768px) {
    .navbar-nav .nav-link {
        font-size: 0.9rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .dropdown-toggle::after {
        margin-left: 0.2rem;
    }
}

/* Additional improvement for navbar container */
.navbar .container-fluid {
    position: relative;
}

/* Enhanced LOGOUT positioning */
.navbar-text {
    display: flex;
    align-items: center;
}

.navbar-text .nav-link {
    white-space: nowrap; /* Prevent LOGOUT text from wrapping */
}

/* Ensure theme toggle on wide screens has proper spacing */
@media (min-width: 992px) {
    .theme-nav {
        margin-left: auto; /* Push theme toggle to far right */
        padding-left: 15px; /* Add padding for visual separation */
    }
}

/* Start of REDCap Form Styles */
.form-textbox {
	width: 500px!important;
}

.slider-textbox {
	margin-top: 0.5rem;
	width: 7rem;
}

.zero-padding-margin {
	padding: 0!important;
	margin: 0!important;
}

.section-header {
	font-weight: 600;
	color: #129bae;
}

.rc-form .form-check-input {
	--bs-border-opacity: 1;
    border-color: rgba(108, 117, 125);
}

.pdf-font * {
	font-size: 14px!important;
}

/* .descriptive {
	font-size: 1.2rem;
    font-weight: bold;
} */

.form-alternate {
    background-color: var(--form-alternate-bg) !important;
}

.form-alternate-hover:hover {
    background-color: var(--form-alternate-hover-bg) !important;
    transition: background-color 0.15s ease-in-out;
}

/* For forms that need subtle borders on alternating rows */
.form-alternate-bordered {
    background-color: var(--form-alternate-bg) !important;
    border-color: var(--form-alternate-border) !important;
}

.leap-orange {
	background-color: #fef1e9;
}

.checkbox-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: .5rem;
}

.min-ht {
	min-height: 7rem;
}

#form-container {
	font-size: 1.0rem;
}

#form-container h4 {
	font-size: 1.2rem;
}

.custom-select,
.form-control {
	font-size: 1.0rem;
}

.form-group {
	margin-bottom: 0;
}

.matrix-header {
	font-size: 0.9rem;
	font-weight: bold;
	color: #800000;
}

.tooltip-inner {
	max-width: 500px;
	padding: 20px;
	color: #1b0000;
	font-size: 1rem;
	text-align: center;
	background-color: rgb(255, 255, 255);
	border-radius: .25rem;
    border: 1px solid #160000;
}
/* End of REDCap Form Styles */

.child-row-style > td {
    background-color: var(--child-row-bg) !important;
    border-color: var(--child-row-border) !important;
}

/* Participant info bar button styles */
.btn-info-display {
    color: var(--body-color) !important;
    background-color: var(--participant-info-bg) !important;
    border: 1px solid var(--participant-info-border) !important;
    font-weight: bold;
    transition: all 0.2s ease-in-out;
}

.btn-info-display:hover,
.btn-info-display:focus {
    color: var(--body-color) !important;
    background-color: var(--participant-info-hover-bg) !important;
    border-color: var(--participant-info-border) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-info-display .text-danger {
    color: var(--bg-study) !important;
    font-weight: 600;
}

