/*
 * RSS News Widget — frontend stylesheet.
 *
 * Every rule is scoped under `.rss-news-widget` so it can never leak into the
 * rest of the theme. Elementor's inline CSS (generated from the widget's
 * responsive controls) supplies concrete values for gaps, columns, colors,
 * typography, etc.; the rules below only provide the structural baseline.
 */

.rss-news-widget {
	display: grid;
	box-sizing: border-box;
	width: 100%;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.rss-news-widget.is-list {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.rss-news-widget .rss-news-item {
	display: flex;
	flex-direction: column;
	background: transparent;
	overflow: hidden;
	box-sizing: border-box;
}

.rss-news-widget.is-list .rss-news-item {
	flex-direction: row;
	gap: 20px;
	align-items: flex-start;
}

.rss-news-widget .rss-news-image {
	display: block;
	width: 100%;
	overflow: hidden;
	line-height: 0;
	margin: 0 0 16px 0;
	text-decoration: none;
}

.rss-news-widget.is-list .rss-news-image {
	flex: 0 0 40%;
	max-width: 40%;
	margin: 0;
}

.rss-news-widget .rss-news-image img {
	display: block;
	width: 100%;
	height: 200px;
	object-fit: cover;
	max-width: 100%;
	transition: transform 250ms ease, opacity 250ms ease;
}

.rss-news-widget .rss-news-content {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-width: 0;
}

.rss-news-widget .rss-news-title {
	margin: 0 0 8px 0;
	line-height: 1.3;
	word-wrap: break-word;
}

.rss-news-widget .rss-news-title a {
	color: inherit;
	text-decoration: none;
	transition: color 250ms ease;
}

.rss-news-widget .rss-news-title a:hover,
.rss-news-widget .rss-news-title a:focus {
	text-decoration: underline;
}

.rss-news-widget .rss-news-excerpt {
	margin: 0 0 12px 0;
	line-height: 1.5;
	word-wrap: break-word;
}

.rss-news-widget .rss-news-meta {
	font-size: 0.85em;
	opacity: 0.8;
	margin-top: auto;
}

/*
 * Notice / error states — kept purposely minimal so the site's own
 * typography rules dominate the visual language.
 */

.rss-news-widget.rss-news-widget--notice {
	display: block;
	padding: 16px 20px;
	background: rgba(0, 0, 0, 0.03);
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 4px;
	text-align: center;
}

.rss-news-widget.rss-news-widget--notice p {
	margin: 0;
}

.rss-news-widget.rss-news-widget--error {
	background: rgba(220, 50, 50, 0.05);
	border-color: rgba(220, 50, 50, 0.3);
	text-align: left;
}

.rss-news-widget.rss-news-widget--error code {
	display: inline-block;
	padding: 2px 6px;
	background: rgba(0, 0, 0, 0.05);
	border-radius: 3px;
	font-size: 0.85em;
}

/*
 * Responsive fallback for the list layout — on very narrow viewports we stack
 * the image above the content even when the widget is set to "list", so
 * long-form list items remain readable on phones.
 */
@media (max-width: 480px) {
	.rss-news-widget.is-list .rss-news-item {
		flex-direction: column;
	}
	.rss-news-widget.is-list .rss-news-image {
		flex: 0 0 auto;
		max-width: 100%;
	}
}
