/**
 * Public styles for Think LMS Subscriptions
 *
 * @package ThinkLMSSubscriptions
 */

.think-lms-subscription-status {
	padding: 10px;
	margin: 10px 0;
	border-radius: 4px;
}

.think-lms-subscription-status.active {
	background-color: #d4edda;
	border: 1px solid #c3e6cb;
	color: #155724;
}

.think-lms-subscription-status.expired {
	background-color: #f8d7da;
	border: 1px solid #f5c6cb;
	color: #721c24;
}

/* Content Restriction Message */
.think-lms-restriction-message {
	background-color: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 4px;
	padding: 20px;
	margin: 20px 0;
	text-align: center;
}

.think-lms-restriction-message p {
	margin: 0 0 15px 0;
	font-size: 16px;
	color: #856404;
}

.think-lms-restriction-message .button {
	display: inline-block;
	padding: 10px 20px;
	background-color: #007cba;
	color: #fff;
	text-decoration: none;
	border-radius: 3px;
	font-weight: 600;
}

.think-lms-restriction-message .button:hover {
	background-color: #005a87;
	color: #fff;
}

/* Purchased Products Shortcode */
.think-lms-purchased-products {
	display: grid;
	gap: 20px;
	margin: 20px 0;
}

.think-lms-purchased-products.columns-1 {
	grid-template-columns: 1fr;
}

.think-lms-purchased-products.columns-2 {
	grid-template-columns: repeat(2, 1fr);
}

.think-lms-purchased-products.columns-3 {
	grid-template-columns: repeat(3, 1fr);
}

.think-lms-purchased-products.columns-4 {
	grid-template-columns: repeat(4, 1fr);
}

.think-lms-purchased-products.columns-5 {
	grid-template-columns: repeat(5, 1fr);
}

.think-lms-purchased-products.columns-6 {
	grid-template-columns: repeat(6, 1fr);
}

.think-lms-product-item {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
	transition: box-shadow 0.3s ease;
}

.think-lms-product-item:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.think-lms-product-thumbnail {
	width: 100%;
	overflow: hidden;
	background: #f5f5f5;
}

.think-lms-product-thumbnail img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.3s ease;
}

.think-lms-product-item:hover .think-lms-product-thumbnail img {
	transform: scale(1.05);
}

.think-lms-product-content {
	padding: 15px;
}

.think-lms-product-title {
	margin: 0 0 10px 0;
	font-size: 16px;
	line-height: 1.4;
}

.think-lms-product-title a {
	color: #333;
	text-decoration: none;
}

.think-lms-product-title a:hover {
	color: #0073aa;
}

.think-lms-product-link {
	margin-top: 10px;
}

.think-lms-custom-link-button {
	display: inline-block;
	background: #0073aa;
	color: #fff;
	padding: 8px 16px;
	border-radius: 4px;
	text-decoration: none;
	font-size: 14px;
	transition: background 0.3s ease;
}

.think-lms-custom-link-button:hover {
	background: #005a87;
	color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
	.think-lms-purchased-products.columns-2,
	.think-lms-purchased-products.columns-3,
	.think-lms-purchased-products.columns-4,
	.think-lms-purchased-products.columns-5,
	.think-lms-purchased-products.columns-6 {
		grid-template-columns: 1fr;
	}
}

/* Hide address fields for virtual products */
.think-lms-hide-address-field {
	display: none !important;
}

/* Cours Element YouTube Video */
.cours-element-youtube-video {
	width: 100%;
	margin-bottom: 30px;
	clear: both;
}

.cours-element-youtube-video > div {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 aspect ratio */
	height: 0;
	overflow: hidden;
	max-width: 100%;
	background: #000;
}

.cours-element-youtube-video iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Cours Element Files */
.cours-element-files {
	margin-top: 30px;
	margin-bottom: 30px;
	clear: both;
}

.cours-element-files h3 {
	margin-top: 0;
	margin-bottom: 15px;
}

