/**
 * Weather Summary Pattern Styles
 * Ensures the snow reporter message box fills available space
 */

/* Vertical separator in top snowfall section */
.sierra-weather-summary .wp-block-separator {
    height: auto !important;
    min-height: 100%;
    align-self: stretch;
    margin: 0;
	width: 1px !important;
    color: var(--wp--preset--color--last-light);
}

/* Status value formatting (Lifts/Runs/Groomed) */
.weather-status-value {
	/* Reset base styles - let HTML markup control typography */
	font-weight: normal !important;
	font-style: normal !important;
}

.weather-status-value .status-value {
	/* Main number: bold, italic, 20px (inherited from parent paragraph) */
	font-weight: 900;
	font-style: italic;
}

.weather-status-value .status-total {
	/* "/total" text: 16px, normal weight, normal style */
	font-size: 16px;
	font-weight: 400;
	font-style: normal;
}

/* Server-rendered truncated text */
.snow-reporter-text-truncated {
	display: inline;
}

/* Snow Reporter Message "More" Link */
.snow-reporter-more-btn {
	background: none;
	border: none;
	color: currentColor;
	font-size: inherit;
	font-weight: inherit;
	font-family: inherit;
	cursor: pointer;
	padding: 0;
	margin: 0;
	transition: opacity 0.2s ease;
	text-decoration: none;
	opacity: 0.8;
	display: inline;
	vertical-align: baseline;
	line-height: inherit;
}

.snow-reporter-more-btn:hover {
	opacity: 1;
	text-decoration: underline;
}

/* Modal Overlay */
.snow-reporter-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: none;
}

.snow-reporter-modal-overlay.active {
	background: rgba(0, 0, 0, 0.7);
	opacity: 1;
	pointer-events: auto;
}

/* Modal Content */
.snow-reporter-modal-content {
	position: fixed;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	transform-origin: center center;
	will-change: transform, left, top, width, height;
}

.snow-reporter-modal-content.expanded {
	left: 50% !important;
	top: 50% !important;
	transform: translate(-50%, -50%) scale(1.02);
	width: min(900px, 90vw) !important;
	max-height: 80vh !important;
	height: auto !important;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Modal Inner Container */
.snow-reporter-modal-inner {
	position: relative;
	max-height: 80vh;
	overflow-y: auto;
	padding-bottom: 20px;

	/* Smooth scrolling */
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.snow-reporter-modal-inner::-webkit-scrollbar {
	width: 8px;
}

.snow-reporter-modal-inner::-webkit-scrollbar-track {
	background: transparent;
}

.snow-reporter-modal-inner::-webkit-scrollbar-thumb {
	background-color: rgba(255, 255, 255, 0.3);
	border-radius: 4px;
}

/* Full Message Styling */
.snow-reporter-full-message {
	margin-top: var(--wp--preset--spacing--large);
	font-size: 18px;
	line-height: 1.6;
	color: var(--wp--preset--color--snowcap-sage);
	word-wrap: break-word;
}

/* Preserve formatting in modal message */
.snow-reporter-full-message {
	white-space: normal;
	line-height: 1.8;
}

/* Create proper paragraph spacing with double br tags */
.snow-reporter-full-message br + br {
	display: block;
	content: "";
	margin-bottom: 1em;
}

.snow-reporter-full-message p {
	margin: 0 0 1em 0;
	line-height: 1.6;
}

.snow-reporter-full-message p:last-child {
	margin-bottom: 0;
}

.snow-reporter-full-message p:first-child {
	margin-top: 0;
}

.snow-reporter-full-message strong {
	font-weight: 700;
}

.snow-reporter-full-message em {
	font-style: italic;
}

.snow-reporter-full-message a {
	color: var(--wp--preset--color--sierra-gold);
	text-decoration: underline;
}

.snow-reporter-full-message a:hover {
	opacity: 0.8;
}

/* Close Button */
.snow-reporter-close-btn {
	position: absolute;
	top: 20px;
	right: 20px;
	background: rgba(255, 255, 255, 0.1);
	border: 2px solid var(--wp--preset--color--snowcap-sage);
	border-radius: 50%;
	width: 48px;
	height: 48px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s ease;
	z-index: 10;
	flex-shrink: 0;
	overflow: visible;
}

.snow-reporter-close-btn svg {
	width: 24px;
	height: 24px;
	display: block;
	flex-shrink: 0;
	transition: transform 0.2s ease;
	color: var(--wp--preset--color--snowcap-sage);
}

.snow-reporter-close-btn svg path {
	stroke: var(--wp--preset--color--snowcap-sage);
}

.snow-reporter-close-btn:hover {
	background: rgba(255, 255, 255, 0.2);
}

.snow-reporter-close-btn:hover svg {
	transform: rotate(90deg);
}

.snow-reporter-close-btn:focus {
	outline: 2px solid var(--wp--preset--color--sierra-gold);
	outline-offset: 2px;
}

/* Accessibility: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
	.snow-reporter-modal-overlay,
	.snow-reporter-modal-content,
	.snow-reporter-close-btn {
		transition-duration: 0.01ms !important;
	}

	.snow-reporter-modal-content.expanded {
		transform: translate(-50%, -50%) scale(1) !important;
	}
}

/* Mobile Responsive */
@media (max-width: 768px) {
	.snow-reporter-modal-content.expanded {
		width: 95vw !important;
		max-height: 85vh !important;
	}

	.snow-reporter-close-btn {
		width: 40px;
		height: 40px;
		top: 16px;
		right: 16px;
	}

	.snow-reporter-full-message {
		font-size: 16px;
	}
}