/**
 * Storefront — Business Profit Calculator widget.
 *
 * SALINAN APA ADANYA dari prototype `akunika-kalkulator-untung-
 * undangan.html` (.box dan turunannya) — cuma kelas di-rename pakai
 * prefix `stfr-bpc__` (lihat spec §7.7) dan warna/radius dibuat lewat
 * CSS variable supaya Tab Gaya Elementor bisa menimpa (spec §7.6)
 * TANPA mengubah nilai bawaan kalau admin tidak mengisi apa pun.
 *
 * JANGAN "dirapikan" — nilai di sini harus identik piksel dengan
 * prototype selama variable di bawah tidak ditimpa.
 */

.stfr-bpc {
	--stfr-left-bg: #ffffff;
	--stfr-out-from: #2D5A4D;
	--stfr-out-to: #1D3B32;
	--stfr-p: #2D5A4D;
	--stfr-p-l: #3E7A68;
	--stfr-a: #D4B038;
	--stfr-a-l: #E6C665;
	--stfr-big: var( --stfr-a-l );
	--stfr-neg: #FF9A92;
	--stfr-n9: #1A1F1D;
	--stfr-n7: #4A5550;
	--stfr-n5: #8A9490;
	--stfr-n2: #D8DEDB;
	--stfr-n1: #F4F6F5;
	--stfr-sage: #EAF0EC;
	--stfr-radius: 32px;

	display: grid;
	grid-template-columns: 1.1fr .9fr;
	background: #fff;
	border-radius: var( --stfr-radius );
	overflow: hidden;
	box-shadow: 0 30px 70px -30px rgba( 29, 59, 50, .35 );
	border: 1px solid var( --stfr-n2 );
	font: 400 16px/1.5 'Inter Tight', Inter, Arial, sans-serif;
	color: var( --stfr-n9 );
}

/* Isolasi dari tema/Elementor — box-sizing & reset elemen umum yang
   sering ditimpa global oleh tema (h3, button, input, label, small,
   output), supaya gaya tema tidak bocor masuk (spec §7.1.4). */
.stfr-bpc,
.stfr-bpc *,
.stfr-bpc *::before,
.stfr-bpc *::after {
	box-sizing: border-box;
}

/* `.stfr-bpc *` (bukan daftar `.stfr-bpc h3, .stfr-bpc button, ...`)
   SENGAJA — selector class+tag seperti `.stfr-bpc div` punya
   spesifisitas LEBIH TINGGI daripada selector komponen 1-class seperti
   `.stfr-bpc__out` di bawah, jadi reset-nya akan selalu menang dan
   menghapus padding/background/warna widget terlepas dari urutan di
   file. `.stfr-bpc *` spesifisitasnya setara 1 class, jadi aturan yang
   lebih spesifik/belakangan di file ini tetap menang seperti seharusnya. */
.stfr-bpc * {
	margin: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	border: 0;
	background: none;
	line-height: inherit;
	text-align: left;
}

.stfr-bpc button {
	cursor: pointer;
}

/* `!important` di sini sengaja — tema/plugin lain di halaman (CTA
   plugin Elementor, dst) sering mendefinisikan `button:focus`/`:active`
   global dengan warna solid (ketemu lewat devtools: warna gelap yang
   nongol pas tombol di widget ini diklik, hilang begitu fokus pindah)
   yang bocor ke SEMUA button/input di halaman kalau tidak dipaksa
   menang di sini. */
.stfr-bpc input,
.stfr-bpc button {
	box-shadow: none !important;
}

.stfr-bpc input:focus,
.stfr-bpc input:active,
.stfr-bpc button:focus,
.stfr-bpc button:active,
.stfr-bpc button:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}

/* ---- Panel kiri ---- */

.stfr-bpc__in {
	padding: 44px 48px;
	background: var( --stfr-left-bg );
}

.stfr-bpc__title {
	font: 400 30px/1.2 'Gilda Display', Georgia, serif;
	margin-bottom: 22px !important;
}

.stfr-bpc__blk {
	margin-top: 26px;
}

.stfr-bpc__blk:first-of-type {
	margin-top: 0;
}

.stfr-bpc__lbl {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font: 500 15px 'Inter Tight', Inter, Arial, sans-serif;
	color: var( --stfr-n9 );
	margin-bottom: 12px !important;
}

.stfr-bpc__lbl small {
	font: 400 13px 'Inter Tight', Inter, Arial, sans-serif;
	color: var( --stfr-n5 );
}

