/**
 * Checkout Styles
 *
 * @package Snehdhara
 */

.snehdhara-checkout-wrapper {
	max-width: 1200px;
	margin: 20px auto;
	padding: 20px;
}

.snehdhara-checkout-products-selection {
	margin-bottom: 30px;
}

.snehdhara-checkout-products-selection h2 {
	font-size: 24px;
	margin-bottom: 20px;
	text-align: center;
}

.snehdhara-proceed-section {
	text-align: center;
	margin-top: 30px;
	padding-top: 20px;
	border-top: 1px solid #ddd;
}

.snehdhara-proceed-btn {
	background-color: var(--wp--preset--color--contrast, #68210f);
	color: #fff;
	padding: 15px 40px;
	font-size: 16px;
	font-weight: 600;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s;
	text-transform: uppercase;
}

.snehdhara-proceed-btn:hover {
	background-color: var(--wp--preset--color--contrast, #5a1c0d);
	opacity: 0.9;
}

.snehdhara-proceed-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.snehdhara-checkout-container {
	display: flex;
	flex-direction: row;
	gap: 30px;
	margin-bottom: 30px;
}

.snehdhara-checkout-container h2 {
	border-bottom: 1px solid #68210f !important;
	font-size: 24px;
}

.snehdhara-checkout-left,
.snehdhara-checkout-right {
	width: 50%;
}

.snehdhara-checkout-left h2,
.snehdhara-checkout-right h2 {
	margin-top: 0;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 2px solid #eee;
}

.snehdhara-checkout-products-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.snehdhara-checkout-products-header h2 {
	margin: 0;
	padding-bottom: 10px;
	border-bottom: 2px solid #eee;
}

.snehdhara-add-more-btn {
	background-color: var(--wp--preset--color--base, #ffe7dc);
	color: var(--wp--preset--color--contrast, #68210f);
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 600;
	border: 1px solid var(--wp--preset--color--contrast, #68210f);
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s;
	text-transform: uppercase;
	white-space: nowrap;
}

.snehdhara-add-more-btn:hover {
	background-color: var(--wp--preset--color--contrast, #68210f);
	color: #fff;
}

.snehdhara-checkout-add-more-products {
	margin-bottom: 20px;
	padding: 20px;
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
}

@media (max-width: 768px) {
	.snehdhara-checkout-container {
		flex-direction: column-reverse;
		gap: 20px;
	}
	.snehdhara-checkout-left,
	.snehdhara-checkout-right {
		width: 100%;
	}
	.snehdhara-checkout-left h2 {
		display: none;
	}
}

.snehdhara-form-group {
	margin-bottom: 20px;
}

.snehdhara-form-group label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
}

.snehdhara-form-group .required {
	color: #d63638;
}

.snehdhara-form-group input[type="text"],
.snehdhara-form-group input[type="tel"],
.snehdhara-form-group input[type="email"],
.snehdhara-form-group textarea {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
}

.snehdhara-form-group textarea {
	resize: vertical;
	min-height: 80px;
}

.snehdhara-form-group small {
	display: block;
	margin-top: 5px;
	color: #666;
	font-size: 12px;
}

.snehdhara-error {
	display: block;
	color: #d63638;
	font-size: 12px;
	margin-top: 5px;
}

.snehdhara-products-selection {
	max-height: 500px;
	overflow-y: auto;
	margin-bottom: 20px;
}

.snehdhara-product-selection-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 15px;
	padding: 15px;
	margin-bottom: 15px;
	border: 1px solid #ddd;
	border-radius: 5px;
	background: #ffffffd1;
}

@media screen and (max-width: 768px) {
	.snehdhara-product-selection-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
}

.snehdhara-product-selection-item.disabled {
	opacity: 0.6;
	pointer-events: none;
}

.snehdhara-product-image {
	width: 120px !important;
	flex-shrink: 0;
	width: 80px !important;
	height: 80px !important;
	overflow: hidden;
	border-radius: 5px;
	border: 1px solid #ddd;
	background: #fff;
}

.snehdhara-product-image img {
	width: 100%;
	object-fit: contain;
	display: block;
}

.snehdhara-product-info {
	flex: 1;
	min-width: 0;
}

.snehdhara-product-info h4 {
	margin: 0 0 8px 0;
	font-size: 16px;
	font-weight: 600;
	color: #333;
}

.snehdhara-product-price-display {
	margin: 8px 0;
	font-weight: 600;
	font-size: 15px;
	color: #2271b1;
}

.snehdhara-product-price-display .snehdhara-sale-price {
	color: #d63638;
	font-weight: 700;
	margin-left: 8px;
}

.snehdhara-expired-badge {
	display: inline-block;
	padding: 3px 8px;
	background: #d63638;
	color: #fff;
	font-size: 11px;
	border-radius: 3px;
	margin-top: 5px;
}

.snehdhara-quantity-controls {
	display: flex;
	align-items: center;
	gap: 10px;
}

.snehdhara-qty-btn {
	width: 35px;
	height: 35px;
	border: 1px solid #68210f;
	background-color: #68210f;
	cursor: pointer;
	border-radius: 4px;
	font-size: 18px;
	font-weight: bold;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
	color: #fff;
}

.snehdhara-qty-btn:hover:not(:disabled) {
	background: #68210f;
	color: #fff;
	border-color: #999;
}

.snehdhara-qty-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	background-color: #68210f;
	color: #fff;
}

.snehdhara-qty-input {
	width: 60px;
	padding: 8px;
	text-align: center;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}

.snehdhara-order-total {
	padding: 15px;
	background: #fff;
	border-radius: 5px;
	text-align: right;
	font-size: 18px;
	border: 1px solid #ddd;
}

.snehdhara-form-actions {
	text-align: center;
	margin-top: 30px;
}

.snehdhara-submit-btn {
	padding: 15px 40px;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 5px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.snehdhara-submit-btn:hover {
	background: #135e96;
}

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

#snehdhara-form-messages {
	margin-top: 20px;
	padding: 15px;
	border-radius: 5px;
	display: none;
}

#snehdhara-form-messages.success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
	display: block;
}

#snehdhara-form-messages.error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
	display: block;
}

/* Add More Products Popup */
.snehdhara-add-more-popup {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10000;
	display: none;
}

.snehdhara-add-more-popup.active {
	display: block;
}

.snehdhara-popup-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(2px);
}

