/* Template 2 - Card Layout Styles */

#wp-workout-template-2,
#wp-workout-template-2 * {
	margin: 0;
	padding: 0;
	border: 0;
	box-sizing: border-box;
	font: inherit;
	vertical-align: baseline;
	background: transparent;
	color: inherit;
	text-decoration: none;
}

#wp-workout-template-2 {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 300px, 1fr ) );
	gap: 20px;
	padding: 20px 0;
	color: var(--woma-body-text-color, #000);
}

/* Exercise Card */
#wp-workout-template-2 .woma-exercise-card {
	background-color: var(--woma-secondary-color, #ffffff);
	border: none;
	border-radius: var(--woma-radius-top, 12px) var(--woma-radius-top, 12px) var(--woma-radius-bottom, 0) var(--woma-radius-bottom, 0);
	box-shadow: 0 2px var(--woma-shadow, 8px) rgba(0, 0, 0, 0.1);
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	display: flex;
	flex-direction: column;
}

#wp-workout-template-2 .woma-exercise-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px var(--woma-shadow, 12px) rgba(0, 0, 0, 0.15);
}

/* Card Header */
#wp-workout-template-2 .woma-exercise-card-header {
	background: linear-gradient(135deg, var(--woma-primary-color, rgb(1,152,122)) 0%, var(--woma-primary-color, rgb(1,152,122)) 100%);
	color: var(--woma-heading-text-color, #ffffff);
	padding: 20px;
	cursor: default;
	transition: background 0.2s ease;
	border-top: 1px solid var(--woma-primary-color, rgb(1,152,122));
	border-left: 1px solid var(--woma-primary-color, rgb(1,152,122));
	border-right: 1px solid var(--woma-primary-color, rgb(1,152,122));
	border-top-left-radius: var(--woma-radius-top, 12px);
	border-top-right-radius: var(--woma-radius-top, 12px);
}

#wp-workout-template-2 .woma-exercise-card-header[tabindex] {
	cursor: pointer;
}

#wp-workout-template-2 .woma-exercise-card-header[tabindex]:hover {
	opacity: 0.95;
}

#wp-workout-template-2 .woma-exercise-card-header[tabindex]:focus {
	outline: 2px solid var(--woma-heading-text-color, #ffffff);
	outline-offset: -2px;
}

#wp-workout-template-2 .woma-exercise-card-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

#wp-workout-template-2 .woma-exercise-card-title h3 {
	margin: 0;
	font-size: 1.25em;
	font-weight: 600;
	line-height: 1.4;
	flex: 1;
}

#wp-workout-template-2 .woma-info-icon {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	color: var(--woma-heading-text-color, #ffffff);
	opacity: 0.9;
}

/* Card Body */
#wp-workout-template-2 .woma-exercise-card-body {
	padding: 20px;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 16px;
	border-left: 1px solid var(--woma-border-color, #e0e0e0);
	border-right: 1px solid var(--woma-border-color, #e0e0e0);
	border-bottom: 1px solid var(--woma-border-color, #e0e0e0);
	border-bottom-left-radius: var(--woma-radius-bottom, 0);
	border-bottom-right-radius: var(--woma-radius-bottom, 0);
}

/* Remove bottom border from card body when accordion is visible (using :has()) */
#wp-workout-template-2 .woma-exercise-card:has(.woma-exercise-accordion:not([hidden])) .woma-exercise-card-body {
	border-bottom: none;
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}


/* Additional fallback using :has() on body itself */
#wp-workout-template-2 .woma-exercise-card-body:has(+ .woma-exercise-accordion:not([hidden])) {
	border-bottom: none;
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}

/* Stats Section */
#wp-workout-template-2 .woma-exercise-stats {
	display: flex;
	align-items: center;
	justify-content: space-around;
	gap: 16px;
	padding: 16px;
	/* background-color: rgba(0, 0, 0, 0.02); */
	border-radius: 8px;
}

#wp-workout-template-2 .woma-stat-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	flex: 1;
}

#wp-workout-template-2 .woma-stat-label {
	font-size: 0.85em;
	color: var(--woma-body-text-color, #666);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-weight: 500;
}

#wp-workout-template-2 .woma-stat-value {
	font-size: 1.5em;
	font-weight: 700;
	color: var(--woma-primary-color, rgb(1,152,122));
	line-height: 1.2;
}

