/**
 * Discount Tools - Frontend Styles
 * 
 * @package Discount_Tools
 */

/* ==========================================================================
   Discount Display Container
   ========================================================================== */

.dt-discount-display {
	margin: 20px 0;
	padding: 5px !important;
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
}

.dt-discount-title,
.dt-badge-title {
	margin: 0 0 15px 0;
	font-size: 18px;
	font-weight: 600;
	color: #333;
}

/* ==========================================================================
   Table Style
   ========================================================================== */

.dt-discount-table-wrapper {
	overflow-x: auto;
}

.dt-discount-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dt-discount-table thead th {
	background: #2c3e50;
	color: #fff;
	padding: 12px 15px;
	text-align: left;
	font-weight: 600;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.dt-discount-table tbody tr {
	border-bottom: 1px solid #e0e0e0;
	transition: background-color 0.2s ease;
}

.dt-discount-table tbody tr:hover {
	background-color: #f5f5f5;
}

.dt-discount-table tbody tr:last-child {
	border-bottom: none;
}

.dt-discount-table tbody td {
	padding: 15px;
	font-size: 14px;
	color: #555;
}

.dt-discount-table .dt-quantity strong {
	color: #2c3e50;
	font-size: 16px;
}

.dt-discount-table .dt-price del {
	color: #999;
	text-decoration: line-through;
	margin-right: 8px;
	font-size: 13px;
}

.dt-discount-table .dt-price ins {
	text-decoration: none;
	color: #27ae60;
	font-weight: 600;
	font-size: 16px;
}

.dt-discount-badge {
	display: inline-block;
	padding: 4px 12px;
	background: #e74c3c;
	color: #fff;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.dt-savings-amount {
	color: #27ae60;
	font-weight: 600;
	font-size: 15px;
}

/* ==========================================================================
   Badge Style
   ========================================================================== */

.dt-discount-badges {
	text-align: center;
}

.dt-badges-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
	gap: 15px;
	margin-top: 15px;
}

.dt-badge-item {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	padding: 20px 15px;
	border-radius: 12px;
	text-align: center;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	cursor: pointer;
}

.dt-badge-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.dt-badge-quantity {
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 8px;
}

.dt-badge-discount {
	font-size: 32px;
	font-weight: 800;
	line-height: 1;
	margin-bottom: 5px;
}

.dt-badge-label {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	opacity: 0.9;
}

/* ==========================================================================
   Text Style
   ========================================================================== */

.dt-discount-text {
	background: #fff;
	padding: 20px;
	border-radius: 8px;
	border-left: 4px solid #3498db;
}

.dt-discount-message {
	margin: 0 0 15px 0;
	font-size: 16px;
	color: #2c3e50;
}

.dt-discount-message strong {
	color: #e74c3c;
	font-size: 18px;
}

.dt-discount-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dt-discount-list li {
	padding: 10px 0;
	border-bottom: 1px solid #f0f0f0;
	font-size: 14px;
	color: #555;
}

.dt-discount-list li:last-child {
	border-bottom: none;
}

.dt-discount-list li strong {
	color: #2c3e50;
}

/* ==========================================================================
   Savings Badge (Single Product)
   ========================================================================== */

.dt-savings-badge {
	display: inline-block;
	margin: 10px 0;
	padding: 8px 16px;
	background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
	color: #fff;
	border-radius: 25px;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
	animation: dt-pulse 2s ease-in-out infinite;
}

@keyframes dt-pulse {
	0%, 100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.05);
	}
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
	.dt-discount-display {
		padding: 15px;
		margin: 15px 0;
	}

	.dt-discount-table {
		font-size: 12px;
	}

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

	.dt-discount-table .dt-quantity strong {
		font-size: 14px;
	}

	.dt-discount-table .dt-price ins {
		font-size: 14px;
	}

	.dt-badges-grid {
		grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
		gap: 10px;
	}

	.dt-badge-item {
		padding: 15px 10px;
	}

	.dt-badge-discount {
		font-size: 24px;
	}

	.dt-discount-message {
		font-size: 14px;
	}

	.dt-discount-list li {
		font-size: 13px;
	}
}

@media (max-width: 480px) {
	/* Stack table on very small screens */
	.dt-discount-table {
		display: block;
	}

	.dt-discount-table thead {
		display: none;
	}

	.dt-discount-table tbody {
		display: block;
	}

	.dt-discount-table tr {
		display: block;
		margin-bottom: 15px;
		border: 1px solid #e0e0e0;
		border-radius: 8px;
		padding: 10px;
		background: #fff;
	}

	.dt-discount-table td {
		display: block;
		text-align: right;
		padding: 8px 10px;
		border-bottom: 1px solid #f0f0f0;
	}

	.dt-discount-table td:last-child {
		border-bottom: none;
	}

	.dt-discount-table td::before {
		content: attr(data-label);
		float: left;
		font-weight: 600;
		color: #2c3e50;
	}
}

/* ==========================================================================
   Cart & Checkout Display (Task 23)
   ========================================================================== */

.dt-cart-discount {
	background: #f0f9ff;
	border-left: 4px solid #3b82f6;
	padding: 15px;
	margin: 15px 0;
	border-radius: 4px;
}

.dt-cart-discount-title {
	margin: 0 0 10px 0;
	font-size: 16px;
	font-weight: 600;
	color: #1e40af;
}

.dt-cart-savings-total {
	font-size: 18px;
	font-weight: 700;
	color: #059669;
	margin-top: 10px;
}

/* ==========================================================================
   Bundle Discount Display
   ========================================================================== */

.dt-bundle-price-display {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 10px 0;
}

.dt-bundle-regular-price {
	text-decoration: line-through;
	color: #999;
	font-size: 16px;
}

.dt-bundle-discount-price {
	color: #e74c3c;
	font-weight: 700;
	font-size: 20px;
}

.dt-bundle-badge {
	display: inline-block;
	padding: 4px 12px;
	background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
	color: #fff;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-left: 8px;
}

/* Cart item bundle display */
.cart_item .dt-bundle-info {
	font-size: 12px;
	color: #666;
	margin-top: 5px;
}

.cart_item .dt-bundle-savings {
	color: #27ae60;
	font-weight: 600;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.dt-discount-table:focus {
	outline: 2px solid #3498db;
	outline-offset: 2px;
}

.dt-badge-item:focus {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.dt-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}
