/* EPLD Price History Styles */

/* Historia zmian */
.epld-history {
	margin: 15px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.epld-history-header h4 {
	margin: 0 0 10px 0;
	color: #333;
	font-size: 16px;
}

.epld-history-field {
	margin: 5px 0;
	color: #666;
	font-size: 14px;
}

.epld-history-item {
	margin: 12px 0;
	padding: 12px;
	background: #f9f9f9;
	border-left: 3px solid #0073aa;
	border-radius: 4px;
}

/* Style dla grup zmian */
.epld-history-group-item.epld-multiple-changes {
	margin: 15px 0;
	padding: 15px;
	background: #f0f8ff;
	border-left: 4px solid #2271b1;
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.epld-group-header {
	margin-bottom: 12px;
	color: #2271b1;
	font-size: 15px;
}

.epld-group-date {
	font-size: 12px;
	color: #666;
	margin-bottom: 8px;
	font-weight: 500;
}

.epld-group-changes {
	margin-left: 10px;
}

.epld-group-change-item {
	margin: 8px 0;
	padding: 8px 0;
	border-bottom: 1px dotted #ddd;
}

.epld-group-change-item:last-child {
	border-bottom: none;
}

.epld-field-label {
	font-weight: 600;
	color: #333;
	min-width: 120px;
	display: inline-block;
}

.epld-history-date {
	font-size: 12px;
	color: #666;
	margin-bottom: 5px;
}

.epld-history-change {
	font-weight: 500;
}

.epld-old-value {
	color: #dc3232;
	text-decoration: line-through;
	font-weight: normal;
}

.epld-new-value {
	color: #46b450;
	font-weight: bold;
}

.epld-difference {
	font-size: 12px;
	font-weight: normal;
}

.epld-diff-up {
	color: #46b450;
}

.epld-diff-down {
	color: #dc3232;
}

.epld-diff-same {
	color: #666;
}

.epld-history-table {
	width: 100%;
	border-collapse: collapse;
	margin: 10px 0;
}

.epld-history-table th,
.epld-history-table td {
	padding: 8px;
	text-align: left;
	border-bottom: 1px solid #ddd;
}

.epld-history-table th {
	background: #f1f1f1;
	font-weight: 600;
	font-size: 13px;
}

.epld-history-table td {
	font-size: 13px;
}

/* Widget najniższej ceny */
.epld-lowest-price {
	margin: 15px 0;
	padding: 15px;
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.epld-lowest-price-header h4 {
	margin: 0 0 12px 0;
	color: #495057;
	font-size: 16px;
	font-weight: 600;
}

.epld-price-main {
	margin-bottom: 12px;
	text-align: center;
}

.epld-price-value {
	font-size: 24px;
	font-weight: bold;
	color: #28a745;
	display: block;
	margin-bottom: 4px;
}

.epld-price-date {
	font-size: 13px;
	color: #6c757d;
	font-style: italic;
}

.epld-price-stats {
	border-top: 1px solid #dee2e6;
	padding-top: 12px;
	font-size: 13px;
}

.epld-stat-item {
	margin: 6px 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.epld-stat-label {
	color: #495057;
	font-weight: 500;
}

.epld-stat-value {
	font-weight: 600;
}

.epld-stat-value.epld-highest {
	color: #dc3545;
}

.epld-stat-date {
	font-size: 11px;
	color: #6c757d;
	margin-left: 4px;
}

.epld-lowest-price.epld-compact {
	padding: 10px;
	text-align: center;
}

.epld-compact .epld-price-main {
	margin-bottom: 0;
}

.epld-compact .epld-price-value {
	font-size: 18px;
	display: inline;
	margin-right: 8px;
}

.epld-compact .epld-price-date {
	display: inline;
}

/* Responsive styles */
@media (max-width: 768px) {
	.epld-field-label {
		min-width: auto;
		display: block;
		margin-bottom: 3px;
	}
	
	.epld-group-change-item {
		margin: 10px 0;
	}
	
	.epld-history-table {
		font-size: 12px;
	}
	
	.epld-history-table th,
	.epld-history-table td {
		padding: 6px 4px;
	}
	
	.epld-history-item,
	.epld-history-group-item {
		padding: 10px;
		margin: 10px 0;
	}
	
	.epld-lowest-price {
		padding: 12px;
	}
	
	.epld-price-value {
		font-size: 20px;
	}
	
	.epld-stat-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 2px;
	}
}

/* Error i no-data states */
.epld-error {
	color: #dc3545;
	padding: 10px;
	background: #f8d7da;
	border: 1px solid #f5c6cb;
	border-radius: 4px;
	margin: 10px 0;
}

.epld-no-data {
	color: #856404;
	padding: 10px;
	background: #fff3cd;
	border: 1px solid #ffeaa7;
	border-radius: 4px;
	margin: 10px 0;
}

/* EPLD POPUP STYLES */
.epld-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.epld-popup-container {
	background: white;
	border-radius: 8px;
	max-width: 600px;
	max-height: 80vh;
	width: 100%;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(0,0,0,0.3);
	animation: epld-popup-appear 0.3s ease-out;
}

@keyframes epld-popup-appear {
	from {
		opacity: 0;
		transform: scale(0.9) translateY(-50px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.epld-popup-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	border-bottom: 1px solid #eee;
	background: #f8f9fa;
}

.epld-popup-title {
	margin: 0;
	font-size: 18px;
	color: #333;
}

.epld-popup-close {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #666;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: all 0.2s;
}

.epld-popup-close:hover {
	background: #f0f0f0;
	color: #333;
}

.epld-popup-content {
	padding: 20px;
	max-height: 60vh;
	overflow-y: auto;
}

.epld-popup-loading {
	text-align: center;
	padding: 40px;
	color: #666;
}

.epld-popup-section {
	margin-bottom: 25px;
	padding-bottom: 20px;
	border-bottom: 1px solid #eee;
}

.epld-popup-section:last-child {
	border-bottom: none;
	margin-bottom: 0;
}

.epld-popup-section-title {
	font-size: 16px;
	font-weight: bold;
	margin-bottom: 15px;
	color: #333;
	padding-bottom: 8px;
	border-bottom: 2px solid #0073aa;
}

/* Responsive */
@media (max-width: 768px) {
	.epld-popup-container {
		max-width: 95vw;
		max-height: 90vh;
	}
	
	.epld-popup-header {
		padding: 15px;
	}
	
	.epld-popup-content {
		padding: 15px;
	}
	
	.epld-popup-title {
		font-size: 16px;
	}
}

/* Style dla treści popup */
.epld-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.epld-popup-container {
	background: white;
	border-radius: 8px;
	max-width: 600px;
	max-height: 80vh;
	width: 100%;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(0,0,0,0.3);
	animation: epld-popup-appear 0.3s ease-out;
}

@keyframes epld-popup-appear {
	from {
		opacity: 0;
		transform: scale(0.9) translateY(-50px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.epld-popup-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	border-bottom: 1px solid #eee;
	background: #f8f9fa;
}

.epld-popup-title {
	margin: 0;
	font-size: 18px;
	color: #333;
}

.epld-popup-close {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #666;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: all 0.2s;
}

.epld-popup-close:hover {
	background: #f0f0f0;
	color: #333;
}

.epld-popup-content {
	padding: 20px;
	max-height: 60vh;
	overflow-y: auto;
}

.epld-popup-loading {
	text-align: center;
	padding: 40px;
	color: #666;
}

.epld-popup-section {
	margin-bottom: 25px;
	padding-bottom: 20px;
	border-bottom: 1px solid #eee;
}

.epld-popup-section:last-child {
	border-bottom: none;
	margin-bottom: 0;
}

.epld-popup-section-title {
	font-size: 16px;
	font-weight: bold;
	margin-bottom: 15px;
	color: #333;
	padding-bottom: 8px;
	border-bottom: 2px solid #0073aa;
}

/* Responsive */
@media (max-width: 768px) {
	.epld-popup-container {
		max-width: 95vw;
		max-height: 90vh;
	}
	
	.epld-popup-header {
		padding: 15px;
	}
	
	.epld-popup-content {
		padding: 15px;
	}
	
	.epld-popup-title {
		font-size: 16px;
	}
}

/* Style dla treści popup */
.epld-popup-content .epld-lowest-price {
	margin-bottom: 0;
	padding: 15px;
	text-align: center;
}

.epld-popup-content .epld-history {
	margin-bottom: 0;
}

.epld-popup-content .epld-history-header h4 {
	margin-top: 0;
	font-size: 14px;
	color: #666;
}

.epld-popup-trigger {
	cursor: pointer;
	text-decoration: none;
	border: none;
	background: none;
	font: inherit;
	padding: 0;
	display: inline;
	transition: color 0.2s ease;
	position: relative;
}

.epld-popup-trigger:hover {
	color: #005a87;
}

.brxe-shortcode {position: relative;}

/* Styl dla dodatkowej etykiety popup */
.epld-popup-label { 

	position: absolute;
	top: -70%;
	right: 0;
	background: #fff;
	border: 1px solid #ddd;
	padding: 3px 6px;
	border-radius: 5px;
	text-decoration: none;
	font-weight: 600;
	opacity: 0.8;
	transition: all 0.2s ease;
	font-size: 8rem;
	text-transform: uppercase;
	letter-spacing: 1rem;

}



.epld-popup-label:hover {
	opacity: 1;
	color: #005a87;
}
