/**
 * Public Styles for Zioto Pricing
 *
 * @package ZiotoPricing
 */

/* Price Board */
.zioto-price-board {
	margin: 20px 0;
	overflow-x: auto;
}

.zioto-price-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.zioto-price-table thead th {
	background: #f8f9fa;
	padding: 12px 15px;
	text-align: right;
	font-weight: 600;
	border-bottom: 2px solid #dee2e6;
}

.zioto-price-table tbody td {
	padding: 12px 15px;
	border-bottom: 1px solid #dee2e6;
}

.zioto-price-table tbody tr:hover {
	background: #f8f9fa;
}

.zioto-price-table tbody tr:last-child td {
	border-bottom: none;
}

/* Metal Name */
.metal-name {
	font-weight: 600;
	color: #333;
}

/* Price Display */
.metal-price {
	font-size: 1.1em;
	font-weight: 600;
}

.price-value {
	color: #2c3e50;
	direction: ltr;
	display: inline-block;
}

.price-currency {
	color: #7f8c8d;
	font-size: 0.9em;
	margin-right: 5px;
}

/* Trend Indicators */
.metal-trend {
	text-align: center;
	font-size: 1.2em;
}

.trend-up {
	color: #27ae60;
}

.trend-down {
	color: #e74c3c;
}

.trend-stable {
	color: #95a5a6;
}

/* Single Price - Minimal styling for Elementor customization */
.zioto-single-price {
	display: inline-block;
}

.zioto-single-price .price-label {
	display: block;
	font-weight: 600;
	margin-bottom: 5px;
}

.zioto-single-price .price-value {
	font-size: 1.2em;
	font-weight: 700;
	direction: ltr;
	display: inline-block;
}

.zioto-single-price .price-currency {
	font-size: 0.9em;
	margin-right: 5px;
}

.zioto-single-price .price-trend {
	display: inline-block;
	margin-right: 8px;
}

.zioto-single-price .trend-icon {
	font-size: 1.1em;
}

/* Empty Price State */
.zioto-price-empty {
	opacity: 0.6;
}

.zioto-price-empty .price-label {
	display: block;
	font-weight: 600;
	margin-bottom: 5px;
	color: #7f8c8d;
}

.zioto-price-empty .price-dash {
	font-size: 1.5em;
	color: #95a5a6;
	font-weight: 300;
	display: block;
}

/* Discount Badge */
.zioto-discount-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 15px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	border-radius: 20px;
	font-weight: 600;
	box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.zioto-discount-badge .discount-icon {
	font-size: 1.2em;
}

.zioto-discount-badge .discount-text {
	font-size: 0.95em;
}

/* Product Page Discount Display */
.zioto-product-discount {
	margin: 15px 0;
}

.zioto-product-discount .discount-badge {
	display: inline-block;
	padding: 10px 20px;
	background: #BD9530;
	color: #fff;
	border-radius: 25px;
	font-weight: 600;
	font-size: 1em;
	box-shadow: 0 3px 10px rgba(189, 149, 48, 0.4);
	animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% {
		transform: scale(1);
		box-shadow: 0 3px 10px rgba(189, 149, 48, 0.4);
	}
	50% {
		transform: scale(1.02);
		box-shadow: 0 5px 15px rgba(189, 149, 48, 0.6);
	}
}

/* Error State */
.zioto-price-error {
	color: #e74c3c;
	font-style: italic;
}

/* Loading State */
.zioto-price-board.loading {
	opacity: 0.6;
	pointer-events: none;
}

.zioto-price-board.loading::after {
	content: "";
	display: block;
	position: absolute;
	top: 50%;
	left: 50%;
	width: 40px;
	height: 40px;
	margin: -20px 0 0 -20px;
	border: 3px solid #f3f3f3;
	border-top: 3px solid #3498db;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* RTL Support */
[dir="rtl"] .zioto-price-table thead th,
[dir="rtl"] .zioto-price-table tbody td {
	text-align: right;
}

/* Responsive */
@media screen and (max-width: 768px) {
	.zioto-price-table {
		font-size: 0.9em;
	}

	.zioto-price-table thead th,
	.zioto-price-table tbody td {
		padding: 8px 10px;
	}

	.zioto-single-price {
		font-size: 0.9em;
	}

	.zioto-discount-badge {
		font-size: 0.9em;
		padding: 6px 12px;
	}
}
