/* Parent container to hold sidebar and accordion */
.dbpjh-course-db-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px; /* Space between sidebar and accordion */
	align-items: flex-start;
}

/* Sidebar styling */
.dbpjh-course-db-filters {
    flex: 1; /* Sidebar takes 1 part of the space */
    max-width: 300px;
    border: 1px solid #ddd;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.dbpjh-filter-section h5,
form#dbpjh-filter-form button {
	margin-top: 20px;
}

/* Accordion styling */
.dbpjh-course-db-accordion {
    flex: 3; /* Accordion takes 3 parts of the space */
    /* border: 1px solid #ddd; */
    background-color: #ffffff;
	padding: 0px;
    border-radius: 5px;
    /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
}

/* Remove deprecated float styles */
.dbpjh-course-filters, .dbpjh-course-accordion {
    float: none;
    width: auto;
}

/* Search Bar */
.dbpjh-search-container {
	display: flex;
	flex-wrap: nowrap;
	gap: 20px;
}
#dbpjh-course-search {
	flex: 5;
}
#dbpjh-search-btn {
	font-family: Antonio, sans-serif;
	color: #ffffff;
	text-transform: uppercase;
	font-weight: 400;
	background-color: #002753;
	cursor: pointer;
	border: 0px;
	border-radius: 3px;
	flex: 1;
}
#dbpjh-search-btn:hover {
	opacity: .85;
}
.dbpjh-course-db-header {
    display: flex;
    flex-wrap: wrap;
    max-width: 100%;
    margin: 0px !important;
    gap: 20px;    
}
.dbpjh-course-db-description {
    flex: 2;
    margin-bottom: 30px;
}
.dbpjh-course-db-description h4 {
	margin-top: 30px;
}
.dbpjh-course-db-video {
    flex: 1;
    position: relative;
    width: 100%;
    height: auto;
}
.dbpjh-course-db-video iframe {
    position: relative;
    width: 100%;
    height: auto; /* Set a fixed height or use aspect-ratio */
    aspect-ratio: 16 / 9;
    border: 0;
    max-width: 100%;
}
.dbpjh-accordion .dbpjh-accordion-item,
#dbpjh-preview-accordion .dbpjh-accordion-item {
    margin-bottom: 1rem;
    border: 1px solid #ccc;
	border-radius: 0.25em;
}
#dbpjh-preview-accordion .dbpjh-accordion-item {
	background-color: #ffffff;
}

.dbpjh-accordion .dbpjh-accordion-header {
    font-weight: bold;
}

.dbpjh-accordion-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
	color: #ffffff;
	background-color: #4c1920;
    width: 24px;
    height: 24px;
    border: 0px;
    border-radius: 50%;
    margin-right: 10px;
    font-size: 16px;
    font-weight: bold;
    transition: transform 0.3s;
    content: "+";
}

.dbpjh-accordion-icon::before {
    content: "+";
}

.dbpjh-accordion-header.active .dbpjh-accordion-icon::before {
    content: "-";
}

.dbpjh-accordion-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    font-size: 16px;
}

.dbpjh-accordion-content {
	padding: 0px 10px 10px;
}
.dbpjh-course-info {
	display: flex;
    flex-wrap: nowrap;
    max-width: 100%;
    margin: 0px;
    gap: 20px;
}
.dbpjh-description-and-prerequisites {
	flex: 4;
}
.dbpjh-accordion-prerequisites {
	font-style: italic;
}
.dbpjh-accordion-professor {
	flex: 1;
	position: relative;
    width: 100%;
    height: auto;
}
.dbpjh-professor {
	text-align: center;
}
.dbpjh-professor p {
	font-size: 0.8em;
	margin: 0px;
}
.dbpjh-accordion .dbpjh-accordion-body ul {
    list-style-type: none;
    padding: 0;
}

#dbpjh-course-results {
	margin-top: 20px;
}