.cours-element-files-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.cours-element-files-list li {
	margin-bottom: 10px;
	padding: 8px 0;
	border-bottom: 1px solid #eee;
}

.cours-element-files-list li:last-child {
	border-bottom: none;
}

.cours-element-files-list a {
	display: inline-flex;
	align-items: center;
	color: #0073aa;
	text-decoration: none;
	transition: color 0.3s ease;
}

.cours-element-files-list a:hover {
	color: #005a87;
}

.cours-element-files-list .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
	margin-right: 8px;
}

/* Hide sidebar on cours elements (item post type) */
.think-lms-no-sidebar .sidebar-container,
.think-lms-no-sidebar aside.sidebar-container,
.think-lms-no-sidebar .sidebar,
.think-lms-no-sidebar .widget-area,
.think-lms-no-sidebar .area-sidebar-shop,
.post-type-item .sidebar-container,
.post-type-item aside.sidebar-container,
.post-type-item .sidebar,
.post-type-item .widget-area,
.post-type-item .area-sidebar-shop,
body.single-item .sidebar-container,
body.single-item aside.sidebar-container,
body.single-item .sidebar,
body.single-item .widget-area,
body.single-item .area-sidebar-shop,
body.post-type-archive-item .sidebar-container,
body.post-type-archive-item aside.sidebar-container,
body.post-type-archive-item .sidebar,
body.post-type-archive-item .widget-area,
body.post-type-archive-item .area-sidebar-shop {
	display: none !important;
}

/* Make content take full width of content area (without sidebar) */
.think-lms-no-sidebar .site-content,
.think-lms-no-sidebar .content-area,
.post-type-item .site-content,
body.single-item .site-content,
body.post-type-archive-item .site-content,
.post-type-item .content-area,
body.single-item .content-area,
body.post-type-archive-item .content-area {
	flex: 0 0 100% !important;
	max-width: 100% !important;
}

/* Override Bootstrap grid classes to expand content to fill sidebar space */
.think-lms-no-sidebar .site-content[class*="col-lg-"],
.think-lms-no-sidebar .site-content[class*="col-md-"],
.post-type-item .site-content[class*="col-lg-"],
.post-type-item .site-content[class*="col-md-"],
body.single-item .site-content[class*="col-lg-"],
body.single-item .site-content[class*="col-md-"],
body.post-type-archive-item .site-content[class*="col-lg-"],
body.post-type-archive-item .site-content[class*="col-md-"] {
	flex: 0 0 100% !important;
	max-width: 100% !important;
}

/* Expand content columns to fill available space (replace col-lg-9, col-md-9, etc. with col-lg-12, col-md-12) */
.think-lms-no-sidebar .col-lg-9,
.think-lms-no-sidebar .col-md-9,
.think-lms-no-sidebar .col-lg-8,
.think-lms-no-sidebar .col-md-8,
.think-lms-no-sidebar .col-lg-10,
.think-lms-no-sidebar .col-md-10,
.think-lms-no-sidebar .col-lg-11,
.think-lms-no-sidebar .col-md-11,
.post-type-item .col-lg-9,
.post-type-item .col-md-9,
.post-type-item .col-lg-8,
.post-type-item .col-md-8,
.post-type-item .col-lg-10,
.post-type-item .col-md-10,
.post-type-item .col-lg-11,
.post-type-item .col-md-11,
body.single-item .col-lg-9,
body.single-item .col-md-9,
body.single-item .col-lg-8,
body.single-item .col-md-8,
body.single-item .col-lg-10,
body.single-item .col-md-10,
body.single-item .col-lg-11,
body.single-item .col-md-11,
body.post-type-archive-item .col-lg-9,
body.post-type-archive-item .col-md-9,
body.post-type-archive-item .col-lg-8,
body.post-type-archive-item .col-md-8,
body.post-type-archive-item .col-lg-10,
body.post-type-archive-item .col-md-10,
body.post-type-archive-item .col-lg-11,
body.post-type-archive-item .col-md-11 {
	flex: 0 0 100% !important;
	max-width: 100% !important;
}

