/**
 * Woo Popup Checkout Pro — Front-end styles ("Quick Checkout" design)
 * Mobile-first, dependency-free so it works cleanly on top of any theme.
 */

/* ---------------------------------------------------------------------
 * Buy Now / Add-to-Cart-replacement button (only used where the plugin's
 * own button placements are enabled; the popup itself opens from this
 * OR from intercepting the theme's normal Add to Cart button).
 * ------------------------------------------------------------------- */
.wpcp-buy-now-btn {
	display: inline-block;
	margin: 8px 0;
	padding: 12px 28px;
	border: none;
	cursor: pointer;
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
	-webkit-appearance: none;
	transition: opacity 0.15s ease, transform 0.1s ease;
}

.wpcp-buy-now-btn:hover {
	opacity: 0.9;
}

.wpcp-buy-now-btn:active {
	transform: scale(0.98);
}

.wpcp-buy-now-btn[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

.wpcp-elementor-btn-wrap {
	display: flex;
}

/* ---------------------------------------------------------------------
 * Overlay + Popup shell
 * ------------------------------------------------------------------- */
.wpcp-overlay {
	position: fixed;
	inset: 0;
	background: var(--wpcp-overlay-color, rgba(0, 0, 0, 0.65));
	z-index: 99998;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease;
}

.wpcp-overlay.wpcp-active {
	opacity: 1;
	visibility: visible;
}

.wpcp-popup {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -48%) scale(0.97);
	width: var(--wpcp-popup-width, 460px);
	max-width: 95vw;
	max-height: 88vh;
	background: var(--wpcp-popup-bg, #fff);
	border-radius: 14px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	z-index: 99999;
	opacity: 0;
	visibility: hidden;
	overflow: hidden;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.wpcp-popup.wpcp-active {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, -50%) scale(1);
}

.wpcp-popup-inner {
	display: flex;
	flex-direction: column;
	max-height: 88vh;
}

body.wpcp-popup-open {
	overflow: hidden;
}

/* ---------------------------------------------------------------------
 * Header (fixed)
 * ------------------------------------------------------------------- */
.wpcp-popup-header {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid #eee;
}

.wpcp-popup-title {
	margin: 0;
	font-size: 19px;
	font-weight: 700;
	color: #222;
}

.wpcp-close {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 46px !important;
	height: 46px !important;
	border-radius: 50% !important;
	background: #eef1f5 !important;
	border: none !important;
	cursor: pointer;
	color: #475061 !important;
	padding: 0 !important;
	flex-shrink: 0;
	box-sizing: border-box;
}

.wpcp-close svg {
	width: 18px;
	height: 18px;
	display: block;
}

.wpcp-close:hover {
	background: #e2e6ec !important;
	color: #222 !important;
}

/* ---------------------------------------------------------------------
 * Body (scrollable)
 * ------------------------------------------------------------------- */
.wpcp-popup-body {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 18px 20px 6px;
}

/* ---------------------------------------------------------------------
 * Product Card — dashed border, cream fill
 * ------------------------------------------------------------------- */
.wpcp-product-card {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 20px;
	padding: 14px;
	border: 2px dashed var(--wpcp-accent-color, #f7941d);
	border-radius: 10px;
	background: #fef6e9;
}

.wpcp-product-image {
	flex: 0 0 70px;
	width: 70px;
	height: 70px;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.06);
}

.wpcp-product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wpcp-product-meta {
	flex: 1;
	min-width: 0;
}

.wpcp-product-name {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	color: #222;
}

.wpcp-price-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.wpcp-regular-price {
	color: #999;
	text-decoration: line-through;
	font-size: 13px;
}

.wpcp-sale-price {
	font-size: 17px;
	font-weight: 700;
	color: #222;
}

.wpcp-variations-wrap {
	margin: 4px 0 8px;
}

.wpcp-stock-warning {
	color: #d63638;
	font-size: 12px;
	margin: 6px 0 0;
}

/* ---------------------------------------------------------------------
 * Step 1: Select Product Options (variable products)
 * ------------------------------------------------------------------- */
.wpcp-step-options {
	margin-bottom: 22px;
}

.wpcp-options-title {
	margin: 0 0 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid #eee;
	font-size: 15px;
	font-weight: 600;
	color: #222;
}

.wpcp-variation-group {
	margin-bottom: 16px;
}

.wpcp-variation-group label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #222;
	margin-bottom: 8px;
}

