/**
 * Order on WhatsApp – frontend styles
 */

/* Buttons container */
.woowa-buttons {
	display: flex !important;
	flex-wrap: wrap;
	gap: 10px;
	margin: 10px 0;
	align-items: center;
	clear: both;
	width: 100%;
}

.woowa-buttons.woowa-buttons-loop {
	justify-content: flex-start;
}

.woowa-buttons.woowa-buttons-single {
	margin-top: 15px;
}

.woowa-buttons.woowa-buttons-cart {
	margin-top: 15px;
	margin-bottom: 15px;
}

/* XStore theme compatibility */
.product-details .woowa-buttons,
.footer-product .woowa-buttons,
.product-image-wrapper .woowa-buttons {
	display: flex !important;
}

/* Ensure buttons are visible in XStore product views */
.product-view-default .woowa-buttons,
.product-view-mask .woowa-buttons,
.product-view-mask2 .woowa-buttons,
.product-view-mask3 .woowa-buttons,
.product-view-info .woowa-buttons,
.product-view-overlay .woowa-buttons {
	display: flex !important;
	z-index: 10;
	position: relative;
}

/* Hide on desktop (mobile only) */
@media (min-width: 1025px) {
	.woowa-buttons.woowa-hide-desktop {
		display: none !important;
	}
}

/* Button base */
.woowa-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: opacity 0.2s, transform 0.1s;
	line-height: 1.4;
}

.woowa-btn:hover {
	opacity: 0.9;
}

.woowa-btn:active {
	transform: scale(0.98);
}

.woowa-btn .woowa-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.woowa-btn-order {
	/* Inline styles from settings applied in PHP */
}

.woowa-btn-share {
	/* Inline styles from settings applied in PHP */
}

/* Checkout: Place order via WhatsApp button */
.woowa-checkout-place-order {
	background-color: #25D366 !important;
	color: #fff !important;
	border-color: #25D366 !important;
}
.woowa-checkout-place-order:hover {
	background-color: #128C7E !important;
	border-color: #128C7E !important;
	color: #fff !important;
}

/* Checkout option */
.woowa-checkout-option {
	margin-top: 15px;
	padding: 10px 0;
}

.woowa-checkout-option label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

/* Popup overlay */
.woowa-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.woowa-popup-overlay.woowa-open {
	opacity: 1;
	visibility: visible;
}

body.woowa-popup-open {
	overflow: hidden;
}

/* Popup box */
.woowa-popup-overlay .woowa-popup {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	max-width: 480px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
	padding: 24px;
}

.woowa-popup-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: none;
	background: transparent;
	font-size: 24px;
	line-height: 1;
	color: #666;
	cursor: pointer;
	transition: color 0.2s;
}

.woowa-popup-close:hover {
	color: #000;
}

.woowa-popup-title {
	margin: 0 0 20px 0;
	font-size: 1.35em;
}

/* Form */
.woowa-order-form .woowa-form-row {
	margin-bottom: 16px;
}

.woowa-order-form label {
	display: block;
	margin-bottom: 6px;
	font-weight: 500;
}

.woowa-order-form .required {
	color: #c00;
}

.woowa-order-form input[type="text"],
.woowa-order-form input[type="email"],
.woowa-order-form input[type="tel"],
.woowa-order-form textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
}

.woowa-order-form textarea {
	min-height: 60px;
	resize: vertical;
}

.woowa-form-actions {
	margin-top: 20px;
	margin-bottom: 0;
}

.woowa-order-form .woowa-btn-submit {
	width: 100%;
	padding: 12px 20px;
	font-size: 16px;
	background-color: #25D366;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.2s;
}

.woowa-order-form .woowa-btn-submit:hover:not(:disabled) {
	background-color: #20bd5a;
}

.woowa-order-form .woowa-btn-submit:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.woowa-form-message {
	margin-top: 12px;
	font-size: 14px;
}

/* Order items in popup */
.woowa-order-items {
	margin-bottom: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid #eee;
}

.woowa-order-items .woowa-items-title {
	margin-bottom: 12px;
}

.woowa-order-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid #f5f5f5;
}

.woowa-order-item:last-child {
	border-bottom: none;
}

.woowa-order-item-name {
	flex: 1;
	font-size: 14px;
}

.woowa-order-item-price {
	font-size: 13px;
	color: #666;
	white-space: nowrap;
}

.woowa-order-item-qty {
	display: flex;
	align-items: center;
	gap: 4px;
}

.woowa-order-item-qty button {
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1px solid #ddd;
	background: #f9f9f9;
	border-radius: 4px;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s;
}

.woowa-order-item-qty button:hover {
	background: #eee;
}

.woowa-order-item-qty button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.woowa-order-item-qty input {
	width: 40px;
	text-align: center;
	padding: 4px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}
