/**
 * GFG Pricing Calculator - Production Stylesheet
 * 
 * @package GFG_Pricing_Calculator
 */

:root {
	--gfg-primary: #0f172a;
	--gfg-primary-hover: #1e293b;
	--gfg-accent: #2563eb;
	--gfg-accent-hover: #1d4ed8;
	--gfg-success: #10b981;
	--gfg-success-hover: #059669;
	--gfg-bg-light: #f8fafc;
	--gfg-card-bg: #ffffff;
	--gfg-text-main: #1e293b;
	--gfg-text-muted: #64748b;
	--gfg-border-color: #e2e8f0;
	--gfg-border-focus: #3b82f6;
	--gfg-radius: 12px;
	--gfg-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
	--gfg-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
	--gfg-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Wrapper */
.gfg-calc-wrapper {
	max-width: 760px;
	margin: 2rem auto;
	padding: 2.5rem;
	background: var(--gfg-card-bg);
	border: 1px solid var(--gfg-border-color);
	border-radius: var(--gfg-radius);
	box-shadow: var(--gfg-shadow-md);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	color: var(--gfg-text-main);
	box-sizing: border-box;
	position: relative;
	overflow: hidden;
}

.gfg-calc-wrapper * {
	box-sizing: border-box;
}

/* Header */
.gfg-calc-header {
	text-align: center;
	margin-bottom: 2rem;
}

.gfg-calc-title {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--gfg-primary);
	margin: 0 0 0.5rem 0;
}

.gfg-calc-subtitle {
	font-size: 0.975rem;
	color: var(--gfg-text-muted);
	margin: 0;
}

/* Progress Bar */
.gfg-progress-container {
	margin-bottom: 2rem;
}

.gfg-progress-bar {
	height: 8px;
	background: #f1f5f9;
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 0.5rem;
}

.gfg-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--gfg-accent), #3b82f6);
	transition: width 0.35s ease;
	border-radius: 4px;
}

.gfg-progress-text {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--gfg-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Step Slides */
.gfg-steps-container {
	position: relative;
	min-height: 280px;
}

.gfg-step-slide {
	display: none;
	animation: gfgFadeIn 0.3s ease forwards;
}

.gfg-step-slide.gfg-step-active {
	display: block;
}

@keyframes gfgFadeIn {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Step Header */
.gfg-step-header {
	margin-bottom: 1.5rem;
}

.gfg-step-header h3 {
	font-size: 1.35rem;
	font-weight: 600;
	color: var(--gfg-primary);
	margin: 0 0 0.4rem 0;
}

.gfg-step-header p {
	font-size: 0.9rem;
	color: var(--gfg-text-muted);
	margin: 0;
}

/* Options Grid / Cards */
.gfg-options-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1rem;
}

.gfg-card-option {
	display: block;
	cursor: pointer;
	position: relative;
}

.gfg-card-option input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.gfg-card-content {
	padding: 1.25rem;
	background: var(--gfg-bg-light);
	border: 2px solid var(--gfg-border-color);
	border-radius: calc(var(--gfg-radius) - 4px);
	transition: var(--gfg-transition);
	text-align: center;
}

.gfg-card-option:hover .gfg-card-content {
	border-color: var(--gfg-accent);
	background: #ffffff;
	transform: translateY(-2px);
}

.gfg-card-option input[type="radio"]:checked + .gfg-card-content {
	border-color: var(--gfg-accent);
	background: #eff6ff;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.gfg-card-title {
	display: block;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--gfg-primary);
}

.gfg-card-subtitle {
	display: block;
	font-size: 0.8rem;
	color: var(--gfg-text-muted);
	margin-top: 0.25rem;
}

/* Counters */
.gfg-counters-grid {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.gfg-counter-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25rem;
	background: var(--gfg-bg-light);
	border: 1px solid var(--gfg-border-color);
	border-radius: calc(var(--gfg-radius) - 4px);
}

.gfg-counter-info {
	display: flex;
	flex-direction: column;
}

.gfg-counter-label {
	font-weight: 600;
	color: var(--gfg-primary);
	font-size: 1rem;
}

.gfg-counter-desc {
	font-size: 0.825rem;
	color: var(--gfg-text-muted);
}

.gfg-counter-controls {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.gfg-counter-btn {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid var(--gfg-border-color);
	background: #ffffff;
	font-size: 1.25rem;
	font-weight: bold;
	color: var(--gfg-primary);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: var(--gfg-transition);
	line-height: 1;
}

.gfg-counter-btn:hover {
	background: var(--gfg-accent);
	color: #ffffff;
	border-color: var(--gfg-accent);
}

.gfg-counter-input {
	width: 55px;
	height: 36px;
	text-align: center;
	border: 1px solid var(--gfg-border-color);
	border-radius: 6px;
	font-size: 1rem;
	font-weight: 600;
	color: var(--gfg-primary);
}

/* Checkbox Cards */
.gfg-checkbox-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.gfg-checkbox-card {
	display: flex;
	align-items: flex-start;
	padding: 1.25rem;
	background: var(--gfg-bg-light);
	border: 2px solid var(--gfg-border-color);
	border-radius: calc(var(--gfg-radius) - 4px);
	cursor: pointer;
	transition: var(--gfg-transition);
}

.gfg-checkbox-card input[type="checkbox"] {
	width: 20px;
	height: 20px;
	margin-top: 2px;
	margin-right: 12px;
	accent-color: var(--gfg-accent);
	cursor: pointer;
}

.gfg-checkbox-card:hover {
	border-color: var(--gfg-accent);
	background: #ffffff;
}

.gfg-checkbox-content {
	display: flex;
	flex-direction: column;
}

.gfg-checkbox-title {
	font-weight: 600;
	color: var(--gfg-primary);
	font-size: 0.975rem;
}

.gfg-checkbox-desc {
	font-size: 0.825rem;
	color: var(--gfg-text-muted);
	margin-top: 2px;
}

/* Nested Counter inside Checkbox Card */
.gfg-checkbox-card.gfg-has-counter {
	flex-direction: column;
}

.gfg-checkbox-main {
	width: 100%;
}

.gfg-checkbox-label-wrapper {
	display: flex;
	align-items: flex-start;
	width: 100%;
}

.gfg-nested-counter {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin-top: 1rem;
	padding-top: 0.75rem;
	border-top: 1px dashed var(--gfg-border-color);
}

/* Nav Controls */
.gfg-nav-controls {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--gfg-border-color);
}