/* chips skenario */
.stfr-bpc__chips {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

/* `!important` pada background/color/border tombol di bawah
   (.chip/.seg-btn/.step-btn) SENGAJA — lihat catatan di dekat reset
   `:focus`/`:active` di atas: tanpa ini, warna tombol bisa "nyangkut"
   dari style tema/plugin lain selama tombol masih fokus/aktif, baru
   balik normal setelah fokus pindah ke elemen lain. */
.stfr-bpc__chip {
	border: 1px solid var( --stfr-n2 ) !important;
	background: #fff !important;
	border-radius: 99px !important;
	padding: 8px 16px !important;
	font: 500 14px 'Inter Tight', Inter, Arial, sans-serif;
	color: var( --stfr-n7 ) !important;
	transition: .15s;
}

.stfr-bpc__chip:hover {
	border-color: var( --stfr-p-l ) !important;
}

.stfr-bpc__chip.is-on {
	background: var( --stfr-p ) !important;
	border-color: var( --stfr-p ) !important;
	color: #fff !important;
}

/* baris paket */
.stfr-bpc__packages {
	display: block;
}

.stfr-bpc__pk {
	display: grid;
	grid-template-columns: 1fr 132px 118px;
	gap: 12px;
	align-items: center;
	padding: 12px 14px;
	border: 1px solid var( --stfr-n2 );
	border-radius: 16px;
	margin-bottom: 10px;
}

.stfr-bpc__pk-name {
	font: 500 15px 'Inter Tight', Inter, Arial, sans-serif;
	display: block;
}

.stfr-bpc__pk-desc {
	display: block;
	font-size: 12.5px;
	color: var( --stfr-n5 );
}

.stfr-bpc__money {
	display: flex;
	align-items: center;
	background: var( --stfr-n1 );
	border-radius: 10px;
	padding: 0 10px;
	height: 40px;
	transition: box-shadow .15s;
}

.stfr-bpc__money:focus-within {
	box-shadow: 0 0 0 2px var( --stfr-p-l ) !important;
}

.stfr-bpc__money-prefix {
	font-size: 13px;
	color: var( --stfr-n5 );
	margin-right: 4px;
}

.stfr-bpc__money-input {
	width: 100%;
	font: 500 15px 'Inter Tight', Inter, Arial, sans-serif;
	color: var( --stfr-n9 );
	text-align: right;
	background: transparent !important;
	/* Elementor Global Kit nerapin border 1px ke SEMUA <input> polos lewat
	   selector generik (`.elementor-kit-xx input:not([type=button])...`) —
	   kelihatan di sini sebagai garis di sekeliling kotak harga. */
	border: 0 !important;
}

.stfr-bpc__money-input:focus {
	box-shadow: none !important;
}

.stfr-bpc__step {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var( --stfr-n1 );
	border-radius: 10px;
	height: 40px;
	padding: 0 4px;
}

.stfr-bpc__step-btn {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 32px;
	height: 32px;
	border-radius: 8px !important;
	background: #fff !important;
	color: var( --stfr-p ) !important;
	font: 500 18px 'Inter Tight', Inter, Arial, sans-serif;
	line-height: 1;
	box-shadow: 0 1px 2px rgba( 0, 0, 0, .08 ) !important;
}

.stfr-bpc__step-btn:hover,
.stfr-bpc__step-btn:focus,
.stfr-bpc__step-btn:active {
	background: var( --stfr-sage ) !important;
	color: var( --stfr-p ) !important;
	border-radius: 8px !important;
}

.stfr-bpc__step-qty {
	font: 500 15px 'Inter Tight', Inter, Arial, sans-serif;
	min-width: 30px;
	text-align: center;
}

/* segmented tier */
.stfr-bpc__seg {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	background: var( --stfr-n1 );
	border-radius: 99px;
	padding: 5px;
	gap: 4px;
}

.stfr-bpc__seg-btn {
	height: 40px;
	border-radius: 99px !important;
	background: transparent !important;
	font: 500 14.5px 'Inter Tight', Inter, Arial, sans-serif;
	color: var( --stfr-n7 ) !important;
	text-align: center;
}

.stfr-bpc__seg-btn.is-on {
	background: #fff !important;
	color: var( --stfr-p ) !important;
	box-shadow: 0 2px 8px rgba( 0, 0, 0, .1 ) !important;
}

.stfr-bpc__seg-btn:not( .is-on ):hover,
.stfr-bpc__seg-btn:not( .is-on ):focus,
.stfr-bpc__seg-btn:not( .is-on ):active {
	background: transparent !important;
	color: var( --stfr-n7 ) !important;
}

/* range slider */
.stfr-bpc__rng {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 8px;
	border-radius: 99px;
	background: linear-gradient( to right, var( --stfr-p ) var( --stfr-bpc-f, 0% ), var( --stfr-n2 ) var( --stfr-bpc-f, 0% ) );
}

.stfr-bpc__rng::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var( --stfr-p );
	border: 3px solid #fff;
	box-shadow: 0 1px 6px rgba( 0, 0, 0, .3 );
	cursor: pointer;
}

.stfr-bpc__rng::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var( --stfr-p );
	border: 3px solid #fff;
	box-shadow: 0 1px 6px rgba( 0, 0, 0, .3 );
	cursor: pointer;
}

.stfr-bpc__rv {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	color: var( --stfr-n5 );
	margin-top: 8px;
}

.stfr-bpc__rv b {
	color: var( --stfr-n9 );
	font-weight: 600;
	font-size: 14px;
}

