/**
 * WC Bulk Discount - Frontend Styles
 * 
 * @package WC_Bulk_Discount
 * @version 1.0.0
 */

/* ========================================
   CSS Variables (can be overridden by theme)
======================================== */
:root {
	--wcbd-primary: #28a745;
	--wcbd-primary-hover: #218838;
	--wcbd-text: #000;
	--wcbd-text-light: #666;
	--wcbd-text-muted: #999;
	--wcbd-border: #ddd;
	--wcbd-bg: #f5f5f5;
	--wcbd-white: #fff;
	--wcbd-badge-bg: #f60;
}

/* ========================================
   Bulk Discount Module Container
======================================== */
.wcbd-bulk-discount {
	margin: 20px 0;
	padding: 0;
}

.wcbd-title {
	font-size: 14px;
	font-weight: 600;
	color: var(--wcbd-text);
	margin: 0 0 12px;
	text-transform: uppercase;
}

/* ========================================
   Bulk Options
======================================== */
.wcbd-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.wcbd-option {
	position: relative;
	padding: 16px;
	border: 2px solid var(--wcbd-border);
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.wcbd-option:hover {
	border-color: var(--wcbd-primary);
}

.wcbd-option.selected {
	border-color: var(--wcbd-primary);
	background: #f8fff8;
}

/* ========================================
   Option Header
======================================== */
.wcbd-header {
	display: flex;
	align-items: center;
	gap: 12px;
}

.wcbd-badge {
	position: absolute;
	top: -10px;
	left: 50px;
	background: var(--wcbd-badge-bg);
	color: var(--wcbd-white);
	font-size: 10px;
	font-weight: 700;
	padding: 4px 8px;
	border-radius: 3px;
	text-transform: uppercase;
}

/* ========================================
   Radio Button
======================================== */
.wcbd-radio {
	flex-shrink: 0;
}

.wcbd-radio input[type="radio"] {
	display: none;
}

.wcbd-radio label {
	display: block;
	width: 22px;
	height: 22px;
	border: 2px solid #ccc;
	border-radius: 50%;
	cursor: pointer;
	position: relative;
	transition: all 0.2s;
	margin-bottom: 0 !important;
}

.wcbd-option.selected .wcbd-radio label {
	border-color: var(--wcbd-primary);
}

.wcbd-option.selected .wcbd-radio label::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 12px;
	height: 12px;
	background: var(--wcbd-primary);
	border-radius: 50%;
}

/* ========================================
   Option Info
======================================== */
.wcbd-info {
	flex: 1;
}

.wcbd-qty {
	font-size: 14px;
	font-weight: 600;
	color: var(--wcbd-text);
}

.wcbd-prices {
	text-align: right;
	display: flex;
	gap: 10px;
	flex-direction: row;
}

.wcbd-savings {
	font-size: 14px;
	font-weight: 700;
	color: var(--wcbd-primary);
	margin-bottom: 2px;
}

.wcbd-unit {
	font-size: 13px;
	color: var(--wcbd-text-light);
}

.wcbd-unit del {
	color: var(--wcbd-text-muted);
	margin-right: 6px;
}

.wcbd-unit span {
	font-weight: 600;
	color: var(--wcbd-text);
}

.wcbd-total {
	font-size: 12px;
	color: var(--wcbd-text-light);
	margin-top: 2px;
}

.wcbd-total del {
	color: var(--wcbd-text-muted);
	margin-right: 4px;
}

/* ========================================
   Variation Selectors
======================================== */
.wcbd-selectors {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #eee;
}

.wcbd-selector-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}

.wcbd-selector-row:last-child {
	margin-bottom: 0;
}

.wcbd-selector-num {
	font-size: 14px;
	font-weight: 600;
	color: var(--wcbd-text-light);
	min-width: 24px;
}

.wcbd-select {
	flex: 1;
	padding: 10px 12px;
	border: 1px solid var(--wcbd-border);
	border-radius: 6px;
	font-size: 14px;
	background: var(--wcbd-white);
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 32px;
}

.wcbd-select:focus {
	outline: none;
	border-color: var(--wcbd-primary);
}

/* Product Select Dropdown */
.wcbd-product-select {
	flex: 1;
	padding: 10px 12px;
	border: 1px solid var(--wcbd-border);
	border-radius: 6px;
	font-size: 14px;
	background: var(--wcbd-white);
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 32px;
	transition: all 0.2s;
	max-width: 100%;
}

.wcbd-product-select:hover {
	border-color: var(--wcbd-primary);
}

.wcbd-product-select:focus {
	outline: none;
	border-color: var(--wcbd-primary);
	box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* ========================================
   Add to Cart Button
======================================== */
.wcbd-btn {
	width: 100%;
	margin-top: 16px;
	padding: 16px 24px;
	background: var(--wcbd-primary);
	color: var(--wcbd-white);
	font-size: 16px;
	font-weight: 700;
	text-transform: uppercase;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s;
}

.wcbd-btn:hover:not(:disabled) {
	background: var(--wcbd-primary-hover);
}

.wcbd-btn:disabled {
	background: #ccc;
	cursor: not-allowed;
}

/* ========================================
   Cart Discount Badge
======================================== */
.wcbd-cart-badge {
	display: inline-block;
	background: var(--wcbd-primary);
	color: var(--wcbd-white);
	font-size: 10px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 3px;
	margin-left: 8px;
	text-transform: uppercase;
}

.wcbd-cart-savings {
	display: block;
	font-size: 12px;
	color: var(--wcbd-primary);
	margin-top: 4px;
}

.wcbd-cart-hint {
	display: block;
	font-size: 11px;
	color: var(--wcbd-text-muted);
	font-style: italic;
	margin-top: 2px;
}

/* ========================================
   Responsive Styles
======================================== */
@media (max-width: 576px) {
	.wcbd-header {
		flex-wrap: wrap;
	}
	
	.wcbd-prices {
		width: 100%;
		text-align: left;
		margin-top: 8px;
		padding-left: 34px;
	}
	
	.wcbd-badge {
		left: 40px;
		font-size: 9px;
	}
	
	.wcbd-selector-num {
		margin-bottom: 4px;
	}
}
