/* ============================================================
   WC Price Calculator – Redesigned Frontend Styles
   Aesthetic: Luxury Dark · Emerald + Gold · Glassmorphism
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
.wcpc-widget {
	--wcpc-bg:          #0d1117;
	--wcpc-surface:     #161b22;
	--wcpc-surface2:    #1c2330;
	--wcpc-border:      rgba(255,255,255,0.08);
	--wcpc-gold:        #f0b429;
	--wcpc-gold-dim:    rgba(240,180,41,0.15);
	--wcpc-emerald:     #10b981;
	--wcpc-emerald-dim: rgba(16,185,129,0.12);
	--wcpc-text:        #f0f6fc;
	--wcpc-text-muted:  rgba(240,246,252,0.45);
	--wcpc-text-dim:    rgba(240,246,252,0.25);
	--wcpc-radius:      20px;
	--wcpc-radius-sm:   10px;

	font-family: 'Outfit', sans-serif;
	background: var(--wcpc-bg);
	border: 1px solid var(--wcpc-border);
	border-radius: var(--wcpc-radius);
	padding: 0;
	margin: 28px 0;
	max-width: 540px;
	position: relative;
	overflow: hidden;
	box-shadow:
		0 0 0 1px rgba(240,180,41,0.08),
		0 24px 64px rgba(0,0,0,0.5),
		0 4px 16px rgba(0,0,0,0.3);
	animation: wcpc-fade-in 0.5s ease both;
}

@keyframes wcpc-fade-in {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Top gold-to-emerald line */
.wcpc-widget::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 2px;
	background: linear-gradient(90deg,
		transparent 0%,
		#f0b429 30%,
		#10b981 70%,
		transparent 100%
	);
	z-index: 10;
}

/* Ambient glow top-right */
.wcpc-widget::after {
	content: '';
	position: absolute;
	top: -100px; right: -100px;
	width: 350px; height: 350px;
	background: radial-gradient(circle, rgba(240,180,41,0.05) 0%, transparent 65%);
	pointer-events: none;
	z-index: 0;
}

/* ── Product Title Section ─────────────────────────────────── */
.wcpc-product-title-wrap {
	padding: 28px 28px 22px;
	border-bottom: 1px solid var(--wcpc-border);
	position: relative;
	z-index: 1;
	background: linear-gradient(180deg, rgba(240,180,41,0.03) 0%, transparent 100%);
}

.wcpc-product-eyebrow {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}

.wcpc-eyebrow-dot {
	width: 6px; height: 6px;
	border-radius: 50%;
	background: #10b981;
	box-shadow: 0 0 8px #10b981;
	animation: wcpc-pulse-dot 2s ease-in-out infinite;
}

@keyframes wcpc-pulse-dot {
	0%, 100% { opacity: 1; transform: scale(1); }
	50%      { opacity: 0.5; transform: scale(0.7); }
}

.wcpc-eyebrow-text {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #10b981;
}

.wcpc-product-name {
	font-family: 'Playfair Display', serif;
	font-size: 26px;
	font-weight: 900;
	color: var(--wcpc-text);
	line-height: 1.18;
	letter-spacing: -0.01em;
	margin: 0 0 14px;
}

.wcpc-rate-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-family: 'JetBrains Mono', monospace;
	font-size: 12px;
	font-weight: 600;
	color: var(--wcpc-gold);
	background: var(--wcpc-gold-dim);
	border: 1px solid rgba(240,180,41,0.25);
	padding: 5px 14px;
	border-radius: 30px;
}

.wcpc-rate-icon {
	font-size: 12px;
}

/* ── Calculator Body ───────────────────────────────────────── */
.wcpc-body {
	padding: 24px 28px 28px;
	position: relative;
	z-index: 1;
}

.wcpc-section-label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wcpc-text-dim);
	margin-bottom: 14px;
}

/* ── Slider ────────────────────────────────────────────────── */
.wcpc-slider-wrap {
	position: relative;
	height: 48px;
	margin-bottom: 6px;
}

.wcpc-track {
	position: absolute;
	top: 50%; transform: translateY(-50%);
	left: 0; right: 0;
	height: 5px;
	background: rgba(255,255,255,0.07);
	border-radius: 3px;
	z-index: 0;
}

