/* ============================================================
   HUSTLE ROI CALCULATOR — Ocean Blue Theme  v1.1.0
   All selectors are prefixed with .hrc- to prevent conflicts
   with themes, page-builders, Pro plugins, or other widgets.
   ============================================================ */

/* ── WRAPPER ───────────────────────────────────────────────── */
.hrc-wrapper {
	width: 100%;
	display: flex;
	justify-content: center;
	padding: 20px 0;
	margin: 20px 0;
}

.hrc-app {
	width: 100%;
	max-width: 800px;
	background: #ffffff;
	border-radius: 14px;
	box-shadow: 0 4px 24px rgba(14, 165, 233, 0.10), 0 1px 4px rgba(0, 0, 0, 0.06);
	overflow: hidden;
	/* Use a narrow font stack; don't inherit Inter if it isn't loaded globally */
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	border: 1px solid #bae6fd;
	/* Isolate from parent line-height / font-size resets */
	font-size: 16px;
	line-height: 1.5;
	color: #0f172a;
}

/* Scoped box-sizing so no global * rule needed */
.hrc-app *,
.hrc-app *::before,
.hrc-app *::after {
	box-sizing: border-box;
}

/* ── HEADER ───────────────────────────────────────────────── */
.hrc-header {
	background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
	padding: 32px 28px 24px;
	text-align: center;
	position: relative;
	overflow: hidden;
}

.hrc-header::after {
	content: '';
	position: absolute;
	top: -60px;
	right: -60px;
	width: 220px;
	height: 220px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.06);
	pointer-events: none;
}

/* Use h2 tag (see PHP) — reset margins that themes often set */
.hrc-title {
	font-size: 1.7rem;
	font-weight: 800;
	color: #ffffff;
	margin: 0 0 6px 0;
	padding: 0;
	letter-spacing: -0.3px;
	line-height: 1.15;
	border: none;
	background: none;
}

.hrc-subtitle {
	font-size: 0.95rem;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.82);
	margin: 0;
	padding: 0;
	line-height: 1.45;
}

/* ── BODY ──────────────────────────────────────────────────── */
.hrc-body {
	padding: 24px 28px;
}

/* ── INPUT GROUPS ──────────────────────────────────────────── */
.hrc-inputs {
	margin-bottom: 24px;
}

.hrc-input-group {
	margin-bottom: 20px;
	background: #f8fafc;
	border-radius: 10px;
	padding: 16px 20px;
	border: 1px solid #e2e8f0;
	transition: border-color 0.2s;
}

.hrc-input-group:hover {
	border-color: #0ea5e9;
}

.hrc-input-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
}

.hrc-input-icon {
	font-size: 18px;
	line-height: 1;
}

.hrc-input-header label {
	font-weight: 600;
	color: #0f172a;
	font-size: 0.9rem;
	margin: 0;
	cursor: default;
}

/* ── SLIDERS ───────────────────────────────────────────────── */
.hrc-input-slider input[type="range"] {
	width: 100%;
	height: 6px;
	-webkit-appearance: none;
	appearance: none;
	background: #e2e8f0;
	border-radius: 3px;
	outline: none;
	transition: background 0.2s;
	margin: 0;
	padding: 0;
	border: none;
	cursor: pointer;
}

.hrc-input-slider input[type="range"]:focus {
	outline: 2px solid #0ea5e9;
	outline-offset: 2px;
}

.hrc-input-slider input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
	transition: transform 0.2s;
	border: none;
}

.hrc-input-slider input[type="range"]::-webkit-slider-thumb:hover {
	transform: scale(1.15);
}

.hrc-input-slider input[type="range"]::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
	cursor: pointer;
	border: none;
	box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.hrc-slider-labels {
	display: flex;
	justify-content: space-between;
	margin-top: 8px;
	font-size: 0.75rem;
	color: #64748b;
}

.hrc-slider-value {
	font-weight: 700;
	color: #0369a1;
	font-size: 0.85rem;
}

