/**
 * Themes List Shortcode Styles
 *
 * Styles for the [eddwp_themes_list] shortcode.
 * Matches Figma design: 3-column grid of theme cards.
 *
 * @package Core
 * @since <next-version>
 */

/* CSS Custom Properties */
.eddwp-themes-grid {
	--eddwp-theme-card-width: 380px;
	--eddwp-theme-card-bg: #ffffff;
	--eddwp-theme-card-border: #171717;
	--eddwp-theme-image-height: 183px;
	--eddwp-theme-title-color: #171717;
	--eddwp-theme-text-color: #292929;
	--eddwp-theme-button-border: #737373;
	--eddwp-theme-column-gap: 30px;
	--eddwp-theme-row-gap: 64px;
	--eddwp-theme-content-padding-top: 24px;
	--eddwp-theme-content-padding-sides: 23px;
	--eddwp-theme-font-serif: 'IBM Plex Serif', Georgia, serif;
	--eddwp-theme-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Grid Container */
.eddwp-themes-grid {
	display: grid;
	grid-template-columns: repeat(3, var(--eddwp-theme-card-width));
	gap: var(--eddwp-theme-row-gap) var(--eddwp-theme-column-gap);
	justify-content: center;
	width: 100%;
	max-width: calc((var(--eddwp-theme-card-width) * 3) + (var(--eddwp-theme-column-gap) * 2));
	margin: 0 auto;
}

/* Card */
.eddwp-theme-card {
	display: flex;
	flex-direction: column;
	width: var(--eddwp-theme-card-width);
	background: var(--eddwp-theme-card-bg);
	overflow: hidden;
}

/* Image Area */
.eddwp-theme-card__image {
	position: relative;
	width: 100%;
	height: var(--eddwp-theme-image-height);
	background: var(--eddwp-theme-card-bg);
	border: 1px solid var(--eddwp-theme-card-border);
	overflow: hidden;
	flex-shrink: 0;
}

.eddwp-theme-card__image img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Content Area */
.eddwp-theme-card__content {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: var(--eddwp-theme-content-padding-top) var(--eddwp-theme-content-padding-sides) 24px;
	border: 1px solid var(--eddwp-theme-card-border);
	border-top: none;
	flex-grow: 1;
}

/* Title */
.eddwp-theme-card__title {
	font-family: var(--eddwp-theme-font-serif);
	font-size: 18px;
	font-weight: 500;
	line-height: 24px;
	color: var(--eddwp-theme-title-color);
	margin: 0;
}

/* Description */
.eddwp-theme-card__description {
	font-family: var(--eddwp-theme-font-sans);
	font-size: 14px;
	font-weight: 400;
	line-height: 18px;
	color: var(--eddwp-theme-text-color);
	margin: 0;
	flex-grow: 1;
}

/* Button */
.eddwp-theme-card__button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	width: 100%;
	padding: 12px 32px;
	margin-top: auto;
	background: var(--eddwp-theme-card-bg);
	border: 1px solid var(--eddwp-theme-button-border);
	border-radius: 12px;
	font-family: var(--eddwp-theme-font-sans);
	font-size: 16px;
	font-weight: 600;
	line-height: 20px;
	letter-spacing: -0.25px;
	color: var(--eddwp-theme-title-color);
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease;
	box-sizing: border-box;
}

.eddwp-theme-card__button:hover,
.eddwp-theme-card__button:focus {
	background: #f5f5f5;
	border-color: var(--eddwp-theme-card-border);
	text-decoration: none;
	color: var(--eddwp-theme-title-color);
}

.eddwp-theme-card__button svg {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
}

/* Empty State */
.eddwp-themes-empty {
	text-align: center;
	font-family: var(--eddwp-theme-font-sans);
	font-size: 16px;
	color: var(--eddwp-theme-text-color);
	padding: 40px 20px;
}

/* Responsive: Tablet (2 columns) */
@media (max-width: 1240px) {
	.eddwp-themes-grid {
		grid-template-columns: repeat(2, var(--eddwp-theme-card-width));
		max-width: calc((var(--eddwp-theme-card-width) * 2) + var(--eddwp-theme-column-gap));
	}
}

/* Responsive: Mobile (1 column, fluid width) */
@media (max-width: 820px) {
	.eddwp-themes-grid {
		--eddwp-theme-card-width: 100%;
		grid-template-columns: 1fr;
		max-width: 100%;
		gap: 40px;
		padding: 0 16px;
	}

	.eddwp-theme-card {
		width: 100%;
	}
}
