/* ============================================================
   RMG Pipeline Calculator Widget — widget.css
   Design: Lovable AI / Deep Navy glassmorphism
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800;900&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Design Tokens ── */
.rmgpc-wrap {
	--rmg-dark:    #0A162B;
	--rmg-dark2:   #0F1E38;
	--rmg-navy:    #111D33;
	--rmg-red:     #F04832;
	--rmg-gold:    #C9A84C;
	--rmg-royal:   #1B3A8A;
	--rmg-white:   #FFFFFF;
	--rmg-light:   #F7F7F2;
	--rmg-charcoal:#12253E;
	--rmg-glass-bg:rgba(255,255,255,0.06);
	--rmg-glass-border:rgba(255,255,255,0.12);
	--rmg-blur:    blur(15px);
	--rmg-radius:  16px;
	--rmg-font-h:  'Montserrat', sans-serif;
	--rmg-font-b:  'DM Sans', sans-serif;
}

/* ── Wrapper ── */
.rmgpc-wrap {
	background: var(--rmg-dark);
	padding: 80px 0;
	width: 100%;
	font-family: var(--rmg-font-b);
	color: var(--rmg-white);
	-webkit-font-smoothing: antialiased;
}

.rmgpc-inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 28px;
}

/* ── Section Header ── */
.rmgpc-overline {
	display: block;
	font-family: var(--rmg-font-h);
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--rmg-gold);
	margin-bottom: 16px;
}

.rmgpc-heading {
	font-family: var(--rmg-font-h);
	font-weight: 800;
	font-size: clamp(26px, 3vw, 38px);
	line-height: 1.2;
	color: var(--rmg-white);
	margin: 0 0 16px;
}

.rmgpc-intro {
	font-size: 17px;
	color: rgba(255,255,255,0.65);
	max-width: 620px;
	line-height: 1.7;
	margin-bottom: 48px;
}

/* ─────────────────────────────────────────────
   ACCORDION
───────────────────────────────────────────── */
.rmgpc-accordion {
	margin-bottom: 12px;
	border-radius: var(--rmg-radius);
	overflow: hidden;
	border: 1px solid var(--rmg-glass-border);
	background: var(--rmg-glass-bg);
	backdrop-filter: var(--rmg-blur);
	-webkit-backdrop-filter: var(--rmg-blur);
	transition: border-color 0.25s;
}

.rmgpc-accordion:hover {
	border-color: rgba(255,255,255,0.2);
}

/* Left accent stripe */
.rmgpc-accordion.rmgpc-acc-royal { border-left: 4px solid var(--rmg-royal); }
.rmgpc-accordion.rmgpc-acc-gold  { border-left: 4px solid var(--rmg-gold);  }
.rmgpc-accordion.rmgpc-acc-red   { border-left: 4px solid var(--rmg-red);   }

.rmgpc-acc-header {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 22px 28px;
	cursor: pointer;
	user-select: none;
	transition: background 0.2s;
}
.rmgpc-acc-header:hover {
	background: rgba(255,255,255,0.04);
}

.rmgpc-acc-tag {
	font-family: var(--rmg-font-h);
	font-weight: 800;
	font-size: 11px;
	letter-spacing: 2px;
	text-transform: uppercase;
	min-width: 72px;
}
.rmgpc-acc-tag--royal { color: #5b82d4; }
.rmgpc-acc-tag--gold  { color: var(--rmg-gold); }
.rmgpc-acc-tag--red   { color: var(--rmg-red); }

.rmgpc-acc-title { flex: 1; }
.rmgpc-acc-title h3 {
	font-family: var(--rmg-font-h);
	font-weight: 700;
	font-size: 18px;
	color: var(--rmg-white);
	margin: 0 0 4px;
	line-height: 1.3;
}
.rmgpc-acc-title p {
	font-size: 14px;
	color: rgba(255,255,255,0.45);
	margin: 0;
}

.rmgpc-acc-chevron {
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.35s cubic-bezier(.4,0,.2,1);
	color: rgba(255,255,255,0.4);
	flex-shrink: 0;
}
.rmgpc-acc-chevron svg { width: 16px; height: 16px; }
.rmgpc-accordion.rmgpc-open .rmgpc-acc-chevron {
	transform: rotate(180deg);
	color: var(--rmg-gold);
}

.rmgpc-acc-body {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.45s cubic-bezier(.4,0,.2,1);
}

.rmgpc-acc-content {
	padding: 0 28px 28px 28px;
	border-top: 1px solid rgba(255,255,255,0.07);
}

.rmgpc-acc-content p {
	color: rgba(255,255,255,0.72);
	font-size: 15px;
	line-height: 1.7;
	margin: 20px 0 16px;
}

.rmgpc-acc-content ul {
	list-style: none;
	padding: 0;
	margin: 0 0 20px;
}
.rmgpc-acc-content ul li {
	font-size: 14px;
	color: rgba(255,255,255,0.65);
	padding: 7px 0 7px 22px;
	position: relative;
	border-bottom: 1px solid rgba(255,255,255,0.05);
}
.rmgpc-acc-content ul li:last-child { border-bottom: none; }
.rmgpc-acc-content ul li::before {
	content: '→';
	position: absolute;
	left: 0;
	color: var(--rmg-gold);
	font-weight: 700;
}

.rmgpc-best-for {
	font-family: var(--rmg-font-h);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: rgba(255,255,255,0.35) !important;
	margin-bottom: 20px !important;
}
.rmgpc-best-for strong { color: rgba(255,255,255,0.6); font-style: normal; }

/* ── Buttons ── */
.rmgpc-btns {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.rmgpc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--rmg-font-h);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	text-decoration: none;
	padding: 14px 28px;
	border-radius: 8px;
	cursor: pointer;
	border: none;
	transition: background 0.2s, transform 0.2s, box-shadow 0.2s, color 0.2s;
	white-space: nowrap;
}

