/**
 * Frontend styles for Newsletter Detail Block
 */

.wp-block-custom-newsletter-detail {
	margin: 2rem 0;
}

.wp-block-custom-newsletter-detail.no-posts {
	padding: 1.5rem;
	background-color: #f9f9f9;
	border-left: 4px solid #ddd;
	border-radius: 4px;
}

.newsletter-detail-item {
	margin-bottom: 1.5rem;
}

/* ============================================
   Remove focus outline on mouse click
   ============================================ */
.newsletter-detail-item summary:focus,
.newsletter-detail-item.is-layout-flow summary:focus,
:root :where(.newsletter-detail-item summary:focus) {
	outline: 0 !important;
	outline-width: 0 !important;
	outline-style: none !important;
	outline-color: transparent !important;
	box-shadow: none !important;
	border-color: var(--wp--preset--color--blau-5) !important;
	-webkit-tap-highlight-color: transparent !important;
}

.newsletter-detail-item summary::-moz-focus-inner {
	border: 0 !important;
}

.newsletter-detail-item summary::-webkit-focus-inner {
	border: 0 !important;
}

/* Keep outline for keyboard navigation (accessibility) */
.newsletter-detail-item summary:focus-visible {
	outline: 2px solid var(--wp--preset--color--rot-1) !important;
	outline-offset: 2px !important;
}

/* ============================================
   Custom Disclosure Triangle
   ============================================ */

/* Hide default marker */
.newsletter-summary {
	list-style: none;
	position: relative;
	padding-right: 2rem;
	cursor: pointer;
	font-family: inherit;
}

.newsletter-summary::-webkit-details-marker {
	display: none;
}

/* Add SVG chevron on the right (matches dropdown filter chevron) */
.newsletter-summary::after {
	content: "";
	position: absolute;
	right: 0.5rem;
	top: 50%;
	width: 14px;
	height: 14px;
	transform: translateY(-50%) rotate(-90deg);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23274b6d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: contain;
	transition: transform 0.2s ease;
}

/* Rotate to point up when open */
.newsletter-detail-item[open] .newsletter-summary::after {
	transform: translateY(-50%) rotate(0deg);
}

.newsletter-content {
	padding: 1.5rem;
	background-color: #fff;
	font-family: inherit !important;
}

.newsletter-content > *:first-child {
	margin-top: 0;
}

.newsletter-content > *:last-child {
	margin-bottom: 0;
}

/* ============================================
   Newsletter PDF Download
   Uses default .wp-element-button styling
   ============================================ */

.newsletter-pdf-download {
	margin-top: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.newsletter-summary {
		padding-right: 1.5rem;
	}

	.newsletter-content {
		padding: 1.25rem;
	}
}
