/**
 * Moduuli: 07-single.css
 * Description: Yksittäisen artikkelin (Single Post) tyylit.
 * Version: 1.0
 */

.single .site-main {
	margin-top: 2rem;
}

.back-button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9rem;
	font-weight: 700;
	color: #6c6c6c;
	text-transform: uppercase;
	margin-bottom: 1.5rem;
}
.back-button:hover {
	color: #024f91;
}

.single .entry-title {
	text-transform: uppercase;
	font-size: 2.4rem;
	font-weight: 700;
	margin-top: 0;
	margin-bottom: 0.75rem;
}

.entry-meta {
	font-size: 0.8rem;
	color: #6c6c6c;
	margin-bottom: 1.5rem;
	text-transform: uppercase;
}

.entry-meta strong {
	color: #4c4c4c;
}

.entry-meta .byline a {
	color: #024f91;
	font-weight: 700;
}

.entry-meta .byline a:hover {
	text-decoration: none;
}

.single .post-thumbnail {
	margin-bottom: 1.5rem;
	position: relative;
	max-width: 720px;
	margin-left: 0;
	margin-right: auto;
}

.entry-content img,
.post-thumbnail img {
	max-width: 100%;
	height: auto;
	display: block;
	object-fit: contain;
	object-position: left;
	width: 100%;
	cursor: pointer;
}

.post-thumbnail-caption,
.entry-content .wp-block-image figcaption,
.lightbox-caption {
	background-color: #024f91;
    color: #ffffff;
    padding: 0.75rem calc(1.5rem + 30px) 0.75rem 1.2rem;
    font-size: 0.9rem;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 5;
    clip-path: polygon(0 0, 100% 0, calc(100% - 20px) 100%, 0 100%);
    display: inline-block;
    width: auto;
}

.post-thumbnail-caption strong,
.entry-content .wp-block-image figcaption strong,
.lightbox-caption strong {
    font-weight: 800;
}

.post-thumbnail-caption {
    position: absolute;
    bottom: -20px;
    left: 8px;
}

.entry-content .wp-block-image {
	max-width: 720px;
	margin-left: 0;
	margin-right: auto;
	margin-bottom: 1.5rem;
}

.entry-content .wp-block-image.aligncenter {
	margin-left: auto;
	margin-right: auto;
}

.entry-content .wp-block-image figcaption {
	position: relative;
	margin-top: -30px;
	margin-left: 8px;
}

.entry-actions {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
	padding-top: 30px;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid #eee;
	flex-wrap: wrap;
}

.reading-time,
.save-post-button,
.comments-link,
.like-post-button,
.share-button,
.listen-button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9rem;
	color: #6c6c6c;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
}

.reading-time svg,
.save-post-button svg,
.comments-link svg,
.like-post-button svg,
.share-button svg,
.listen-button svg {
	fill: currentColor;
}

.save-post-button.saved,
.like-post-button.liked,
.listen-button.is-playing {
	color: #024f91;
	font-weight: 700;
}

.save-post-button:hover,
.comments-link:hover,
.like-post-button:hover,
.share-button:hover,
.listen-button:hover {
	color: #024f91;
}

@media screen and (min-width: 783px) {
    .single .kalajokinen-container.has-sidebar {
        gap: 0;
    }
    .single .widget-area {
        margin-left: 2rem;
    }

	.reading-time .reading-time-label,
	.save-post-button span,
	.listen-button span {
		max-width: 0;
		overflow: hidden;
		white-space: nowrap;
		transition: max-width 0.35s ease-in-out;
		display: inline-block;
		vertical-align: middle;
	}

	.reading-time:hover .reading-time-label,
	.save-post-button:hover span,
	.listen-button:hover span {
		max-width: 150px;
	}

	.reading-time-value {
		padding-left: 0.25em;
	}

	.reading-time:hover .reading-time-value {
		padding-left: 0;
	}
}

.share-button-container {
	position: relative;
}

.share-options {
	display: none;
	position: absolute;
	top: calc(100% + 5px);
	left: 0;
	background-color: #fff;
	border: 1px solid #eee;
	border-radius: 5px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
	z-index: 10;
	padding: 0.5rem;
	gap: 0.75rem;
}

.share-button-container.is-open .share-options {
	display: flex;
}

.share-link,
.share-copy-link {
	color: #4c4c4c;
	transition: transform 0.2s ease;
	display: flex;
	align-items: center;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
}

.share-link svg {
	width: 20px;
	height: 20px;
}

.share-link:hover {
	transform: scale(1.1);
	color: #024f91;
}

.share-copy-link .copy-success {
	font-size: 0.8rem;
	color: #024f91;
	font-weight: 700;
	white-space: nowrap;
}

.entry-tags {
	margin: 2rem 0;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.tags-title {
	font-weight: 700;
}

.entry-tags .tag-pill {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 700;
	color: #4c4c4c;
	transition: transform 0.2s ease;
}

.entry-tags .tag-pill:hover {
	transform: translateY(-2px);
}

.tag-color-1 { background-color: #a7c7e7; }
.tag-color-2 { background-color: #b2d8d8; }
.tag-color-3 { background-color: #fdd9b5; }
.tag-color-4 { background-color: #d8bfd8; }
.tag-color-0 { background-color: #c1e1c1; }