.rmgpc-btn--red {
	background: var(--rmg-red);
	color: var(--rmg-white);
}
.rmgpc-btn--red:hover {
	background: #d63a27;
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(240,72,50,0.4);
}

.rmgpc-btn--ghost {
	background: transparent;
	border: 2px solid currentColor;
}
.rmgpc-btn--ghost.rmgpc-btn--royal { color: #5b82d4; }
.rmgpc-btn--ghost.rmgpc-btn--gold  { color: var(--rmg-gold); }
.rmgpc-btn--ghost.rmgpc-btn--red   { color: var(--rmg-red); }
.rmgpc-btn--ghost:hover { opacity: 0.75; }

.rmgpc-btn--full { width: 100%; }

/* ─────────────────────────────────────────────
   PIPELINE CALCULATOR
───────────────────────────────────────────── */
.rmgpc-calculator {
	margin-top: 56px;
	background: var(--rmg-glass-bg);
	backdrop-filter: var(--rmg-blur);
	-webkit-backdrop-filter: var(--rmg-blur);
	border: 1px solid var(--rmg-glass-border);
	border-radius: 20px;
	padding: 40px 44px;
}

.rmgpc-calc-heading {
	font-family: var(--rmg-font-h);
	font-weight: 700;
	font-size: clamp(20px, 2.2vw, 28px);
	color: var(--rmg-white);
	margin: 0 0 10px;
}

.rmgpc-calc-intro {
	font-size: 15px;
	color: rgba(255,255,255,0.55);
	margin: 0 0 36px;
}

.rmgpc-calc-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: stretch;
}

/* Sliders */
.rmgpc-sliders {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.rmgpc-slider-group {
	margin-bottom: 32px;
}
.rmgpc-slider-group:last-child { margin-bottom: 0; }

.rmgpc-slider-group label {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-family: var(--rmg-font-h);
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: rgba(255,255,255,0.45);
	margin-bottom: 14px;
}

.rmgpc-val {
	font-family: var(--rmg-font-b);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	color: var(--rmg-white);
	background: rgba(201,168,76,0.12);
	border: 1px solid rgba(201,168,76,0.25);
	border-radius: 6px;
	padding: 3px 10px;
}

/* Range input */
.rmgpc-range {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 4px;
	background: rgba(255,255,255,0.12);
	border-radius: 2px;
	outline: none;
	cursor: pointer;
}
.rmgpc-range::-webkit-slider-runnable-track {
	height: 4px;
	border-radius: 2px;
	background: linear-gradient(to right, var(--rmg-gold) 0%, rgba(255,255,255,0.12) 0%);
}
.rmgpc-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--rmg-gold);
	border: 3px solid var(--rmg-dark);
	box-shadow: 0 2px 10px rgba(201,168,76,0.5);
	cursor: pointer;
	margin-top: -9px;
	transition: box-shadow 0.2s, transform 0.2s;
}
.rmgpc-range::-webkit-slider-thumb:hover {
	box-shadow: 0 4px 16px rgba(201,168,76,0.7);
	transform: scale(1.15);
}
.rmgpc-range::-moz-range-thumb {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--rmg-gold);
	border: 3px solid var(--rmg-dark);
	cursor: pointer;
}

