/* Shared Styles for TT Latest Post Filter Templates */

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Filter Styles - Shared across all templates */
.tt-latest-post-filter .tt-widget-title-filter {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 30px;
	flex-wrap: wrap;
	gap: 20px;
}

.tt-latest-post-filter .tt-widget-title {
	font-size: 32px;
	font-weight: 700;
	color: #333;
	margin: 0;
}

.tt-latest-post-filter .tt-filter-container {
	position: relative;
}

.tt-latest-post-filter button.tt-filter-button {
	background-color: #033a6d;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5em;
    fill: #ffffff;
    color: #fff;
    border-style: solid;
    border-width: 0 0 0 6px;
    border-color: #00c8ff;
    border-radius: 2px 2px 2px 2px;
    padding: 9px 0;
	box-shadow: inset 0 0 0 0 #00c8ff;
	width: 80px;
}

.tt-latest-post-filter button.tt-filter-button:focus,
.tt-latest-post-filter button.tt-filter-button:hover {
	cursor: pointer;
	background-color: #2370a3;
	box-shadow: inset 300px 0 0 0 #00c8ff;
    transition: .7s ease-out;
    color: #022c52;
}

.tt-latest-post-filter .tt-filter-icon {
	font-size: 16px;
}

.tt-latest-post-filter .tt-filter-dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	background: white;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	padding: 20px;
	min-width: 250px;
	z-index: 1000;
	margin-top: 5px;
}

.tt-latest-post-filter .tt-filter-option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	cursor: pointer;
	transition: color 0.3s ease;
}

.tt-latest-post-filter .tt-filter-option:hover {
	color: #007cba;
}

.tt-latest-post-filter .tt-filter-option input[type="radio"] {
	margin: 0;
	width: 16px;
	height: 16px;
}

.tt-latest-post-filter .tt-filter-separator {
	text-align: center;
	padding: 10px 0;
	margin: 10px 0;
	border-top: 1px solid #e9ecef;
	border-bottom: 1px solid #e9ecef;
}

.tt-latest-post-filter .tt-or-text {
	font-weight: 600;
	color: #007cba;
	font-size: 14px;
}

.tt-latest-post-filter .tt-filter-actions {
	display: flex;
	gap: 10px;
	margin-top: 20px;
	padding-top: 15px;
	border-top: 1px solid #e9ecef;
	flex-direction: column;
	border-radius: 22px;
}

.tt-latest-post-filter .tt-apply-filters,
.tt-latest-post-filter .tt-clear-filters {
	flex: 1;
	padding: 15px 0;
	border-radius: 22px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	cursor: pointer;
	transition: all 0.3s ease;
	border: none;
	width: 100%;
}

.tt-latest-post-filter .tt-apply-filters {
	background: #033A6D;
	color: white;
}

.tt-latest-post-filter .tt-apply-filters:hover {
	background: #005a87;
}

.tt-latest-post-filter .tt-clear-filters {
	background: transparent;
	color: #033A6D;
}

.tt-latest-post-filter .tt-clear-filters:hover {
	background: #5a6268;
}

/* Loading and Error States */
.tt-latest-post-filter .tt-loading {
	text-align: center;
	padding: 40px;
	font-size: 16px;
	color: #666;
	grid-column: 1 / -1;
}

.tt-latest-post-filter .tt-error {
	text-align: center;
	padding: 40px;
	font-size: 16px;
	color: #dc3545;
	background: #f8d7da;
	border: 1px solid #f5c6cb;
	border-radius: 6px;
	grid-column: 1 / -1;
}

.tt-post-card {
	opacity: 0;
	animation: fadeIn 0.5s ease-in-out forwards;
}

/* Post Thumbnail - Shared across all templates */
.tt-post-thumbnail {
	margin-bottom: 15px;
	border-radius: 6px;
	overflow: hidden;
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: center;
}

/* For images */
.tt-post-thumbnail img {
	max-width: 100%;
	max-height: 200px;
	height: auto;
	display: block;
	object-fit: cover;
}

/* For videos - override aspect-ratio */
.tt-post-thumbnail.tt-video-thumbnail {
	aspect-ratio: unset;
	max-height: 300px;
	height: 300px;
}

/* Post Date - Shared across all templates */
.tt-post-date {
	font-size: 12px;
	font-weight: 600;
	color: #666;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 10px;
}

/* Post Title - Shared across all templates */
h3.tt-post-title {
	font-size: 24px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
	margin-bottom: 12px;
	color: #333;
}

.tt-post-title a {
	color: #333;
	text-decoration: none;
	transition: color 0.3s ease;
}

.tt-post-title a:hover {
	color: #007cba;
}

/* Post Description - Shared across all templates */
.tt-post-description {
	font-size: 14px;
	line-height: 1.5;
	color: #666;
}

/* No Posts Message - Shared across all templates */
.tt-no-posts {
	text-align: center;
	padding: 40px;
	font-size: 20px;
	font-weight: 600;
	border-radius: 10px;
	color: #666;
	grid-column: 1 / -1;
	background: #f8f8f8;
}

/* YouTube Video Embed - Shared across all templates */
.tt-post-thumbnail iframe {
	width: 100%;
	height: 300px !important;
	border: none;
	border-radius: 6px;
}


/* Read More Button Styles - Shared across all templates */
.tt-latest-post-filter .tt-read-more-container {
	text-align: center;
	margin-top: 40px;
}

.tt-latest-post-filter .tt-read-more-btn {
	background: #007cba !important;
	color: white !important;
	border: none !important;
	padding: 12px 24px !important;
	border-radius: 4px !important;
	font-size: 16px !important;
	font-weight: 500 !important;
	cursor: pointer !important;
	transition: all 0.3s ease !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	text-decoration: none !important;
}

.tt-latest-post-filter .tt-read-more-btn:hover {
	background: #005a87 !important;
	transform: translateY(-2px) !important;
	color: white !important;
}

.tt-latest-post-filter .tt-read-more-btn:disabled {
	background: #ccc !important;
	cursor: not-allowed !important;
	transform: none !important;
}

.tt-latest-post-filter .tt-loading-spinner {
	font-size: 14px !important;
}


/* Responsive Design - Shared across all templates */
@media (max-width: 768px) {
	.tt-post-thumbnail {
		aspect-ratio: auto;
		margin: 30px 0;
	}

	.tt-latest-post-filter .tt-widget-title-filter {
		flex-direction: column;
		align-items: center;
		gap: 15px;
		margin-bottom: 0px;
	}

	.tt-latest-post-filter .tt-filter-container {
		justify-content: center;
    	display: flex;
		width: 100%;
	}

	.tt-latest-post-filter .tt-widget-title {
		font-size: 24px;
	}

	.tt-latest-post-filter .tt-filter-dropdown {
		right: auto;
		left: 0;
		width: 100%;
	}

	.tt-latest-post-filter .tt-filter-actions {
		flex-direction: column;
		gap: 8px;
	}
}