.stfr-bpc__two {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 22px;
}

/* ---- Panel kanan ---- */

.stfr-bpc__out {
	background: linear-gradient( 160deg, var( --stfr-out-from ), var( --stfr-out-to ) );
	color: #fff;
	padding: 44px;
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.stfr-bpc__out::after {
	content: '';
	position: absolute;
	right: -90px;
	bottom: -90px;
	width: 300px;
	height: 300px;
	border-radius: 50%;
	background: radial-gradient( circle, rgba( 230, 198, 101, .28 ), transparent 68% );
	pointer-events: none;
}

.stfr-bpc__out > * {
	position: relative;
	z-index: 1;
}

.stfr-bpc__o-l {
	font: 500 15px 'Inter Tight', Inter, Arial, sans-serif;
	color: rgba( 255, 255, 255, .75 );
}

.stfr-bpc__big {
	font: 400 clamp( 40px, 4.6vw, 60px )/1.1 'Gilda Display', Georgia, serif;
	color: var( --stfr-big );
	margin: 8px 0 6px !important;
	transition: color .2s;
	display: block;
}

.stfr-bpc__big.is-neg {
	color: var( --stfr-neg );
}

.stfr-bpc__o-sub {
	font-size: 14px;
	color: rgba( 255, 255, 255, .7 );
}

.stfr-bpc__bar {
	display: flex;
	height: 14px;
	border-radius: 99px;
	overflow: hidden;
	background: rgba( 255, 255, 255, .12 );
	margin: 22px 0 10px;
}

.stfr-bpc__bar i {
	display: block;
	height: 100%;
	transition: width .3s;
}

.stfr-bpc__bar-cost {
	background: rgba( 255, 255, 255, .45 );
}

.stfr-bpc__bar-profit {
	background: var( --stfr-a-l );
}

.stfr-bpc__legend {
	display: flex;
	gap: 18px;
	font-size: 12.5px;
	color: rgba( 255, 255, 255, .7 );
	margin-bottom: 6px;
}

.stfr-bpc__legend-cost::before,
.stfr-bpc__legend-profit::before {
	content: '';
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	margin-right: 6px;
}

.stfr-bpc__legend-cost::before {
	background: rgba( 255, 255, 255, .45 );
}

.stfr-bpc__legend-profit::before {
	background: var( --stfr-a-l );
}

.stfr-bpc__rows {
	margin-top: 10px;
}

.stfr-bpc__rw {
	display: flex;
	justify-content: space-between;
	padding: 11px 0;
	border-top: 1px solid rgba( 255, 255, 255, .14 );
	font-size: 15px;
}

.stfr-bpc__rw span {
	color: rgba( 255, 255, 255, .8 );
}

.stfr-bpc__rw b {
	font-weight: 600;
}

.stfr-bpc__rw--cost b {
	color: rgba( 255, 255, 255, .95 );
}

.stfr-bpc__stats {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 10px;
	margin-top: 20px;
}

.stfr-bpc__st {
	background: rgba( 255, 255, 255, .09 );
	border: 1px solid rgba( 255, 255, 255, .16 );
	border-radius: 16px;
	padding: 14px;
}

.stfr-bpc__st small {
	display: block;
	font-size: 12px;
	color: rgba( 255, 255, 255, .65 );
	margin-bottom: 4px !important;
}

.stfr-bpc__st b {
	font: 400 22px 'Gilda Display', Georgia, serif;
	color: #fff;
}

.stfr-bpc__ins {
	margin-top: 18px;
	background: rgba( 230, 198, 101, .14 );
	border: 1px solid rgba( 230, 198, 101, .38 );
	border-radius: 14px;
	padding: 13px 16px;
	font-size: 14.5px;
	color: #fff;
}

.stfr-bpc__ins b {
	color: var( --stfr-a-l );
	font-weight: 600;
}

.stfr-bpc__dis {
	margin-top: auto !important;
	padding-top: 20px;
	font-size: 12.5px;
	line-height: 1.55;
	color: rgba( 255, 255, 255, .55 );
	display: block;
}

@media ( max-width: 940px ) {
	.stfr-bpc {
		grid-template-columns: 1fr;
	}

	.stfr-bpc__in,
	.stfr-bpc__out {
		padding: 32px 24px;
	}
}

@media ( max-width: 520px ) {
	.stfr-bpc__in {
		padding: 16px !important;
	}

	.stfr-bpc__lbl {
		flex-direction: column;
		align-items: flex-start;
	}

	.stfr-bpc__lbl,
	.stfr-bpc__lbl small {
		width: 100%;
	}

	.stfr-bpc__pk {
		grid-template-columns: 1fr 1fr;
	}

	.stfr-bpc__pk > div:first-child {
		grid-column: 1 / -1;
	}

	.stfr-bpc__two {
		grid-template-columns: 1fr;
	}

	.stfr-bpc__stats {
		grid-template-columns: 1fr;
	}
}