/* ── EXPERIENCE & TYPE BUTTONS ────────────────────────────── */
.hrc-exp-options {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

.hrc-type-options {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
}

.hrc-exp-btn,
.hrc-type-btn {
	padding: 10px 12px;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	background: #ffffff;
	cursor: pointer;
	font-size: 0.8rem;
	font-weight: 600;
	color: #334155;
	transition: all 0.2s;
	text-align: center;
	font-family: inherit;
	line-height: 1.4;
	/* Reset any theme button styles */
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
}

.hrc-exp-btn:hover,
.hrc-type-btn:hover {
	border-color: #0ea5e9;
	background: #f0f9ff;
}

.hrc-exp-btn:focus,
.hrc-type-btn:focus {
	outline: 2px solid #0ea5e9;
	outline-offset: 2px;
}

.hrc-exp-btn.hrc-active,
.hrc-type-btn.hrc-active {
	border-color: #0ea5e9;
	background: #f0f9ff;
	color: #0369a1;
	box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.hrc-exp-icon {
	display: block;
	font-size: 20px;
	margin-bottom: 4px;
	line-height: 1;
}

.hrc-exp-rate {
	display: block;
	font-size: 0.65rem;
	font-weight: 400;
	color: #64748b;
	margin-top: 2px;
}

/* ── RESULTS ────────────────────────────────────────────────── */
.hrc-results {
	background: #ffffff;
	border: 2px solid #bae6fd;
	border-radius: 12px;
	padding: 20px;
	margin-top: 24px;
}

.hrc-results-header {
	text-align: center;
	margin-bottom: 16px;
}

.hrc-results-header h3 {
	margin: 0;
	padding: 0;
	color: #0f172a;
	font-size: 1.1rem;
	font-weight: 700;
	border: none;
	background: none;
}

.hrc-results-header p {
	margin: 4px 0 0;
	padding: 0;
	color: #64748b;
	font-size: 0.85rem;
}

.hrc-results-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin-bottom: 16px;
}

.hrc-result-card {
	text-align: center;
	padding: 14px;
	border-radius: 10px;
	border: 2px solid #e2e8f0;
	transition: all 0.3s;
}

.hrc-result-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.hrc-result-card.hrc-conservative {
	border-color: #94a3b8;
	background: #f8fafc;
}

.hrc-result-card.hrc-average {
	border-color: #0ea5e9;
	background: #f0f9ff;
}

.hrc-result-card.hrc-potential {
	border-color: #22c55e;
	background: #f0fdf4;
}

.hrc-result-label {
	font-size: 0.7rem;
	font-weight: 600;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.hrc-result-value {
	font-size: 1.8rem;
	font-weight: 800;
	margin: 4px 0;
	line-height: 1.2;
}

.hrc-result-card.hrc-conservative .hrc-result-value { color: #475569; }
.hrc-result-card.hrc-average      .hrc-result-value { color: #0369a1; }
.hrc-result-card.hrc-potential    .hrc-result-value { color: #15803d; }

.hrc-result-sub {
	font-size: 0.7rem;
	color: #94a3b8;
}

/* ── ASSUMPTIONS NOTE ──────────────────────────────────────── */
.hrc-assumptions-note {
	font-size: 0.72rem;
	color: #94a3b8;
	text-align: center;
	margin: 0 0 14px 0;
	padding: 0;
	line-height: 1.4;
}

/* ── DETAIL ROWS ───────────────────────────────────────────── */
.hrc-details {
	border-top: 2px solid #f1f5f9;
	padding-top: 14px;
	margin-bottom: 14px;
}

.hrc-detail-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px solid #f1f5f9;
}

.hrc-detail-row:last-child {
	border-bottom: none;
}

.hrc-detail-row.hrc-highlight {
	background: #fef3c7;
	margin: 0 -20px;
	padding: 10px 20px;
	border-radius: 6px;
	border: 1px solid #fde68a;
}

.hrc-detail-label {
	color: #64748b;
	font-size: 0.85rem;
}

.hrc-detail-value {
	font-weight: 700;
	color: #0f172a;
	font-size: 0.9rem;
}

.hrc-detail-row.hrc-highlight .hrc-detail-value {
	color: #92400e;
	font-size: 1.1rem;
}

/* ── ROI MESSAGE ───────────────────────────────────────────── */
.hrc-roi-message {
	background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
	padding: 12px 16px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	gap: 10px;
	border: 1px solid #f59e0b;
	margin-bottom: 0;
}

.hrc-msg-icon {
	font-size: 20px;
	flex-shrink: 0;
	line-height: 1;
}

.hrc-msg-text {
	font-weight: 600;
	color: #92400e;
	font-size: 0.9rem;
}

/* ── TOAST ─────────────────────────────────────────────────── */
.hrc-toast {
	display: none;
	margin-top: 12px;
	background: #0f172a;
	color: #f8fafc;
	padding: 10px 16px;
	border-radius: 8px;
	font-size: 0.85rem;
	font-weight: 500;
	text-align: center;
	opacity: 0;
	transition: opacity 0.3s;
}

.hrc-toast.hrc-toast--visible {
	display: block;
	opacity: 1;
	animation: hrcFadeInOut 3s forwards;
}

@keyframes hrcFadeInOut {
	0%   { opacity: 0; }
	10%  { opacity: 1; }
	80%  { opacity: 1; }
	100% { opacity: 0; }
}

/* ── FOOTER ────────────────────────────────────────────────── */
.hrc-footer {
	padding: 16px 28px 24px;
	text-align: center;
	border-top: 1px solid #e2e8f0;
}

.hrc-footer p {
	font-size: 0.75rem;
	color: #94a3b8;
	margin: 0 0 12px 0;
	padding: 0;
}

.hrc-footer-actions {
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.hrc-share-btn {
	background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
	color: #ffffff;
	border: none;
	padding: 10px 24px;
	border-radius: 8px;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
	font-family: inherit;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	line-height: 1.5;
}

.hrc-share-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
	background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
	color: #ffffff;
}

.hrc-share-btn:focus {
	outline: 2px solid #0369a1;
	outline-offset: 2px;
}

.hrc-print-btn {
	background: #ffffff;
	color: #0369a1;
	border: 1.5px solid #0ea5e9;
	padding: 10px 24px;
	border-radius: 8px;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
	font-family: inherit;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	line-height: 1.5;
}

.hrc-print-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 14px rgba(14, 165, 233, 0.2);
	background: #f0f9ff;
	color: #0369a1;
	border-color: #0369a1;
}

.hrc-print-btn:focus {
	outline: 2px solid #0369a1;
	outline-offset: 2px;
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 640px) {
	.hrc-header {
		padding: 24px 18px 18px;
	}

	.hrc-title {
		font-size: 1.3rem;
	}

	.hrc-body {
		padding: 16px 18px;
	}

	.hrc-input-group {
		padding: 12px 14px;
	}

	.hrc-exp-options {
		grid-template-columns: 1fr;
	}

	.hrc-type-options {
		grid-template-columns: 1fr 1fr;
	}

	.hrc-results-grid {
		grid-template-columns: 1fr;
	}

	.hrc-result-card {
		padding: 10px;
	}

	.hrc-result-value {
		font-size: 1.4rem;
	}

	.hrc-footer {
		padding: 14px 18px 18px;
	}
}

@media (max-width: 420px) {
	.hrc-type-options {
		grid-template-columns: 1fr;
	}
}

/* ── PRINT ─────────────────────────────────────────────────── */
@media print {
	body * {
		visibility: hidden;
	}

	.hrc-wrapper,
	.hrc-wrapper * {
		visibility: visible;
	}

	.hrc-wrapper {
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
	}

	.hrc-app {
		box-shadow: none;
		border: 1px solid #ccc;
	}

	/* Keep the page as the user saw it — sliders, selections, and
	   results all print. Only hide things that don't make sense on
	   paper: the welcome overlay, the toast, and the action buttons. */
	#hrc-welcome-screen,
	.hrc-footer-actions,
	.hrc-toast,
	#hrc-welcome-reopen-btn {
		display: none !important;
	}

	/* Range inputs render inconsistently across browsers' print
	   engines, so we don't fight that — the value label next to each
	   slider (.hrc-slider-value) already shows exactly what was
	   chosen, and that's what needs to be legible on paper. */

	.hrc-results {
		break-inside: avoid;
	}

	/* The on-screen "selected" style is a faint blue tint that can
	   wash out in grayscale/low-ink printing, so reinforce it here
	   with a solid border and bold text. */
	.hrc-exp-btn.hrc-active,
	.hrc-type-btn.hrc-active {
		border: 2px solid #0369a1 !important;
		background: #f0f9ff !important;
		font-weight: 700;
	}

	.hrc-footer p {
		color: #475569;
	}
}