.wcpc-fill {
	position: absolute;
	height: 100%;
	background: linear-gradient(90deg, #10b981, #f0b429);
	border-radius: 3px;
	box-shadow: 0 0 12px rgba(16,185,129,0.45);
	transition: left 0.04s, width 0.04s;
}

.wcpc-range {
	position: absolute;
	top: 50%; transform: translateY(-50%);
	width: 100%; left: 0;
	height: 5px;
	background: transparent;
	appearance: none; -webkit-appearance: none;
	pointer-events: none;
	z-index: 2; margin: 0;
}

.wcpc-range::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none;
	width: 26px; height: 26px;
	border-radius: 50%;
	background: #ffffff;
	border: 2.5px solid #f0b429;
	box-shadow: 0 0 0 4px rgba(240,180,41,0.18), 0 4px 14px rgba(0,0,0,0.5);
	cursor: pointer;
	pointer-events: all;
	transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.wcpc-range::-webkit-slider-thumb:hover {
	transform: scale(1.25);
	border-color: #10b981;
	box-shadow: 0 0 0 6px rgba(16,185,129,0.22), 0 6px 18px rgba(0,0,0,0.5);
}

.wcpc-range::-webkit-slider-thumb:active {
	background: #f0b429;
	transform: scale(1.15);
}

.wcpc-range::-moz-range-thumb {
	width: 26px; height: 26px;
	border-radius: 50%;
	background: #ffffff;
	border: 2.5px solid #f0b429;
	cursor: pointer; pointer-events: all;
}

/* ── Price Inputs ──────────────────────────────────────────── */
.wcpc-inputs-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 22px;
}

.wcpc-input-group {
	display: flex; flex-direction: column;
	align-items: stretch;
	flex: 1;
}

.wcpc-input-box {
	display: flex; align-items: center;
	background: var(--wcpc-surface);
	border: 1px solid var(--wcpc-border);
	border-radius: var(--wcpc-radius-sm);
	padding: 11px 14px;
	gap: 5px;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.wcpc-input-box:focus-within {
	border-color: rgba(240,180,41,0.5);
	box-shadow: 0 0 0 3px var(--wcpc-gold-dim);
}

.wcpc-sym {
	font-family: 'JetBrains Mono', monospace;
	font-size: 13px;
	color: var(--wcpc-text-muted);
	flex-shrink: 0;
}

.wcpc-number-input {
	border: none; background: transparent;
	font-family: 'JetBrains Mono', monospace;
	font-size: 15px; font-weight: 600;
	color: var(--wcpc-text);
	width: 100%; outline: none;
	-moz-appearance: textfield;
}

.wcpc-number-input::-webkit-inner-spin-button,
.wcpc-number-input::-webkit-outer-spin-button { -webkit-appearance: none; }

.wcpc-input-label {
	font-size: 10px;
	color: var(--wcpc-text-dim);
	margin-top: 6px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	padding-left: 3px;
}

.wcpc-range-separator {
	display: flex; align-items: center;
	padding-bottom: 22px;
	color: var(--wcpc-text-dim);
	font-size: 18px;
}

/* ── Quantity Row ──────────────────────────────────────────── */
.wcpc-qty-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--wcpc-surface);
	border: 1px solid var(--wcpc-border);
	border-radius: var(--wcpc-radius-sm);
	padding: 12px 16px;
	margin-bottom: 22px;
	gap: 12px;
}

.wcpc-qty-label {
	font-size: 13px;
	color: var(--wcpc-text-muted);
	font-weight: 500;
}

.wcpc-qty-control {
	display: flex; align-items: center;
	background: var(--wcpc-bg);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 8px;
	overflow: hidden;
	flex-shrink: 0;
}

.wcpc-qty-btn {
	background: none; border: none;
	width: 40px; height: 40px;
	font-size: 20px; line-height: 1;
	color: var(--wcpc-text-muted);
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	transition: background 0.15s, color 0.15s;
	font-family: 'Outfit', sans-serif;
}

.wcpc-qty-btn:hover {
	background: var(--wcpc-gold);
	color: var(--wcpc-bg);
}

.wcpc-qty-input {
	width: 72px; text-align: center;
	border: none;
	border-left: 1px solid rgba(255,255,255,0.08);
	border-right: 1px solid rgba(255,255,255,0.08);
	padding: 10px 4px;
	font-family: 'JetBrains Mono', monospace;
	font-size: 14px; font-weight: 600;
	color: var(--wcpc-text);
	background: transparent; outline: none;
	-moz-appearance: textfield;
}

.wcpc-qty-input::-webkit-inner-spin-button,
.wcpc-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ── Total Price Card ──────────────────────────────────────── */
.wcpc-total-display {
	position: relative;
	overflow: hidden;
	background: var(--wcpc-surface2);
	border: 1px solid rgba(240,180,41,0.2);
	border-radius: 16px;
	padding: 22px 24px;
	margin-bottom: 18px;
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 16px;
}

.wcpc-total-display::before {
	content: '';
	position: absolute; inset: 0;
	background: linear-gradient(135deg,
		rgba(240,180,41,0.05) 0%,
		transparent 50%,
		rgba(16,185,129,0.04) 100%
	);
	pointer-events: none;
}