/* Result Cards — glassmorphism */
.rmgpc-results {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.rmgpc-card {
	border-radius: 12px;
	padding: 20px 24px;
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	transition: transform 0.2s, box-shadow 0.2s;
}
.rmgpc-card:hover {
	transform: translateY(-2px);
}

.rmgpc-card--glass {
	background: rgba(255,255,255,0.06);
	backdrop-filter: blur(15px);
	-webkit-backdrop-filter: blur(15px);
	border: 1px solid rgba(255,255,255,0.12);
}
.rmgpc-card--glass:hover {
	background: rgba(255,255,255,0.09);
	box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.rmgpc-card--highlight {
	background: var(--rmg-dark2);
	border: 1px solid rgba(240,72,50,0.4);
	border-left: 3px solid var(--rmg-red);
}
.rmgpc-card--highlight:hover {
	box-shadow: 0 8px 32px rgba(240,72,50,0.25);
}

.rmgpc-card h4 {
	font-family: var(--rmg-font-h);
	font-weight: 700;
	font-size: 10px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: rgba(255,255,255,0.4);
	margin: 0 0 8px;
}

.rmgpc-card-val {
	font-family: var(--rmg-font-h);
	font-weight: 800;
	font-size: clamp(22px, 2.5vw, 30px);
	color: var(--rmg-white);
	line-height: 1;
	transition: all 0.3s;
}

.rmgpc-gold { color: var(--rmg-gold) !important; }

/* ─────────────────────────────────────────────
   LEAD CAPTURE MODAL
───────────────────────────────────────────── */
.rmgpc-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	align-items: center;
	justify-content: center;
}
.rmgpc-modal.rmgpc-modal--open {
	display: flex;
}

.rmgpc-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(10,22,43,0.85);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.rmgpc-modal-box {
	position: relative;
	z-index: 1;
	background: var(--rmg-dark2);
	border: 1px solid rgba(201,168,76,0.3);
	border-radius: 20px;
	padding: 48px 40px;
	max-width: 480px;
	width: 90%;
	box-shadow: 0 32px 80px rgba(0,0,0,0.6);
	animation: rmgpc-modal-in 0.35s cubic-bezier(.4,0,.2,1);
}

@keyframes rmgpc-modal-in {
	from { opacity: 0; transform: translateY(24px) scale(0.97); }
	to   { opacity: 1; transform: translateY(0)     scale(1);    }
}

.rmgpc-modal-close {
	position: absolute;
	top: 16px;
	right: 20px;
	background: transparent;
	border: none;
	color: rgba(255,255,255,0.4);
	font-size: 24px;
	cursor: pointer;
	line-height: 1;
	transition: color 0.2s;
	padding: 4px 8px;
}
.rmgpc-modal-close:hover { color: var(--rmg-white); }

.rmgpc-modal-box h3 {
	font-family: var(--rmg-font-h);
	font-weight: 800;
	font-size: 22px;
	color: var(--rmg-white);
	margin: 0 0 10px;
}
.rmgpc-modal-box > p {
	font-size: 15px;
	color: rgba(255,255,255,0.55);
	margin: 0 0 28px;
	line-height: 1.6;
}

.rmgpc-modal-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.rmgpc-modal-form input[type="text"],
.rmgpc-modal-form input[type="email"] {
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(255,255,255,0.14);
	border-radius: 8px;
	padding: 14px 18px;
	font-family: var(--rmg-font-b);
	font-size: 15px;
	color: var(--rmg-white);
	outline: none;
	transition: border-color 0.2s;
	width: 100%;
	box-sizing: border-box;
}
.rmgpc-modal-form input:focus {
	border-color: var(--rmg-gold);
	background: rgba(255,255,255,0.09);
}
.rmgpc-modal-form input::placeholder { color: rgba(255,255,255,0.3); }

.rmgpc-modal-form .rmgpc-btn--full {
	margin-top: 8px;
	padding: 16px;
	font-size: 13px;
}

/* Success state */
.rmgpc-modal-success {
	text-align: center;
	padding: 20px 0;
}
.rmgpc-modal-success .rmgpc-check {
	font-size: 56px;
	display: block;
	margin-bottom: 16px;
}
.rmgpc-modal-success h3 {
	color: var(--rmg-gold) !important;
	margin-bottom: 8px;
}
.rmgpc-modal-success p {
	color: rgba(255,255,255,0.55) !important;
	font-size: 15px;
	margin: 0 !important;
}

.rmgpc-modal-fine {
	font-size: 12px;
	color: rgba(255,255,255,0.3);
	text-align: center;
	margin: 14px 0 0;
	font-style: italic;
}

/* ── Spinner on submit ── */
.rmgpc-btn.rmgpc-loading {
	pointer-events: none;
	opacity: 0.7;
}
.rmgpc-btn.rmgpc-loading::after {
	content: '';
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: 10px;
	border: 2px solid rgba(255,255,255,0.4);
	border-top-color: var(--rmg-white);
	border-radius: 50%;
	animation: rmgpc-spin 0.7s linear infinite;
	vertical-align: middle;
}
@keyframes rmgpc-spin { to { transform: rotate(360deg); } }

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 768px) {
	.rmgpc-calculator { padding: 28px 20px; }
	.rmgpc-calc-grid  { grid-template-columns: 1fr; gap: 32px; }
	.rmgpc-acc-header { padding: 18px 16px; gap: 12px; }
	.rmgpc-acc-content{ padding: 0 16px 24px; }
	.rmgpc-btns       { flex-direction: column; }
	.rmgpc-btn        { text-align: center; }
	.rmgpc-modal-box  { padding: 36px 24px; }
}
