/* Колесо фортуни для WooCommerce */
.wcfw-noscroll, .wcfw-noscroll body { overflow: hidden !important; }

.wcfw-overlay {
	position: fixed; inset: 0; z-index: 999999;
	display: flex; align-items: center; justify-content: center;
	padding: 16px; box-sizing: border-box;
	background: var(--wcfw-overlay);
	opacity: 0; transition: opacity .25s ease;
	-webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.wcfw-overlay[hidden] { display: none; }
.wcfw-overlay.is-open { opacity: 1; }

.wcfw-dialog {
	position: relative; box-sizing: border-box;
	width: 100%; max-width: 860px; max-height: calc(100vh - 32px); overflow: auto;
	display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: center;
	padding: 36px 36px 32px;
	background: var(--wcfw-bg); color: var(--wcfw-text);
	border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.35);
	font-family: inherit; line-height: 1.4;
	transform: translateY(16px) scale(.97); transition: transform .3s cubic-bezier(.2,.9,.3,1.2);
}
.wcfw-overlay.is-open .wcfw-dialog { transform: none; }
.wcfw-dialog *, .wcfw-dialog *::before, .wcfw-dialog *::after { box-sizing: border-box; }

.wcfw-close {
	position: absolute; top: 12px; right: 12px; width: 40px; height: 40px;
	display: grid; place-items: center; padding: 0; margin: 0;
	border: 0; border-radius: 50%; background: transparent; color: var(--wcfw-text);
	cursor: pointer; opacity: .6; transition: opacity .15s, background .15s;
}
.wcfw-close:hover, .wcfw-close:focus-visible { opacity: 1; background: rgba(127,127,127,.15); }
.is-spinning .wcfw-close { visibility: hidden; }

.wcfw-test {
	position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
	background: #ffb400; color: #222; font-size: 12px; font-weight: 600;
	padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}

.wcfw-wheel { position: relative; width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 1; }
.wcfw-wheel-svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 10px 22px rgba(0,0,0,.22)); }
.wcfw-rotor { transform-origin: 200px 200px; transform-box: view-box; will-change: transform; }
.wcfw-wheel-svg text { font-family: inherit; user-select: none; }
.wcfw-pointer {
	position: absolute; z-index: 2; top: -6px; left: 50%; transform: translateX(-50%);
	width: 0; height: 0;
	border-left: 17px solid transparent; border-right: 17px solid transparent;
	border-top: 34px solid var(--wcfw-pointer);
	filter: drop-shadow(0 3px 3px rgba(0,0,0,.3));
}

.wcfw-side { text-align: center; }
.wcfw-logo { display: block; max-height: 56px; max-width: 180px; margin: 0 auto 14px; object-fit: contain; }
.wcfw-title { margin: 0 0 10px; font-size: clamp(22px, 3vw, 30px); line-height: 1.15; font-weight: 800; color: inherit; }
.wcfw-sub { margin: 0 0 20px; font-size: 15px; opacity: .8; }
.wcfw-note { margin: 14px 0 0; font-size: 12px; opacity: .6; }

.wcfw-form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.wcfw-input {
	width: 100%; height: 50px; padding: 0 16px; margin: 0;
	border: 2px solid rgba(127,127,127,.3); border-radius: 12px;
	background: #fff; color: #1f2333; font-size: 16px; font-family: inherit;
}
.wcfw-input:focus { outline: none; border-color: var(--wcfw-accent); }
.wcfw-consent { display: flex; gap: 8px; align-items: flex-start; text-align: left; font-size: 13px; opacity: .85; cursor: pointer; }
.wcfw-check { margin: 2px 0 0; flex: none; width: 16px; height: 16px; accent-color: var(--wcfw-accent); }
.wcfw-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.wcfw-btn {
	display: inline-flex; align-items: center; justify-content: center; width: 100%;
	min-height: 52px; padding: 12px 22px; margin: 0;
	border: 0; border-radius: 12px; cursor: pointer;
	background: var(--wcfw-accent); color: var(--wcfw-btn-text) !important;
	font-family: inherit; font-size: 17px; font-weight: 700; text-decoration: none !important; letter-spacing: .01em;
	box-shadow: 0 8px 20px -6px var(--wcfw-accent);
	transition: transform .12s, filter .15s, opacity .15s;
}
.wcfw-btn:hover { filter: brightness(1.07); }
.wcfw-btn:active { transform: translateY(1px); }
.wcfw-btn:disabled { opacity: .55; cursor: default; }
.wcfw-error { min-height: 1.2em; font-size: 13px; color: #d63031; }

.wcfw-result[hidden], .wcfw-intro[hidden] { display: none; }
.wcfw-prize { font-size: 20px; font-weight: 700; margin: 0 0 16px; }
.wcfw-code {
	display: flex; align-items: stretch; gap: 0; margin: 0 0 8px;
	border: 2px dashed var(--wcfw-accent); border-radius: 12px; overflow: hidden;
}
.wcfw-code code {
	flex: 1; display: flex; align-items: center; justify-content: center; padding: 12px;
	font: 700 20px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em;
	background: transparent; color: inherit; word-break: break-all;
}
.wcfw-copy {
	flex: none; border: 0; padding: 0 16px; margin: 0; cursor: pointer;
	background: rgba(127,127,127,.12); color: inherit; font: 600 14px/1 inherit; font-family: inherit;
}
.wcfw-copy:hover { background: rgba(127,127,127,.22); }
.wcfw-exp { font-size: 13px; opacity: .7; margin: 0 0 14px; }
.wcfw-status { font-size: 14px; margin: 0 0 14px; font-weight: 600; }
.wcfw-actions { display: flex; flex-direction: column; gap: 10px; }

.is-won .wcfw-wheel { animation: wcfw-pop .6s ease; }
@keyframes wcfw-pop { 40% { transform: scale(1.04); } }

/* Launcher — small pill that never covers content */
.wcfw-launcher {
	position: fixed; bottom: 20px; z-index: 99998;
	display: inline-flex; align-items: center; gap: 8px;
	padding: 10px 16px 10px 12px; margin: 0;
	border: 0; border-radius: 999px; cursor: pointer;
	background: var(--wcfw-accent); color: var(--wcfw-btn-text);
	font: 700 14px/1 inherit; font-family: inherit;
	box-shadow: 0 8px 24px rgba(0,0,0,.25);
	animation: wcfw-in .4s ease both .3s;
}
.wcfw-launcher--left { left: 20px; }
.wcfw-launcher--right { right: 20px; }
.wcfw-launcher-icon { font-size: 18px; line-height: 1; }
.wcfw-launcher:hover { filter: brightness(1.07); }
@keyframes wcfw-in { from { opacity: 0; transform: translateY(20px); } }

@media (max-width: 720px) {
	.wcfw-overlay { padding: 10px; align-items: flex-end; }
	.wcfw-dialog { grid-template-columns: 1fr; gap: 14px; padding: 30px 18px 20px; border-radius: 20px; max-height: calc(100vh - 20px); }
	.wcfw-wheel { max-width: min(300px, 74vw, 42vh); }
	.wcfw-sub { margin-bottom: 14px; font-size: 14px; }
	.wcfw-launcher { bottom: 14px; padding: 9px 14px 9px 10px; font-size: 13px; }
	.wcfw-launcher--left { left: 14px; }
	.wcfw-launcher--right { right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.wcfw-overlay, .wcfw-dialog, .wcfw-launcher { transition: none; animation: none; }
}
.wcfw-dialog:focus { outline: none; }
.wcfw-launcher-icon svg { display: block; }