.wcpc-total-label {
	font-size: 10px; font-weight: 700;
	color: var(--wcpc-text-dim);
	text-transform: uppercase;
	letter-spacing: 0.16em;
	margin-bottom: 6px;
}

.wcpc-total-price {
	font-family: 'Playfair Display', serif;
	font-size: 44px; font-weight: 900;
	color: var(--wcpc-gold);
	line-height: 1;
	letter-spacing: -0.02em;
	display: flex; align-items: baseline; gap: 2px;
}

.wcpc-total-currency {
	font-family: 'Outfit', sans-serif;
	font-size: 22px; font-weight: 700;
	opacity: 0.7; margin-right: 2px;
}

.wcpc-total-breakdown {
	font-family: 'JetBrains Mono', monospace;
	font-size: 11px;
	color: var(--wcpc-text-dim);
	margin-top: 8px;
}

/* Spinning ring decoration */
.wcpc-total-right {
	width: 64px; height: 64px;
	position: relative;
	flex-shrink: 0;
}

.wcpc-ring {
	width: 64px; height: 64px;
	border-radius: 50%;
	border: 1.5px solid rgba(240,180,41,0.2);
	display: flex; align-items: center; justify-content: center;
	position: relative;
}

.wcpc-ring::before {
	content: '';
	position: absolute; inset: -5px;
	border-radius: 50%;
	border: 1px solid rgba(16,185,129,0.25);
	animation: wcpc-spin 8s linear infinite;
}

.wcpc-ring::after {
	content: '';
	position: absolute; inset: -10px;
	border-radius: 50%;
	border: 1px dashed rgba(240,180,41,0.12);
	animation: wcpc-spin 14s linear infinite reverse;
}

@keyframes wcpc-spin {
	from { transform: rotate(0deg); }
	to   { transform: rotate(360deg); }
}

.wcpc-ring-icon {
	font-size: 24px; line-height: 1;
}

.wcpc-total-price.wcpc-bump {
	animation: wcpc-bump 0.28s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes wcpc-bump {
	0%   { transform: scale(1); }
	50%  { transform: scale(1.09); }
	100% { transform: scale(1); }
}

/* ── Buy Now Button ────────────────────────────────────────── */
.wcpc-add-to-cart {
	width: 100%;
	padding: 18px 24px;
	background: linear-gradient(135deg, #f0b429 0%, #c97d10 100%);
	color: #0d1117;
	border: none;
	border-radius: 12px;
	font-family: 'Outfit', sans-serif;
	font-size: 16px; font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	gap: 12px;
	position: relative; overflow: hidden;
	transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s ease;
	box-shadow:
		0 6px 24px rgba(240,180,41,0.4),
		0 1px 0 rgba(255,255,255,0.25) inset;
}

/* Sweep shine */
.wcpc-add-to-cart::before {
	content: '';
	position: absolute;
	top: 0; left: -120%; width: 60%; height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
	transform: skewX(-20deg);
	transition: left 0.6s ease;
}

.wcpc-add-to-cart:hover::before { left: 160%; }

.wcpc-add-to-cart:hover {
	transform: translateY(-4px) scale(1.015);
	box-shadow:
		0 12px 36px rgba(240,180,41,0.55),
		0 1px 0 rgba(255,255,255,0.25) inset;
}

.wcpc-add-to-cart:active {
	transform: translateY(-1px);
}

.wcpc-add-to-cart.loading {
	opacity: 0.7; cursor: not-allowed; pointer-events: none;
}

/* ── Feedback ──────────────────────────────────────────────── */
.wcpc-cart-feedback {
	margin-top: 12px;
	font-size: 13px; font-weight: 500;
	text-align: center;
	border-radius: 8px;
	transition: all 0.3s ease;
}

.wcpc-cart-feedback.success {
	color: #10b981;
	background: rgba(16,185,129,0.1);
	border: 1px solid rgba(16,185,129,0.2);
	padding: 10px 14px;
}

.wcpc-cart-feedback.error {
	color: #f87171;
	background: rgba(248,113,113,0.1);
	border: 1px solid rgba(248,113,113,0.2);
	padding: 10px 14px;
}

.wcpc-cart-feedback a { color: #f0b429; text-decoration: underline; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 520px) {
	.wcpc-product-title-wrap { padding: 22px 18px 18px; }
	.wcpc-body               { padding: 18px 18px 22px; }
	.wcpc-product-name       { font-size: 22px; }
	.wcpc-total-price        { font-size: 36px; }
	.wcpc-total-display      { grid-template-columns: 1fr; }
	.wcpc-total-right        { display: none; }
	.wcpc-qty-row            { flex-wrap: wrap; }
}