.snehdhara-popup-content {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
	max-width: 900px;
	max-height: 90vh;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	display: flex;
	flex-direction: column;
	z-index: 10001;
}

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

.snehdhara-popup-header h2 {
	margin: 0;
	font-size: 24px;
}

.snehdhara-popup-close {
	background: none;
	border: none;
	font-size: 32px;
	line-height: 1;
	color: #666;
	cursor: pointer;
	padding: 0;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: all 0.2s;
}

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

.snehdhara-popup-body {
	padding: 20px;
	overflow-y: auto;
	flex: 1;
}

.snehdhara-popup-body .snehdhara-products-list {
	max-height: 60vh;
	overflow-y: auto;
}

.snehdhara-popup-all-added-message {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 300px;
	padding: 40px 20px;
}

.snehdhara-popup-message-content {
	text-align: center;
}

.snehdhara-popup-message-icon {
	display: inline-block;
	width: 80px;
	height: 80px;
	line-height: 80px;
	border-radius: 50%;
	background-color: #00a32a;
	color: #fff;
	font-size: 48px;
	font-weight: bold;
	margin-bottom: 20px;
}

.snehdhara-popup-message-text {
	font-size: 18px;
	color: #333;
	font-weight: 600;
	margin: 0;
}

@media (max-width: 768px) {
	.snehdhara-popup-content {
		width: 95%;
		max-height: 95vh;
	}
	
	.snehdhara-popup-header {
		padding: 15px;
	}
	
	.snehdhara-popup-header h2 {
		font-size: 20px;
	}
	
	.snehdhara-popup-body {
		padding: 15px;
	}
}