.wpcp-variation-group select {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #e2e4e8;
	border-radius: 8px;
	font-size: 14px;
	background: #fff;
	box-sizing: border-box;
	appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 36px;
}

.wpcp-variation-group select:focus {
	outline: none;
	border-color: var(--wpcp-accent-color, #f7941d);
}

.wpcp-continue-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 15px;
	border: none;
	border-radius: 10px;
	background: #d7d9dd;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: not-allowed;
	box-sizing: border-box;
	transition: background 0.15s ease, opacity 0.15s ease;
}

.wpcp-continue-btn:not([disabled]) {
	background: var(--wpcp-continue-color, #FFAC19);
	color: var(--wpcp-submit-text-color, #fff);
	cursor: pointer;
}

.wpcp-continue-btn:not([disabled]):hover {
	opacity: 0.92;
}

.wpcp-continue-arrow {
	display: flex;
	align-items: center;
}

/* ---------------------------------------------------------------------
 * Step 2: Quantity
 * ------------------------------------------------------------------- */
.wpcp-qty-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
}

.wpcp-qty-row label {
	font-size: 14px;
	font-weight: 500;
	color: #333;
}

.wpcp-qty-stepper {
	display: inline-flex;
	align-items: center;
	border: 1px solid #e2e4e8;
	border-radius: 8px;
	overflow: hidden;
}

.wpcp-qty-stepper button {
	width: 34px;
	height: 36px;
	border: none;
	background: #f7f7f7;
	cursor: pointer;
	font-size: 17px;
	color: #444;
}

.wpcp-qty-stepper button:hover {
	background: #efefef;
}

.wpcp-qty-stepper input {
	width: 48px;
	height: 36px;
	border: none;
	border-left: 1px solid #e2e4e8;
	border-right: 1px solid #e2e4e8;
	text-align: center;
	font-size: 14px;
	-moz-appearance: textfield;
	appearance: textfield;
}

/* Hide native number-input spin arrows — without this, mobile WebKit
   browsers (Chrome/Safari on Android/iOS) render their own oversized
   up/down controls inside the input, breaking the compact stepper look. */
.wpcp-qty-stepper input::-webkit-outer-spin-button,
.wpcp-qty-stepper input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* ---------------------------------------------------------------------
 * Form fields
 * ------------------------------------------------------------------- */
.wpcp-field {
	margin-bottom: 12px;
}

.wpcp-field label {
	display: block;
	font-size: 14px;
	font-weight: 500;
	color: #333;
	margin-bottom: 6px;
}

.wpcp-field .req {
	color: #e0432a;
}

.wpcp-input-icon-wrap {
	position: relative;
}

.wpcp-input-icon {
	position: absolute;
	top: 50%;
	left: 14px;
	transform: translateY(-50%);
	color: #aab0b8;
	display: flex;
	pointer-events: none;
	z-index: 1;
}

.wpcp-field .wpcp-input-icon-wrap input {
	padding-left: 40px !important;
}

.wpcp-field input[type="text"],
.wpcp-field input[type="tel"],
.wpcp-field input[type="email"],
.wpcp-field textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #e2e4e8;
	border-radius: 8px;
	font-size: 14px;
	box-sizing: border-box;
	background: #fff;
	transition: border-color 0.15s ease;
}

