/* CG Wagering Calculator — colours and font come from Elementor Site Settings (Global Colors / Fonts),
   with CasinoGuide PH values as fallbacks. Override any --cgwc-* variable in the widget's Style tab. */
.cgwc {
	--cgwc-accent: var(--e-global-color-primary, #6C47FF);
	--cgwc-accent-deep: var(--e-global-color-cgdeep1, #4A28CC);
	--cgwc-ink: var(--e-global-color-secondary, #1A0A3C);
	--cgwc-text: var(--e-global-color-text, #3D3459);
	--cgwc-muted: var(--e-global-color-cgmute1, #6B6385);
	--cgwc-line: var(--e-global-color-cgline1, #E6E0F5);
	--cgwc-surface: var(--e-global-color-cgsurf1, #F8F6FF);
	--cgwc-card: var(--e-global-color-cgwhite, #FFFFFF);
	--cgwc-coral: var(--e-global-color-accent, #FF6B6B);
	--cgwc-good: #1A7F4B;
	--cgwc-warn: #9A5A0C;
	--cgwc-bad: #B93838;
	--cgwc-radius: 16px;
	--cgwc-font: var(--e-global-typography-cgbody0-font-family, "Plus Jakarta Sans"), -apple-system, "Segoe UI", sans-serif;

	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: 0;
	margin: 0;
	background: var(--cgwc-card);
	border: 1px solid var(--cgwc-line);
	border-radius: var(--cgwc-radius);
	overflow: hidden;
	font-family: var(--cgwc-font);
	font-size: 15px;
	line-height: 1.5;
	color: var(--cgwc-text);
}
.cgwc *, .cgwc *::before, .cgwc *::after { box-sizing: border-box; }
.cgwc [hidden] { display: none !important; }

/* ---------- inputs ---------- */
.cgwc__inputs { padding: 28px; display: flex; flex-direction: column; gap: 22px; }
.cgwc__group { border: 0; margin: 0; padding: 0; min-width: 0; }
.cgwc__group > legend, .cgwc__more > summary {
	padding: 0; margin: 0 0 12px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--cgwc-accent);
}
.cgwc__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.cgwc__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cgwc__f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cgwc__f--wide, .cgwc__f--preset { grid-column: 1 / -1; }
.cgwc__f > label, .cgwc__lbl { font-size: 13px; font-weight: 700; color: var(--cgwc-ink); }
.cgwc__help { margin: 0; font-size: 12px; line-height: 1.45; color: var(--cgwc-muted); }

.cgwc__in { position: relative; display: flex; align-items: center; }
.cgwc input[type="number"], .cgwc select {
	width: 100%; height: 46px; margin: 0; padding: 0 14px; font: 600 15px/1 var(--cgwc-font); color: var(--cgwc-ink);
	background: var(--cgwc-card); border: 1px solid var(--cgwc-line); border-radius: 10px; box-shadow: none;
	-moz-appearance: textfield; appearance: none;
}
.cgwc select {
	padding-right: 38px; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236B6385' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 14px center;
}
.cgwc input::-webkit-outer-spin-button, .cgwc input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cgwc input:hover, .cgwc select:hover { border-color: color-mix(in srgb, var(--cgwc-accent) 45%, var(--cgwc-line)); }
.cgwc input:focus, .cgwc select:focus { outline: none; border-color: var(--cgwc-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cgwc-accent) 18%, transparent); }
.cgwc input::placeholder { color: var(--cgwc-muted); font-weight: 500; }
.cgwc__in.has-pfx input { padding-left: 32px; }
.cgwc__in.has-sfx input { padding-right: 34px; }
.cgwc__pfx, .cgwc__sfx { position: absolute; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--cgwc-muted); pointer-events: none; }
.cgwc__pfx { left: 14px; }
.cgwc__sfx { right: 14px; }

/* segmented control */
.cgwc__seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--cgwc-surface); border: 1px solid var(--cgwc-line); border-radius: 12px; width: 100%; }
.cgwc__seg label { flex: 1; position: relative; margin: 0; cursor: pointer; }
.cgwc__seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cgwc__seg span { display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 12px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--cgwc-text); text-align: center; transition: background-color .15s ease, color .15s ease; }
.cgwc__seg input:checked + span { background: var(--cgwc-card); color: var(--cgwc-ink); box-shadow: 0 1px 3px rgba(26, 10, 60, .12); }
.cgwc__seg input:focus-visible + span { outline: 2px solid var(--cgwc-accent); outline-offset: 2px; }

.cgwc__mix { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px; background: var(--cgwc-surface); border-radius: 12px; }
.cgwc__mixnote { grid-column: 1 / -1; }

.cgwc__more > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.cgwc__more > summary::-webkit-details-marker { display: none; }
.cgwc__more > summary::after { content: "+"; font-size: 16px; line-height: 1; }
.cgwc__more[open] > summary::after { content: "\2212"; }
.cgwc__more > summary:focus-visible { outline: 2px solid var(--cgwc-accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- results ---------- */
.cgwc__out { padding: 28px; background: var(--cgwc-surface); border-left: 1px solid var(--cgwc-line); display: flex; flex-direction: column; gap: 16px; }
.cgwc__head { display: flex; flex-direction: column; gap: 6px; padding-bottom: 16px; border-bottom: 1px solid var(--cgwc-line); }
.cgwc__k { font-size: 13px; font-weight: 700; color: var(--cgwc-muted); }
.cgwc__big { font-size: clamp(30px, 4.2vw, 42px); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; color: var(--cgwc-ink); font-variant-numeric: tabular-nums; }
.cgwc__verdict { align-self: flex-start; font-size: 12px; font-weight: 800; letter-spacing: .04em; padding: 5px 10px; border-radius: 999px; }
.cgwc__verdict.is-easy { color: var(--cgwc-good); background: color-mix(in srgb, var(--cgwc-good) 12%, transparent); }
.cgwc__verdict.is-moderate { color: var(--cgwc-warn); background: color-mix(in srgb, var(--cgwc-warn) 13%, transparent); }
.cgwc__verdict.is-hard { color: var(--cgwc-bad); background: color-mix(in srgb, var(--cgwc-bad) 11%, transparent); }

.cgwc__rows { margin: 0; display: flex; flex-direction: column; }
.cgwc__row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--cgwc-line); }
.cgwc__row:last-child { border-bottom: 0; }
.cgwc__row dt { margin: 0; font-size: 14px; color: var(--cgwc-text); }
.cgwc__row dd { margin: 0; font-size: 15px; font-weight: 700; color: var(--cgwc-ink); text-align: right; font-variant-numeric: tabular-nums; }
.cgwc__row[data-r="value"] dd { color: var(--cgwc-good); }
.cgwc__row[data-r="value"].is-neg dd { color: var(--cgwc-bad); }

.cgwc__warn { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cgwc__w { position: relative; padding: 10px 12px 10px 36px; font-size: 13px; line-height: 1.45; color: var(--cgwc-ink); background: #FFF4F4; border-radius: 10px; }
.cgwc__w::before { content: "!"; position: absolute; left: 10px; top: 10px; width: 18px; height: 18px; border-radius: 50%; background: var(--cgwc-coral); color: #fff; font-size: 12px; font-weight: 800; line-height: 18px; text-align: center; }

.cgwc__note { margin: 0; font-size: 12px; line-height: 1.55; color: var(--cgwc-muted); }
.cgwc__note a { color: var(--cgwc-accent); font-weight: 700; text-decoration: none; }
.cgwc__note a:hover { text-decoration: underline; }

.cgwc__foot { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 16px; margin-top: auto; }
.cgwc__share {
	display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; font: 700 13px/1 var(--cgwc-font); color: var(--cgwc-ink);
	background: var(--cgwc-card); border: 1px solid var(--cgwc-line); border-radius: 999px; cursor: pointer; transition: border-color .15s ease, color .15s ease;
}
.cgwc__share:hover { border-color: var(--cgwc-accent); color: var(--cgwc-accent); background: var(--cgwc-card); }
.cgwc__share:focus-visible { outline: 2px solid var(--cgwc-accent); outline-offset: 2px; }
.cgwc__how { flex: 1 1 220px; font-size: 13px; }
.cgwc__how summary { cursor: pointer; font-weight: 700; color: var(--cgwc-accent); min-height: 40px; display: flex; align-items: center; }
.cgwc__how summary:focus-visible { outline: 2px solid var(--cgwc-accent); outline-offset: 2px; border-radius: 4px; }
.cgwc__how p { margin: 4px 0 0; font-size: 12px; line-height: 1.6; color: var(--cgwc-muted); }

/* ---------- responsive ---------- */
.cgwc.is-stacked { grid-template-columns: 1fr; }
.cgwc.is-stacked .cgwc__out { border-left: 0; border-top: 1px solid var(--cgwc-line); }
@media (max-width: 860px) {
	.cgwc { grid-template-columns: 1fr; }
	.cgwc__out { border-left: 0; border-top: 1px solid var(--cgwc-line); }
}
@media (max-width: 520px) {
	.cgwc__inputs, .cgwc__out { padding: 20px 16px; }
	.cgwc__grid, .cgwc__grid--3, .cgwc__mix { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.cgwc__seg span, .cgwc__share { transition: none; }
}

/* ---------- 1.1.0 calculators ---------- */
.cgwc--tool .cgwc__inputs { gap: 16px; }
.cgwc input[type="text"] {
	width: 100%; height: 46px; margin: 0; padding: 0 14px; font: 600 15px/1 var(--cgwc-font); color: var(--cgwc-ink);
	background: var(--cgwc-card); border: 1px solid var(--cgwc-line); border-radius: 10px; box-shadow: none;
}
.cgwc input[type="text"]:focus { outline: none; border-color: var(--cgwc-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cgwc-accent) 18%, transparent); }
.cgwc__in.has-pfx input[type="text"] { padding-left: 32px; }
.cgwc__in.has-sfx input[type="text"] { padding-right: 34px; }
.cgwc__err { margin: 8px 0 0; min-height: 1em; font-size: 13px; font-weight: 600; color: var(--cgwc-bad); }
.cgwc__legs { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cgwc__legs li { display: flex; align-items: flex-end; gap: 8px; }
.cgwc__legs label { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--cgwc-ink); }
.cgwc__x { flex: 0 0 46px; height: 46px; border: 1px solid var(--cgwc-line); border-radius: 10px; background: var(--cgwc-card); color: var(--cgwc-muted); font-size: 20px; line-height: 1; cursor: pointer; }
.cgwc__x:hover { border-color: var(--cgwc-bad); color: var(--cgwc-bad); }
.cgwc__add { margin-top: 12px; min-height: 42px; padding: 0 16px; border: 1px dashed var(--cgwc-accent); border-radius: 999px; background: transparent; color: var(--cgwc-accent); font: 700 14px/1 var(--cgwc-font); cursor: pointer; }
.cgwc__add:disabled { opacity: .45; cursor: not-allowed; }
.cgwc__x:focus-visible, .cgwc__add:focus-visible { outline: 2px solid var(--cgwc-accent); outline-offset: 2px; }
.cgwc__tw { overflow-x: auto; width: 0; min-width: 100%; }
.cgwc__table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cgwc__table th, .cgwc__table td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--cgwc-line); text-align: right; background: none !important; font-variant-numeric: tabular-nums; }
.cgwc__table th:first-child, .cgwc__table td:first-child { text-align: left; }
.cgwc__table thead th { font-size: 12px; font-weight: 600; color: var(--cgwc-muted); border-bottom: 1px solid var(--cgwc-ink); }
.cgwc__table tbody th { font-weight: 700; color: var(--cgwc-ink); }
.cgwc [data-third][hidden] { display: none !important; }

.cgwc__prices { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.cgwc__prices > div { display: flex; flex-wrap: wrap; gap: 8px; }
.cgwc__prices button { min-height: 40px; min-width: 58px; padding: 0 14px; border: 1px solid var(--cgwc-line); border-radius: 999px; background: var(--cgwc-card); color: var(--cgwc-ink); font: 700 14px/1 var(--cgwc-font); font-variant-numeric: tabular-nums; cursor: pointer; }
.cgwc__prices button:hover { border-color: var(--cgwc-accent); color: var(--cgwc-accent); }
.cgwc__prices button:focus-visible { outline: 2px solid var(--cgwc-accent); outline-offset: 2px; }