.gfg-btn {
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	font-size: 0.95rem;
	font-weight: 600;
	border: none;
	cursor: pointer;
	transition: var(--gfg-transition);
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.gfg-btn-primary {
	background: var(--gfg-accent);
	color: #ffffff;
}

.gfg-btn-primary:hover {
	background: var(--gfg-accent-hover);
}

.gfg-btn-secondary {
	background: #e2e8f0;
	color: var(--gfg-primary);
}

.gfg-btn-secondary:hover {
	background: #cbd5e1;
}

.gfg-btn-success {
	background: var(--gfg-success);
	color: #ffffff;
}

.gfg-btn-success:hover {
	background: var(--gfg-success-hover);
}

.gfg-btn-block {
	width: 100%;
	justify-content: center;
	padding: 0.9rem;
	font-size: 1.05rem;
}

/* Results Display */
.gfg-results-card {
	background: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: var(--gfg-radius);
	padding: 2rem;
	text-align: center;
	margin-bottom: 2rem;
}

.gfg-badge {
	display: inline-block;
	padding: 0.35rem 0.85rem;
	background: #dbeafe;
	color: var(--gfg-accent);
	font-size: 0.775rem;
	font-weight: 700;
	text-transform: uppercase;
	border-radius: 50px;
	margin-bottom: 0.75rem;
}

.gfg-pricing-display {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem;
	margin: 1.5rem 0;
}

.gfg-price-box {
	background: #ffffff;
	padding: 1.5rem;
	border-radius: calc(var(--gfg-radius) - 4px);
	border: 1px solid var(--gfg-border-color);
	box-shadow: var(--gfg-shadow-sm);
}

.gfg-price-label {
	display: block;
	font-size: 0.85rem;
	color: var(--gfg-text-muted);
	font-weight: 600;
	text-transform: uppercase;
	margin-bottom: 0.5rem;
}

.gfg-price-amount {
	font-size: 1.75rem;
	font-weight: 800;
	color: var(--gfg-accent);
}

.gfg-price-sm {
	font-size: 1.4rem;
	color: var(--gfg-primary);
}

.gfg-price-period {
	display: block;
	font-size: 0.8rem;
	color: var(--gfg-text-muted);
	margin-top: 0.25rem;
}

.gfg-price-note {
	display: inline-block;
	margin-top: 0.7rem;
	padding: 0.35rem 0.7rem;
	background: #fef3c7;
	color: #92400e;
	border: 1px solid #fde68a;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.4;
}

.gfg-disclaimer-box {
	font-size: 0.825rem;
	color: var(--gfg-text-muted);
	background: #ffffff;
	padding: 1rem;
	border-radius: 8px;
	border-left: 4px solid var(--gfg-accent);
	text-align: left;
	line-height: 1.45;
}

/* Contact Form Grid */
.gfg-lead-form-wrapper {
	background: #ffffff;
	border: 1px solid var(--gfg-border-color);
	border-radius: var(--gfg-radius);
	padding: 2rem;
}

.gfg-lead-header h3 {
	margin: 0 0 0.4rem 0;
	font-size: 1.25rem;
	color: var(--gfg-primary);
}

.gfg-lead-header p {
	margin: 0 0 1.5rem 0;
	font-size: 0.875rem;
	color: var(--gfg-text-muted);
}

.gfg-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem;
	margin-bottom: 1.5rem;
}

.gfg-full-width {
	grid-column: span 2;
}

.gfg-form-group {
	display: flex;
	flex-direction: column;
}

.gfg-form-label {
	font-size: 0.875rem;
	font-weight: 600;
	margin-bottom: 0.4rem;
	color: var(--gfg-primary);
}

.gfg-input-text, .gfg-select {
	padding: 0.75rem 1rem;
	border: 1px solid var(--gfg-border-color);
	border-radius: 8px;
	font-size: 0.95rem;
	transition: var(--gfg-transition);
}

.gfg-input-text:focus, .gfg-select:focus {
	outline: none;
	border-color: var(--gfg-border-focus);
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.gfg-response-msg {
	margin-top: 1rem;
	padding: 1rem;
	border-radius: 8px;
	font-size: 0.9rem;
	font-weight: 600;
	text-align: center;
}

.gfg-response-msg.gfg-success {
	background: #d1fae5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}

.gfg-response-msg.gfg-error {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fca5a5;
}

/* Spinner Overlay */
.gfg-loader-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(4px);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 50;
}

.gfg-spinner {
	width: 44px;
	height: 44px;
	border: 4px solid #e2e8f0;
	border-top-color: var(--gfg-accent);
	border-radius: 50%;
	animation: gfgSpin 0.8s linear infinite;
	margin-bottom: 1rem;
}

@keyframes gfgSpin {
	to { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 640px) {
	.gfg-calc-wrapper {
		padding: 1.25rem;
	}
	.gfg-pricing-display {
		grid-template-columns: 1fr;
	}
	.gfg-form-grid {
		grid-template-columns: 1fr;
	}
	.gfg-full-width {
		grid-column: span 1;
	}
}
