/* ROTECH Flexy — uses the CardPanel theme colors when available */
.rfx-box {
	--rfx-accent: var(--cp-accent, #1d4ed8);
	--rfx-bg: var(--cp-surface, #fff);
	--rfx-bg2: var(--cp-surface-2, #f3f5f9);
	--rfx-text: var(--cp-text, #0f172a);
	--rfx-muted: var(--cp-muted, #64748b);
	--rfx-border: var(--cp-border, #e5e7eb);
	max-width: 620px;
	margin: 0 auto 24px;
	padding: 24px;
	border-radius: 20px;
	background: var(--rfx-bg);
	color: var(--rfx-text);
	border: 1px solid var(--rfx-border);
	box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
	font-family: inherit;
	box-sizing: border-box;
}
.rfx-box *, .rfx-box *::before, .rfx-box *::after { box-sizing: border-box; }
.rfx-msg { text-align: center; }
.rfx-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.rfx-title { margin: 0; font-size: 1.5rem; font-weight: 800; }
.rfx-title--sm { font-size: 1.15rem; margin-bottom: 12px; }
.rfx-sub { margin: 4px 0 0; color: var(--rfx-muted); font-size: .95rem; }
.rfx-bal { background: var(--rfx-bg2); border-radius: 14px; padding: 8px 14px; text-align: center; }
.rfx-bal span { display: block; font-size: .8rem; color: var(--rfx-muted); }
.rfx-bal strong { font-size: 1.1rem; white-space: nowrap; }

.rfx-live { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; padding: 8px 12px; border-radius: 12px; margin-bottom: 18px; }
.rfx-live i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.rfx-live.is-on { background: rgba(22, 163, 74, .1); color: #15803d; }
.rfx-live.is-on i { background: #16a34a; box-shadow: 0 0 0 0 rgba(22, 163, 74, .6); animation: rfx-pulse 1.8s infinite; }
.rfx-live.is-off { background: rgba(217, 119, 6, .1); color: #b45309; }
.rfx-live.is-off i { background: #d97706; }
@keyframes rfx-pulse { 70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }

.rfx-label { display: block; font-weight: 700; margin: 14px 0 8px; font-size: .95rem; }
.rfx-input { width: 100%; height: 52px; border-radius: 14px; border: 1.5px solid var(--rfx-border); background: var(--rfx-bg2); color: var(--rfx-text); padding: 0 16px; font-size: 1.1rem; font-family: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
.rfx-input:focus { border-color: var(--rfx-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rfx-accent) 15%, transparent); background: var(--rfx-bg); }
.rfx-phone { font-size: 1.35rem; letter-spacing: 2px; text-align: center; font-weight: 700; }
.rfx-input.is-bad { border-color: #dc2626; }

.rfx-ops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rfx-op { cursor: pointer; }
.rfx-op input { position: absolute; opacity: 0; pointer-events: none; }
.rfx-op span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 14px; border: 1.5px solid var(--rfx-border); background: var(--rfx-bg2); font-weight: 700; transition: .15s; position: relative; }
.rfx-op b { width: 26px; height: 26px; border-radius: 8px; background: var(--op); box-shadow: 0 4px 12px color-mix(in srgb, var(--op) 40%, transparent); }
.rfx-op small { color: var(--rfx-muted); font-weight: 600; font-size: .78rem; }
.rfx-op input:checked + span { border-color: var(--op); background: color-mix(in srgb, var(--op) 9%, var(--rfx-bg)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--op) 18%, transparent); }
.rfx-op input:focus-visible + span { outline: 2px solid var(--op); outline-offset: 2px; }

.rfx-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.rfx-chip { flex: 1 1 auto; min-width: 72px; height: 42px; border-radius: 12px; border: 1.5px solid var(--rfx-border); background: var(--rfx-bg2); color: var(--rfx-text); font-weight: 700; font-size: 1rem; cursor: pointer; font-family: inherit; transition: .15s; }
.rfx-chip:hover { border-color: var(--rfx-accent); }
.rfx-chip.is-on { background: var(--rfx-accent); border-color: var(--rfx-accent); color: #fff; }

.rfx-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.rfx-sum > div { background: var(--rfx-bg2); border-radius: 14px; padding: 10px 14px; }
.rfx-sum span { display: block; color: var(--rfx-muted); font-size: .82rem; }
.rfx-sum strong { font-size: 1.15rem; }
.rfx-sum.is-short > div:last-child { background: rgba(220, 38, 38, .08); color: #b91c1c; }

.rfx-error { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(220, 38, 38, .08); color: #b91c1c; font-weight: 600; font-size: .92rem; }
.rfx-submit { display: flex; width: 100%; align-items: center; justify-content: center; gap: 10px; height: 54px; margin-top: 16px; border: 0; border-radius: 14px; background: var(--rfx-accent); color: #fff; font-size: 1.1rem; font-weight: 800; font-family: inherit; cursor: pointer; box-shadow: 0 10px 22px color-mix(in srgb, var(--rfx-accent) 30%, transparent); transition: transform .1s, filter .15s; }
.rfx-submit:hover { filter: brightness(1.07); }
.rfx-submit:active { transform: scale(.99); }
.rfx-submit[disabled] { opacity: .65; cursor: progress; }
.rfx-note { margin: 12px 0 0; color: var(--rfx-muted); font-size: .85rem; text-align: center; }
.rfx-btn-ghost { height: 54px; margin-top: 16px; padding: 0 20px; border-radius: 14px; border: 1.5px solid var(--rfx-border); background: transparent; color: var(--rfx-text); font-weight: 700; font-family: inherit; cursor: pointer; white-space: nowrap; }

/* Result */
.rfx-result { text-align: center; padding: 10px 0 0; }
.rfx-result__icon { width: 84px; height: 84px; margin: 6px auto 12px; border-radius: 50%; display: grid; place-items: center; }
.rfx-result__icon svg { width: 42px; height: 42px; }
.rfx-result__title { font-size: 1.35rem; font-weight: 800; }
.rfx-result__text { color: var(--rfx-muted); margin-top: 6px; white-space: pre-line; }
.rfx-result__actions { display: flex; gap: 10px; }
.rfx-result.is-wait .rfx-result__icon { background: color-mix(in srgb, var(--rfx-accent) 12%, transparent); color: var(--rfx-accent); }
.rfx-result.is-wait .rfx-result__icon svg { animation: rfx-spin 1s linear infinite; }
.rfx-result.is-done .rfx-result__icon { background: rgba(22, 163, 74, .12); color: #16a34a; animation: rfx-pop .4s cubic-bezier(.2, 1.4, .4, 1); }
.rfx-result.is-fail .rfx-result__icon { background: rgba(220, 38, 38, .1); color: #dc2626; }
.rfx-result.is-review .rfx-result__icon { background: rgba(217, 119, 6, .12); color: #d97706; }
@keyframes rfx-spin { to { transform: rotate(360deg); } }
@keyframes rfx-pop { from { transform: scale(.4); opacity: 0; } }

/* History */
.rfx-list { list-style: none; margin: 0; padding: 0; }
.rfx-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rfx-border); }
.rfx-item:first-child { border-top: 0; }
.rfx-item__main { flex: 1; min-width: 0; }
.rfx-item__main strong { display: block; letter-spacing: 1px; text-align: start; }
.rfx-item__main span { color: var(--rfx-muted); font-size: .82rem; }
.rfx-item__amt { font-weight: 800; white-space: nowrap; }
.rfx-badge { font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; white-space: nowrap; background: var(--rfx-bg2); }
.rfx-badge--done { background: rgba(22, 163, 74, .12); color: #15803d; }
.rfx-badge--failed { background: rgba(220, 38, 38, .1); color: #b91c1c; }
.rfx-badge--review { background: rgba(217, 119, 6, .12); color: #b45309; }
.rfx-badge--pending, .rfx-badge--processing { background: color-mix(in srgb, var(--rfx-accent) 12%, transparent); color: var(--rfx-accent); }
.rfx-empty { color: var(--rfx-muted); margin: 0; }

@media (max-width: 480px) {
	.rfx-box { padding: 18px 14px; border-radius: 16px; }
	.rfx-sum { grid-template-columns: 1fr; }
	.rfx-item { flex-wrap: wrap; }
}

.rfx-box [hidden] { display: none !important; }
.cp-content .rfx-box { box-shadow: none; }
.rfx-item__main strong { letter-spacing: .5px; }
@media (max-width: 480px) {
	.rfx-item { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; }
	.rfx-item__main { grid-column: 1 / -1; }
	.rfx-item__main strong { font-size: 1rem; }
	.rfx-item__amt { font-size: .95rem; }
	.rfx-badge { justify-self: end; }
	.rfx-head { flex-direction: column; }
	.rfx-bal { align-self: stretch; display: flex; justify-content: space-between; align-items: center; }
}
.rfx-item__main strong { display: inline-block; }
.rfx-item__main span { display: block; }

/* Product page */
.rfx-pfields {
	--rfx-accent: var(--cp-accent, #1d4ed8);
	--rfx-bg: var(--cp-surface, #fff);
	--rfx-bg2: var(--cp-surface-2, #f3f5f9);
	--rfx-text: var(--cp-text, #0f172a);
	--rfx-muted: var(--cp-muted, #64748b);
	--rfx-border: var(--cp-border, #e5e7eb);
	width: 100%; margin-bottom: 12px;
}
.rfx-pfields .rfx-label:first-child { margin-top: 0; }
.rfx-pfields .quantity { display: block; margin: 0 0 4px; float: none; }
.rfx-pfields .quantity .qty, .rfx-qty { width: 100% !important; max-width: none; height: 52px; text-align: center; font-size: 1.2rem; font-weight: 700; }
.rfx-ptotal { margin-top: 12px; padding: 10px 14px; border-radius: 14px; background: var(--rfx-bg2); color: var(--rfx-muted); }
.rfx-ptotal strong { color: var(--rfx-text); font-size: 1.15rem; margin-inline-start: 6px; }
form.cart:has(.rfx-pfields) { display: flex; flex-wrap: wrap; }
form.cart:has(.rfx-pfields) .single_add_to_cart_button { width: 100%; height: 52px; border-radius: 14px; margin: 4px 0 0; }
.rfx-price { font-weight: 700; }
.rfx-price-rate { color: var(--cp-muted, #64748b); font-weight: 500; }
.rfx-pfields .quantity { width: 100% !important; display: block !important; }
.rfx-pfields .quantity input.qty { width: 100% !important; }
.rfx-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: .85rem; color: var(--rfx-muted); }
.rfx-recent__num { border: 1px solid var(--rfx-border); background: var(--rfx-bg2); color: var(--rfx-text); border-radius: 20px; padding: 3px 10px; font: inherit; font-weight: 600; letter-spacing: .5px; cursor: pointer; }
.rfx-recent__num.is-on, .rfx-recent__num:hover { border-color: var(--rfx-accent); color: var(--rfx-accent); }

/* Payment choice on the product page */
.rfx-pay { width: 100%; margin: 14px 0 4px; display: grid; gap: 8px; order: 5; }
form.cart:has(.rfx-pay) .single_add_to_cart_button { order: 6; }
.rfx-pay .rfx-label { margin: 0 0 2px; }
.rfx-pay__opt { cursor: pointer; display: block; }
.rfx-pay__opt input { position: absolute; opacity: 0; pointer-events: none; }
.rfx-pay__box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 12px 14px 12px 44px; border: 1.5px solid var(--cp-border, #e5e7eb); border-radius: 14px; background: var(--cp-surface-2, #f3f5f9); position: relative; transition: .15s; }
[dir="rtl"] .rfx-pay__box { padding: 12px 44px 12px 14px; }
.rfx-pay__box::before { content: ""; position: absolute; top: 50%; inset-inline-start: 14px; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; border: 2px solid var(--cp-border, #cbd5e1); background: var(--cp-surface, #fff); transition: .15s; }
.rfx-pay__opt input:checked + .rfx-pay__box { border-color: var(--cp-accent, #1d4ed8); background: color-mix(in srgb, var(--cp-accent, #1d4ed8) 7%, var(--cp-surface, #fff)); }
.rfx-pay__opt input:checked + .rfx-pay__box::before { border-color: var(--cp-accent, #1d4ed8); box-shadow: inset 0 0 0 4px var(--cp-surface, #fff); background: var(--cp-accent, #1d4ed8); }
.rfx-pay__opt input:focus-visible + .rfx-pay__box { outline: 2px solid var(--cp-accent, #1d4ed8); outline-offset: 2px; }
.rfx-pay__title { font-weight: 700; }
.rfx-pay__bal { font-size: .88rem; color: var(--cp-muted, #64748b); }
.rfx-pay__bal b { color: var(--cp-text, #0f172a); }
.rfx-pay__desc { flex-basis: 100%; font-size: .82rem; color: var(--cp-muted, #64748b); line-height: 1.6; }
.rfx-login-hint { width: 100%; order: 7; margin: 10px 0 0; text-align: center; color: var(--cp-muted, #64748b); }
.single_add_to_cart_button.is-busy { opacity: .7; cursor: progress; }

/* Side notifications */
.rfx-toasts { position: fixed; z-index: 99999; bottom: 20px; inset-inline-end: 20px; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.rfx-toast { pointer-events: auto; position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 12px; padding: 14px 40px 14px 14px; border-radius: 16px; background: var(--cp-surface, #fff); color: var(--cp-text, #0f172a); border: 1px solid var(--cp-border, #e5e7eb); box-shadow: 0 18px 40px rgba(15, 23, 42, .18); transform: translateX(-120%); opacity: 0; transition: transform .35s cubic-bezier(.2, .9, .3, 1.2), opacity .25s; font-family: inherit; }
[dir="rtl"] .rfx-toast { padding: 14px 14px 14px 40px; }
.rfx-toast.is-in { transform: none; opacity: 1; }
.rfx-toast__icon { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.rfx-toast__icon svg { width: 20px; height: 20px; }
.rfx-toast__body strong { display: block; font-size: 1rem; }
.rfx-toast__body p { margin: 3px 0 0; font-size: .86rem; color: var(--cp-muted, #64748b); line-height: 1.55; }
.rfx-toast__x { position: absolute; top: 8px; inset-inline-end: 10px; border: 0; background: none; color: var(--cp-muted, #64748b); font-size: 20px; line-height: 1; cursor: pointer; padding: 2px; }
.rfx-toast__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: currentColor; opacity: .0; }
.rfx-toast--wait .rfx-toast__icon { background: color-mix(in srgb, var(--cp-accent, #1d4ed8) 12%, transparent); color: var(--cp-accent, #1d4ed8); }
.rfx-toast--wait .rfx-toast__icon svg { animation: rfx-spin 1s linear infinite; }
.rfx-toast--wait .rfx-toast__bar { color: var(--cp-accent, #1d4ed8); opacity: .8; animation: rfx-indet 1.4s ease-in-out infinite; transform-origin: left; }
.rfx-toast--ok { border-color: #bbf7d0; }
.rfx-toast--ok .rfx-toast__icon { background: #16a34a; color: #fff; animation: rfx-pop .4s cubic-bezier(.2, 1.4, .4, 1); }
.rfx-toast--err { border-color: #fecaca; }
.rfx-toast--err .rfx-toast__icon { background: #dc2626; color: #fff; }
.rfx-toast--info { border-color: #fde68a; }
.rfx-toast--info .rfx-toast__icon { background: #f59e0b; color: #fff; }
@keyframes rfx-indet { 0% { transform: scaleX(.05) translateX(0); } 50% { transform: scaleX(.5) translateX(60%); } 100% { transform: scaleX(.05) translateX(1900%); } }
@media (max-width: 600px) { .rfx-toasts { bottom: 12px; inset-inline-end: 16px; } }
@media (prefers-reduced-motion: reduce) { .rfx-toast { transition: none; } .rfx-toast--wait .rfx-toast__icon svg, .rfx-toast--wait .rfx-toast__bar { animation: none; } }
.rfx-guest { display: grid; gap: 6px; margin-bottom: 8px; }
.rfx-guest .rfx-label { margin: 6px 0 0; }
.rfx-guest__hint { margin: 2px 0 6px; font-size: .85rem; color: var(--cp-muted, #64748b); }
.rfx-input.is-bad { border-color: #dc2626 !important; }
.rfx-pay {
	--rfx-accent: var(--cp-accent, #1d4ed8);
	--rfx-bg: var(--cp-surface, #fff);
	--rfx-bg2: var(--cp-surface-2, #f3f5f9);
	--rfx-text: var(--cp-text, #0f172a);
	--rfx-muted: var(--cp-muted, #64748b);
	--rfx-border: var(--cp-border, #e5e7eb);
}
.rfx-guest .rfx-input { height: 50px; font-size: 1rem; }
.rfx-guest input[name="rfx_contact"] { letter-spacing: 1px; text-align: center; font-weight: 700; }
/* Fixed amounts (ADSL): the chips are the only choice */
.rfx-fixed .quantity { display: none !important; }
.rfx-fixed .rfx-presets { margin-bottom: 0; }
.rfx-fixed .rfx-chip { height: 50px; font-size: 1.1rem; }
/* Flexy pages have no tabs: keep related products below the summary */
.single-product div.product .related.products,
.single-product div.product .up-sells { clear: both; width: 100%; float: none; padding-top: 24px; }

/* Phone top-up product: operator tiles */
.rfx-pfields .rfx-ops { margin-bottom: 4px; }
.rfx-pfields .rfx-op span { padding: 14px 8px; font-size: 1.05rem; }
.rfx-pfields .rfx-op b { width: 30px; height: 30px; }
.rfx-pfields .rfx-op:hover span { border-color: var(--op); }

/* Operator offers */
.rfx-offers { margin: 12px 0 4px; }
.rfx-offers__btn { width: 100%; height: 48px; border-radius: 14px; border: 1.5px dashed var(--rfx-accent); background: color-mix(in srgb, var(--rfx-accent) 7%, var(--rfx-bg)); color: var(--rfx-accent); font-weight: 800; font-size: 1.02rem; font-family: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.rfx-offers__btn small { font-weight: 600; opacity: .7; }
.rfx-offers__btn.is-busy { opacity: .8; cursor: wait; }
.rfx-offers__btn .rfx-spin { width: 16px; height: 16px; border: 2.5px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; display: inline-block; animation: rfxspin .8s linear infinite; }
@keyframes rfxspin { to { transform: rotate(360deg); } }
.rfx-offers__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; max-height: 360px; overflow: auto; padding: 2px; }
.rfx-offer { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px; border-radius: 12px; border: 1.5px solid var(--rfx-border); background: var(--rfx-bg2); color: var(--rfx-text); font-family: inherit; cursor: pointer; text-align: center; transition: .15s; }
.rfx-offer span { font-weight: 700; font-size: .95rem; direction: ltr; unicode-bidi: plaintext; }
.rfx-offer b { font-size: .82rem; color: var(--rfx-muted); font-weight: 600; }
.rfx-offer:hover { border-color: var(--rfx-accent); }
.rfx-offer.is-on { border-color: var(--rfx-accent); background: color-mix(in srgb, var(--rfx-accent) 10%, var(--rfx-bg)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rfx-accent) 18%, transparent); }
.rfx-offer.is-on b { color: var(--rfx-accent); }
.rfx-offers__msg { grid-column: 1 / -1; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--rfx-bg2); color: var(--rfx-muted); font-size: .9rem; }
.rfx-offers__picked { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, #16a34a 10%, var(--rfx-bg)); border: 1px solid color-mix(in srgb, #16a34a 35%, transparent); }
.rfx-offers__tag { font-size: .8rem; color: #15803d; font-weight: 700; }
.rfx-offers__picked strong { direction: ltr; unicode-bidi: plaintext; }
.rfx-offers__clear { margin-inline-start: auto; border: 0; background: none; color: #b91c1c; font-weight: 700; font-family: inherit; cursor: pointer; text-decoration: underline; }
.rfx-pfields.has-offer .rfx-amount-label, .rfx-pfields.has-offer .rfx-presets, .rfx-pfields.has-offer .quantity { display: none !important; }