table.dbpjh-accordion-course-info {
	width: auto;
    border-collapse: collapse;
	margin: 0px 10px;
}

.dbpjh-accordion-extra-info-container {
	display: flex;
    flex-wrap: wrap;
	max-width: auto;
	margin-top: 10px;
	gap: 10px;
}
.dbpjh-extra-info {
	flex: 1;
	background-color: #efefef;
}
.dbpjh-extra-info-top {
	color: #ffffff;
	background-color: #002753;
}
.dbpjh-extra-info-top,
.dbpjh-extra-info-bottom {
	padding: 10px;
}
/* Course catalog sticky buttons */
.sticky-buttons {
	background-color: #ffffff;
	position: fixed;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	z-index: 1000;
	display: flex;
	flex-direction: column;
	border-top-left-radius: 0.25em;
	border-bottom-left-radius: 0.25em;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), 
		0 1px 3px rgba(0, 0, 0, 0.2);
	/* Smooth transition for hover effects */
	transition: box-shadow 0.3s ease;
}
.sticky-buttons a {
	color: #ffffff;
	text-decoration: none;
	padding: 10px 15px;
	width: 150px;
	text-align: center;
}
.sticky-buttons a:hover {
	box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15), 
		0 2px 4px rgba(0, 0, 0, 0.12);
}
#dbpjh-sticky-button-1 {
	background-color: #4c1920;
	border-top-left-radius: 0.25em;
}
#dbpjh-sticky-button-1:hover {
	color: #ffffff;
	opacity: .85;
	transition: opacity 0.3s ease;
}
#dbpjh-sticky-button-2 {
	background-color: #002753;
	border-bottom-left-radius: 0.25em;
}
#dbpjh-sticky-button-2:hover {
	color: #ffffff;
	opacity: .85;
	transition: opacity 0.3s ease;
}
@media (max-width: 768px) {
	.sticky-buttons {
		width: 100%;
		bottom: 0;
		top: auto;
		transform: none;
		flex-direction: row;
		justify-content: space-around;
	}

	.sticky-buttons a {
		flex-grow: 1;
	}
}

/* Table view (course_table shortcode, and its admin builder preview) */
.dbpjh-table-wrapper {
	overflow-x: auto;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
table.dbpjh-course-database {
	width: 100%;
	border-collapse: collapse;
	background-color: #ffffff;
}
table.dbpjh-course-database thead th {
	background-color: #4c1920;
	color: #ffffff;
	font-weight: 700;
	text-align: left;
	padding: 16px 20px;
	white-space: nowrap;
}
table.dbpjh-course-database tbody td {
	padding: 16px 20px;
	border: none;
	color: #1a1a1a;
}
table.dbpjh-course-database tbody tr:nth-child(odd) {
	background-color: #ffffff;
}
table.dbpjh-course-database tbody tr:nth-child(even) {
	background-color: #f5f5f5;
}
.dbpjh-course-name-link {
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	font: inherit;
	color: inherit;
	text-align: left;
	cursor: pointer;
	text-decoration: underline;
	text-decoration-style: dotted;
	text-underline-offset: 3px;
}
.dbpjh-course-name-link:hover {
	color: #4c1920;
}

/* Course detail lightbox (table view "click a course name" popup) */
.dbpjh-lightbox-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 100000;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.dbpjh-lightbox-overlay.dbpjh-lightbox-open {
	display: flex;
}
.dbpjh-lightbox-box {
	background: #ffffff;
	border-radius: 8px;
	max-width: 700px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	padding: 30px;
	position: relative;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.dbpjh-lightbox-box h3 {
	margin-top: 0;
	padding-right: 30px;
}
.dbpjh-lightbox-close {
	position: absolute;
	top: 15px;
	right: 15px;
	background: none;
	border: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #666666;
	padding: 0;
}
.dbpjh-lightbox-close:hover {
	color: #000000;
}