/**
 * Magazine Grid Block Styles
 */

.magazine-grid-block {
	margin: 1rem 0;
}

.magazine-grid-block .block-title {
	margin-bottom: 1rem;
	font-size: 1.2rem;
	font-weight: 600;
	color: #1e1e1e;
}

.magazine-grid-block .loading-placeholder,
.magazine-grid-block .error-placeholder {
	padding: 2rem;
	text-align: center;
	color: #666;
	background: #f9f9f9;
	border-radius: 4px;
}

.magazine-grid-block .error-placeholder {
	color: #d63638;
	background: #fcf0f1;
}

/* Grid Layouts */
.magazine-grid {
	display: grid;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
}

.magazine-grid.layout-2-column {
	grid-template-columns: repeat(2, 1fr);
}

.magazine-grid.layout-3-column {
	grid-template-columns: repeat(3, 1fr);
}

.magazine-grid.layout-4-column {
	grid-template-columns: repeat(4, 1fr);
}

.magazine-grid.layout-masonry {
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Magazine Card Styles */
.magazine-card {
	position: relative;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.magazine-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.magazine-card.has-access {
	border-left: 4px solid #00a32a;
}

.magazine-card.premium-content {
	border-left: 4px solid #d63638;
}

/* Cover Image */
.magazine-cover {
	position: relative;
	width: 100%;
	height: 200px;
	overflow: hidden;
}

.magazine-cover-image {
	width: 100%;
	height: 100%;
	-o-object-fit: cover;
	   object-fit: cover;
	transition: transform 0.3s ease;
}

.magazine-card:hover .magazine-cover-image {
	transform: scale(1.05);
}

.magazine-cover-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	background: #f0f0f0;
	color: #666;
}

.placeholder-icon {
	font-size: 2rem;
	margin-bottom: 0.5rem;
}

.placeholder-text {
	font-size: 0.9rem;
}

/* Overlay Styles */
.magazine-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
	opacity: 0;
	transition: opacity 0.3s ease;
	display: flex;
	align-items: flex-end;
	padding: 1rem;
}

.magazine-card:hover .magazine-overlay {
	opacity: 1;
}

.overlay-content {
	width: 100%;
	color: white;
}

.overlay-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.issue-badge,
.format-badge,
.access-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.issue-badge {
	background: rgba(255, 255, 255, 0.2);
	color: white;
}

.format-badge {
	background: rgba(0, 163, 42, 0.8);
	color: white;
}

.format-badge.format-media {
	background: rgba(0, 115, 202, 0.8);
}

.format-badge.format-hybrid {
	background: rgba(150, 75, 0, 0.8);
}

.access-badge {
	background: rgba(255, 255, 255, 0.9);
	color: #333;
}

.access-badge.owned {
	background: rgba(0, 163, 42, 0.9);
	color: white;
}

.access-badge.subscription {
	background: rgba(150, 75, 0, 0.9);
	color: white;
}

.magazine-date {
	font-size: 0.8rem;
	opacity: 0.8;
}

.overlay-title {
	margin: 0 0 0.5rem 0;
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.3;
}

.overlay-title a {
	color: white;
	text-decoration: none;
}

.overlay-title a:hover {
	text-decoration: underline;
}

.overlay-info {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 1rem;
	font-size: 0.85rem;
	opacity: 0.9;
}

.overlay-pages,
.overlay-price {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.overlay-price {
	font-weight: 600;
	color: #ffd700;
}

.overlay-actions {
	margin-top: 0.5rem;
}

/* Content Styles (for non-overlay layouts) */
.magazine-content {
	padding: 1rem;
}

.magazine-title {
	margin: 0 0 0.5rem 0;
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.3;
}

.magazine-title a {
	color: #1e1e1e;
	text-decoration: none;
}

.magazine-title a:hover {
	color: #0073aa;
	text-decoration: underline;
}

.magazine-excerpt {
	margin-bottom: 0.75rem;
	font-size: 0.9rem;
	line-height: 1.5;
	color: #666;
}

.magazine-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	font-size: 0.8rem;
	color: #888;
}

.issue-number,
.page-count {
	font-weight: 500;
}

/* Action Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	border: none;
	border-radius: 4px;
	font-size: 0.9rem;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.2s ease;
}

.btn-primary {
	background: #0073aa;
	color: white;
}

.btn-primary:hover {
	background: #005a87;
	color: white;
}

.btn-secondary {
	background: #f0f0f1;
	color: #1e1e1e;
	border: 1px solid #c3c4c7;
}

.btn-secondary:hover {
	background: #e0e0e1;
	color: #1e1e1e;
}

/* Responsive Design */
@media (max-width: 768px) {
	.magazine-grid.layout-2-column,
	.magazine-grid.layout-3-column,
	.magazine-grid.layout-4-column {
		grid-template-columns: 1fr;
	}
	
	.magazine-grid.layout-masonry {
		grid-template-columns: 1fr;
	}
	
	.magazine-cover {
		height: 150px;
	}
	
	.magazine-content {
		padding: 0.75rem;
	}
}

@media (max-width: 480px) {
	.magazine-grid {
		gap: 1rem;
	}
	
	.magazine-cover {
		height: 120px;
	}
	
	.overlay-content {
		padding: 0.75rem;
	}
	
	.overlay-title {
		font-size: 1rem;
	}
	
	.magazine-content {
		padding: 0.5rem;
	}
	
	.magazine-title {
		font-size: 1rem;
	}
}

/* Empty State */
.magazine-grid-empty {
	text-align: center;
	padding: 3rem 1rem;
	color: #666;
	font-style: italic;
}