#wp-workout-template-2 .woma-stat-divider {
	width: 1px;
	height: 40px;
	background-color: var(--woma-border-color, #e0e0e0);
	flex-shrink: 0;
}

/* Notes Section */
#wp-workout-template-2 .woma-exercise-notes {
	padding-top: 12px;
	border-top: 1px solid var(--woma-border-color, #e0e0e0);
}

#wp-workout-template-2 .woma-exercise-notes strong {
	color: var(--woma-primary-color, rgb(1,152,122));
	font-weight: 600;
	display: block;
	margin-bottom: 8px;
	font-size: 0.9em;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

#wp-workout-template-2 .woma-exercise-notes p {
	margin: 0;
	font-size: 0.95em;
	line-height: 1.6;
	color: var(--woma-body-text-color, #555);
}

/* Accordion Content */
#wp-workout-template-2 .woma-exercise-accordion {
	padding: 0 20px 20px;
	border-top: 1px solid var(--woma-border-color, #e0e0e0);
	border-left: 1px solid var(--woma-border-color, #e0e0e0);
	border-right: 1px solid var(--woma-border-color, #e0e0e0);
	border-bottom: none;
	background-color: rgba(0, 0, 0, 0.01);
	animation: slideDown 0.3s ease-out;
}

/* When accordion is visible, add bottom border and radius to it */
#wp-workout-template-2 .woma-exercise-accordion:not([hidden]) {
	border-bottom: 1px solid var(--woma-border-color, #e0e0e0);
	border-bottom-left-radius: var(--woma-radius-bottom, 0);
	border-bottom-right-radius: var(--woma-radius-bottom, 0);
}

@keyframes slideDown {
	from {
		opacity: 0;
		max-height: 0;
	}
	to {
		opacity: 1;
		max-height: 1000px;
	}
}

#wp-workout-template-2 .woma-exercise-content {
	color: var(--woma-body-text-color, #000);
	font-size: 0.95em;
	line-height: 1.7;
	padding-top: 16px;
}

#wp-workout-template-2 .woma-exercise-content h1,
#wp-workout-template-2 .woma-exercise-content h2,
#wp-workout-template-2 .woma-exercise-content h3,
#wp-workout-template-2 .woma-exercise-content h4,
#wp-workout-template-2 .woma-exercise-content h5,
#wp-workout-template-2 .woma-exercise-content h6 {
	color: var(--woma-primary-color, rgb(1,152,122));
	margin-top: 1.2em;
	margin-bottom: 0.5em;
	font-weight: 600;
}

#wp-workout-template-2 .woma-exercise-content p {
	margin-bottom: 1em;
}

#wp-workout-template-2 .woma-exercise-content ul,
#wp-workout-template-2 .woma-exercise-content ol {
	padding-left: 1.5em;
	margin-bottom: 1em;
}

#wp-workout-template-2 .woma-exercise-content ul li::marker {
	color: var(--woma-primary-color, rgb(1,152,122));
}

#wp-workout-template-2 .woma-exercise-content ol li::marker {
	color: var(--woma-primary-color, rgb(1,152,122));
}

#wp-workout-template-2 .woma-exercise-content a {
	color: var(--woma-primary-color, rgb(1,152,122));
	text-decoration: underline;
	transition: opacity 0.2s ease;
}

#wp-workout-template-2 .woma-exercise-content a:hover {
	opacity: 0.8;
}

#wp-workout-template-2 .woma-exercise-content strong {
	font-weight: 600;
}

#wp-workout-template-2 .woma-exercise-content em {
	font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
	#wp-workout-template-2 {
		grid-template-columns: 1fr;
		gap: 16px;
		padding: 16px 0;
	}

	#wp-workout-template-2 .woma-exercise-card-header {
		padding: 16px;
	}

	#wp-workout-template-2 .woma-exercise-card-body {
		padding: 16px;
	}

	#wp-workout-template-2 .woma-exercise-stats {
		padding: 12px;
		gap: 12px;
	}

	#wp-workout-template-2 .woma-stat-value {
		font-size: 1.3em;
	}
}

@media (min-width: 1200px) {
	#wp-workout-template-2 {
		grid-template-columns: repeat( auto-fill, minmax( 350px, 1fr ) );
	}
}
