/* ============================================================
   FINANCE TOOL ENGINE — shared scaffolding for all finance tools
   Scope: .sr-finance-page wrapper (added by template-tool.php)

   PURPOSE:
   This file ONLY provides the outer page wrapper (grey background,
   padding, font family, page width). Tool-specific CSS still lives
   in assets/css/finance-tools/{slug}.css and is enqueued separately.

   DESIGN RULE:
   Match calculator-engine.css EXACTLY for consistency:
     - Same background (#E8E8EC)
     - Same padding (16px 10px 60px)
     - Same font stack
     - Same inner page width (720px centered)
     - Same responsive breakpoints

   TOOL UI IS NEVER TOUCHED.
   Only the outer wrapper is provided here.

   @package SarkariResizerChild
   @version 1.0.0
   ============================================================ */

/* ============================================================
   PAGE WRAPPER — same rhythm as .sr-calc-page
   ============================================================ */
.sr-finance-page {
	background: #E8E8EC;
	color: #18181B;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	padding: 16px 10px 60px;
	display: block;
	overflow-x: hidden;
	max-width: 100vw;
	width: 100%;
	box-sizing: border-box;
}

.sr-finance-page *,
.sr-finance-page *::before,
.sr-finance-page *::after {
	box-sizing: border-box;
}

/* ============================================================
   INNER PAGE CONTAINER — 720px centered
   Each tool's own wrapper class (sr-ts, sr-ps, etc.) has its own
   max-width in the tool CSS file. We constrain it to 720px so
   every finance tool page looks like a calculator page.
   ============================================================ */
.sr-finance-page .sr-tool-wrap,
.sr-finance-page .wrap {
	max-width: 720px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	width: 100%;
}

/* ============================================================
   FOCUS VISIBLE — accessibility
   ============================================================ */
.sr-finance-page button:focus-visible,
.sr-finance-page input:focus-visible,
.sr-finance-page textarea:focus-visible,
.sr-finance-page select:focus-visible,
.sr-finance-page a:focus-visible,
.sr-finance-page [tabindex]:focus-visible {
	outline: 2px solid var(--sr-accent, #4F46E5);
	outline-offset: 2px;
}

/* ============================================================
   RESPONSIVE — matches calculator-engine.css breakpoints
   ============================================================ */
@media (min-width: 640px) {
	.sr-finance-page {
		padding: 20px 12px 60px;
	}
}

@media (min-width: 1024px) {
	.sr-finance-page {
		padding: 24px 12px 60px;
	}
}

@media (max-width: 480px) {
	.sr-finance-page {
		padding: 14px 8px 50px;
	}
}

@media (max-width: 380px) {
	.sr-finance-page {
		padding: 12px 6px 44px;
	}
}

/* ============================================================
   MOBILE OVERFLOW SAFETY — prevents horizontal scroll
   ============================================================ */
@media (max-width: 480px) {
	.sr-finance-page * {
		word-wrap: break-word;
		overflow-wrap: break-word;
	}

	.sr-finance-page pre,
	.sr-finance-page code,
	.sr-finance-page textarea {
		max-width: 100%;
	}
}

/* ============================================================
   REDUCED MOTION — respects user preference
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	.sr-finance-page *,
	.sr-finance-page *::before,
	.sr-finance-page *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* ============================================================
   SCREEN-READER ONLY UTILITY
   ============================================================ */
.sr-finance-page .sr-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ============================================================
   TOOL SHELL — breadcrumb, heading, card (used by every tool partial)
   Accent comes from the category (--sr-accent set inline on the wrapper)
   ============================================================ */
.sr-finance-page .sr-tool-crumb { display:flex; flex-wrap:wrap; gap:6px; align-items:center; font-size:12.5px; color:#71717A; margin:4px 0 14px; }
.sr-finance-page .sr-tool-crumb a { color:#71717A; text-decoration:none; }
.sr-finance-page .sr-tool-crumb a:hover { color:var(--sr-accent,#4F46E5); }
.sr-finance-page .sr-tool-crumb .sr-tool-sep { opacity:.5; }
.sr-finance-page .sr-tool-crumb .sr-tool-current { color:#18181B; font-weight:600; }
.sr-finance-page .sr-tool-head h1 { font-size:24px; line-height:1.25; font-weight:800; margin:0 0 6px; color:#18181B; }
.sr-finance-page .sr-tool-head p { margin:0 0 14px; color:#52525B; font-size:14.5px; }
.sr-finance-page .sr-tool-card { background:#fff; border:1px solid #E4E4E7; border-radius:14px; padding:18px; margin-bottom:14px; }
.sr-finance-page .sr-tool-placeholder { margin:0; color:#71717A; text-align:center; padding:28px 8px; }
@media (min-width:640px) { .sr-finance-page .sr-tool-head h1 { font-size:28px; } }
