/**
 * Frontend styles for Templates Showcase Block
 */

.ab-templates-showcase {
	padding: 3rem 2rem;
	max-width: 1200px;
	margin: 0 auto;
}

.ab-templates-showcase-header {
	text-align: center;
	margin-bottom: 3rem;
}

.ab-templates-showcase-header h2 {
	margin: 0 0 0.5rem;
	font-size: 2.5rem;
	font-weight: 700;
	color: #1e1e1e;
	line-height: 1.2;
}

/* Loading state */
.ab-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 4rem 2rem;
	text-align: center;
}

.ab-spinner {
	width: 48px;
	height: 48px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #2271b1;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.ab-loading p {
	margin-top: 1rem;
	color: #757575;
	font-size: 1.125rem;
}

/* Error state */
.ab-error {
	padding: 2rem;
	background: #fee;
	border: 1px solid #fcc;
	border-radius: 8px;
	color: #c33;
	text-align: center;
}

.ab-no-templates {
	padding: 3rem;
	text-align: center;
	color: #757575;
	font-size: 1.125rem;
}

/* Templates grid */
.ab-templates-grid {
	display: grid;
	gap: 2rem;
	margin-bottom: 2rem;
}

@media (max-width: 768px) {
	.ab-templates-grid {
		grid-template-columns: 1fr !important;
	}
}

@media (min-width: 769px) and (max-width: 1024px) {
	.ab-templates-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

/* Template card */
.ab-template-card {
	position: relative;
	padding: 2rem;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 12px;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	overflow: hidden;
}

.ab-template-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
	border-color: #2271b1;
}

/* Badges */
.ab-category-badge {
	position: absolute;
	top: 1rem;
	right: 1rem;
	padding: 0.375rem 0.875rem;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-radius: 6px;
	color: #fff;
	z-index: 1;
	background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

/* Default category badge style */
.ab-category-badge {
	background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.ab-category-content { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.ab-category-interactive { background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%); }
.ab-category-layout { background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%); }
.ab-category-marketing { background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%); }
.ab-category-social { background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%); }
.ab-category-starter { background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%); }
.ab-category-general { background: linear-gradient(135deg, #6c757d 0%, #495057 100%); }

.ab-legacy-badge {
	position: absolute;
	top: 1rem;
	left: 1rem;
	padding: 0.375rem 0.875rem;
	background: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-radius: 6px;
	z-index: 1;
}

/* Icon */
.ab-template-icon {
	font-size: 4rem;
	text-align: center;
	margin-bottom: 1.5rem;
	line-height: 1;
}

/* Title and description */
.ab-template-name {
	margin: 0 0 1rem;
	font-size: 1.5rem;
	font-weight: 700;
	color: #1e1e1e;
	line-height: 1.3;
}

.ab-template-description {
	margin: 0 0 1.5rem;
	color: #616161;
	line-height: 1.7;
	font-size: 1rem;
}

/* Meta info */
.ab-template-meta {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.ab-render-mode {
	padding: 0.375rem 1rem;
	font-size: 0.875rem;
	font-weight: 600;
	border-radius: 6px;
	text-transform: capitalize;
}

.ab-render-static {
	background: #e8f5e9;
	color: #2e7d32;
}

.ab-render-dynamic {
	background: #fff3e0;
	color: #e65100;
}

.ab-render-interactive {
	background: #e3f2fd;
	color: #1565c0;
}

/* Count */
.ab-templates-count {
	text-align: center;
	padding: 1.5rem;
	color: #757575;
	font-size: 1rem;
	font-weight: 500;
	border-top: 1px solid #e0e0e0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.ab-templates-showcase {
		padding: 2rem 1rem;
	}

	.ab-templates-showcase-header h2 {
		font-size: 2rem;
	}

	.ab-template-card {
		padding: 1.5rem;
	}

	.ab-template-icon {
		font-size: 3rem;
	}

	.ab-template-name {
		font-size: 1.25rem;
	}
}