.wpcp-field input:focus,
.wpcp-field textarea:focus {
	outline: none;
	border-color: var(--wpcp-accent-color, #f7941d);
}

.wpcp-field input.wpcp-input-error,
.wpcp-field textarea.wpcp-input-error {
	border-color: #d63638;
}

.wpcp-error-msg {
	display: block;
	color: #d63638;
	font-size: 12px;
	margin-top: 4px;
}

.wpcp-error-msg:empty {
	margin-top: 0;
}

.wpcp-field-row {
	display: flex;
	gap: 12px;
}

.wpcp-field-row .wpcp-field {
	flex: 1;
	min-width: 0;
}

.wpcp-coupon-row {
	display: flex;
	gap: 8px;
}

.wpcp-coupon-row input {
	flex: 1;
}

.wpcp-btn-secondary {
	padding: 0 16px;
	border: 1px solid #ccc;
	background: #f7f7f7;
	border-radius: 8px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}

.wpcp-coupon-msg {
	display: block;
	font-size: 12px;
	margin-top: 5px;
}

.wpcp-coupon-msg.wpcp-success {
	color: #1a7f37;
}

.wpcp-coupon-msg.wpcp-error {
	color: #d63638;
}

/* ---------------------------------------------------------------------
 * Section titles ("Shipping" / "Payment Method")
 * ------------------------------------------------------------------- */
.wpcp-section-title {
	margin: 20px 0 12px;
	font-size: 16px;
	font-weight: 600;
	color: #222;
}

/* ---------------------------------------------------------------------
 * Radio cards (shipping / payment)
 * ------------------------------------------------------------------- */
.wpcp-shipping-options,
.wpcp-payment-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.wpcp-radio-card {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 13px 16px;
	border: 1.5px solid #e7e8eb;
	border-radius: 10px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.wpcp-radio-card:hover {
	border-color: #c9cbd0;
}

.wpcp-radio-card input[type="radio"] {
	margin: 0;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	accent-color: var(--wpcp-accent-color, #f7941d);
}

.wpcp-radio-card:has(input:checked) {
	border-color: var(--wpcp-accent-color, #f7941d);
	border-width: 2px;
	background: #fffaf2;
}

.wpcp-radio-card-label {
	flex: 1;
	font-size: 14.5px;
	font-weight: 500;
	color: #333;
}

.wpcp-radio-card-cost {
	font-size: 14px;
	color: #333;
	font-weight: 700;
}

.wpcp-mfs-instructions {
	margin-top: 12px;
	padding: 12px 14px;
	background: #f7f7f7;
	border-radius: 8px;
}

.wpcp-mfs-instructions p {
	margin: 0 0 10px;
	font-size: 13px;
}

.wpcp-form-error {
	background: #fdeaea;
	color: #d63638;
	border-radius: 6px;
	padding: 10px 12px;
	font-size: 13px;
	margin: 16px 0 4px;
}

/* ---------------------------------------------------------------------
 * Footer (fixed) — Place Order button with live total
 * ------------------------------------------------------------------- */
.wpcp-popup-footer {
	flex: 0 0 auto;
	padding: 14px 20px 18px;
	border-top: 1px solid #eee;
	background: var(--wpcp-popup-bg, #fff);
}

.wpcp-submit-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 15px;
	border: none;
	border-radius: 10px;
	background: var(--wpcp-submit-color, #10B981);
	color: var(--wpcp-submit-text-color, #fff);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	box-sizing: border-box;
}

.wpcp-submit-btn:hover {
	opacity: 0.93;
}

.wpcp-submit-btn[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

.wpcp-lock-icon {
	display: flex;
	align-items: center;
}

.wpcp-submit-total {
	font-weight: 700;
}

.wpcp-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: wpcp-spin 0.7s linear infinite;
}

@keyframes wpcp-spin {
	to {
		transform: rotate(360deg);
	}
}

.wpcp-credit {
	margin: 8px 0 0;
	text-align: center;
	font-size: 11px;
	color: #aaa;
}

.wpcp-credit a {
	color: #888;
	text-decoration: none;
	letter-spacing: 0.03em;
}

.wpcp-credit a:hover {
	color: var(--wpcp-accent-color, #f7941d);
	text-decoration: underline;
}

/* ---------------------------------------------------------------------
 * Success Screen
 * ------------------------------------------------------------------- */
.wpcp-success-screen {
	text-align: center;
	padding: 28px 22px 10px;
}

.wpcp-success-icon {
	margin: 0 auto 14px;
	width: 64px;
	height: 64px;
}

.wpcp-success-circle {
	stroke: #16a085;
	stroke-width: 2;
	stroke-dasharray: 166;
	stroke-dashoffset: 166;
	animation: wpcp-draw 0.5s ease forwards;
}

.wpcp-success-check {
	stroke: #16a085;
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 48;
	stroke-dashoffset: 48;
	animation: wpcp-draw 0.4s 0.4s ease forwards;
}

@keyframes wpcp-draw {
	to {
		stroke-dashoffset: 0;
	}
}

.wpcp-success-title {
	font-size: 19px;
	margin: 0 0 18px;
	color: #16a085;
}

.wpcp-success-table {
	width: 100%;
	margin-bottom: 20px;
	border-collapse: collapse;
}

.wpcp-success-table th,
.wpcp-success-table td {
	text-align: left;
	padding: 8px 4px;
	font-size: 14px;
	border-bottom: 1px solid #eee;
}

.wpcp-success-table th {
	color: #777;
	font-weight: 500;
	width: 45%;
}

.wpcp-success-table td {
	font-weight: 600;
}

#wpcp-success-close {
	margin: 0 20px 18px;
	width: calc(100% - 40px);
}

/* ---------------------------------------------------------------------
 * Responsive — Tablet (≤768px) and Mobile (≤480px)
 * ------------------------------------------------------------------- */
@media (max-width: 768px) {
	.wpcp-popup {
		width: 90% !important;
	}
}

@media (max-width: 480px) {
	.wpcp-popup {
		width: 95% !important;
		max-height: 92vh;
		border-radius: 14px;
	}

	.wpcp-popup-header {
		padding: 14px 16px;
	}

	.wpcp-popup-body {
		padding: 16px 16px 6px;
	}

	.wpcp-popup-footer {
		padding: 12px 16px 16px;
	}

	.wpcp-product-card {
		gap: 12px;
		padding: 12px;
	}

	.wpcp-product-image {
		flex: 0 0 60px;
		width: 60px;
		height: 60px;
	}

	.wpcp-qty-row {
		margin-bottom: 14px;
	}

	.wpcp-qty-row label {
		font-size: 13px;
	}

	.wpcp-qty-stepper button {
		width: 28px;
		height: 30px;
		font-size: 15px;
	}

	.wpcp-qty-stepper input {
		width: 36px;
		height: 30px;
		font-size: 13px;
	}

	.wpcp-field-row {
		flex-direction: column;
		gap: 0;
	}

	.wpcp-submit-btn {
		gap: 6px;
		font-size: 13.5px;
		padding: 13px 10px;
		flex-wrap: wrap;
		row-gap: 2px;
	}

	.wpcp-submit-text {
		white-space: nowrap;
	}
}


/* Mobile responsive improvements */
@media (max-width:480px){
 .wpcp-buy-now-btn{
   width:100%!important;
   display:block!important;
   padding:12px 15px!important;
   font-size:14px!important;
   box-sizing:border-box;
 }
 .wpcp-qty-row{
   flex-direction:column;
   align-items:stretch;
   gap:10px;
 }
 .wpcp-qty-stepper{
   width:100%;
   display:flex;
 }
 .wpcp-qty-stepper button{
   width:42px!important;
   height:42px!important;
   flex:0 0 42px;
 }
 .wpcp-qty-stepper input{
   flex:1;
   width:auto!important;
   height:42px!important;
   font-size:16px!important;
 }
 .wpcp-submit-btn{
   font-size:14px!important;
   white-space:normal;
 }
}


/* Mobile responsive quantity */
.wpcp-qty-stepper{display:flex !important;width:100% !important;}
.wpcp-qty-stepper button{flex:0 0 48px !important;width:48px !important;height:48px !important;}
.wpcp-qty-stepper input{flex:1 1 auto !important;width:auto !important;min-width:0 !important;height:48px !important;}

@media (max-width:768px){
 .wpcp-qty-row{display:block !important;}
 .wpcp-qty-row label{display:block;margin-bottom:8px;}
 .wpcp-qty-stepper{width:100% !important;}
 .wpcp-submit-btn,.wpcp-continue-btn,.wpcp-buy-now-btn{width:100%;}
}
