/* ==========================================================================
   Moneyfy Mind — Design tokens
   Palette sampled from reference header/footer screenshots:
   deep olive #5B7D26, mid olive #7A9F43, lime accent #B0DC10
   ========================================================================== */

:root {
	--mm-deep: #4E6B20;      /* deep olive - header/footer base */
	--mm-deep-2: #5B7D26;    /* deep olive - texture variant */
	--mm-mid: #7A9F43;       /* mid olive - nav strip / cards on dark */
	--mm-lime: #AEDC12;      /* lime accent - CTAs, links, highlights */
	--mm-lime-dark: #8FB80D; /* lime hover state */
	--mm-cream: #F7F9F0;     /* page background */
	--mm-ink: #24301A;       /* body text on light bg */
	--mm-sage: #DCEAB8;      /* muted text on dark bg */
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
	background-color: var(--mm-cream);
	color: var(--mm-ink);
}

h1, h2, h3, h4, .font-display {
	font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif;
	margin:0 0 15px;
}
h3, h4{
	margin-bottom:10px;
}
p{
	margin:0 0 20px;
}
p:last-child{
	margin-bottom:0;
}
/* Textured olive background used on header/footer, matching reference */
.mm-texture {
	background-color: var(--mm-deep);
	background-image:
		radial-gradient(circle at 15% 20%, rgba(255,255,255,0.05), transparent 40%),
		radial-gradient(circle at 85% 80%, rgba(0,0,0,0.15), transparent 45%),
		url('../images/texture-green.jpg');
	background-repeat: no-repeat, no-repeat, repeat;
	background-size: auto, auto, 220px auto;
	background-blend-mode: normal, normal, overlay;
	background-position:left bottom;
}
.mm-texture.sticky{
	background-position:left top;
}
/* ---- App-like mobile feel ---- */
html, body {
	overscroll-behavior-y: contain;
	-webkit-tap-highlight-color: transparent;
}
button, a {
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}
.mm-tap {
	transition: transform 0.1s ease;
}
.mm-tap:active {
	transform: scale(0.96);
}

/* Bottom app tab bar (mobile only) — floating dock style */
#mm-tabbar {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 50;
	display: flex;
	padding: 7px 6px calc(7px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid rgba(255,255,255,0.08);
	border-radius: 20px 20px 0 0;
	box-shadow: 0 -10px 30px rgba(0,0,0,0.28);
}
#mm-tabbar a {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	margin: 0 2px;
	padding: 7px 2px;
	border-radius: 14px;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: rgba(255,255,255,0.6);
	transition: background-color 0.18s ease, color 0.18s ease;
}
#mm-tabbar a.is-active {
	color: var(--mm-lime);
	background: rgba(174,220,18,0.16);
}
#mm-tabbar a:active {
	color: var(--mm-lime);
}
#mm-tabbar svg {
	width: 22px;
	height: 22px;
	transition: filter 0.18s ease;
}
#mm-tabbar a.is-active svg {
	filter: drop-shadow(0 0 6px rgba(174,220,18,0.45));
}
footer.mm-texture .border-t div{
	gap:5px;
	column-gap:15px;
}
footer.mm-texture .border-t p{
	margin-bottom:0;
}

@media (min-width: 768px) {
	#mm-tabbar { display: none !important; }
	body.has-tabbar { padding-bottom: 0; }
}

.mm-nav-strip {
	background-color: var(--mm-mid);
}

/* Focus visibility (accessibility) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
	outline: 2px solid var(--mm-lime);
	outline-offset: 2px;
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Calculator card shell */
.mm-calc-card {
	background: #ffffff;
	border: 1px solid #E4E9D8;
	border-radius: 16px;
	box-shadow: 0 1px 2px rgba(36,48,26,0.06), 0 8px 24px rgba(36,48,26,0.06);
}

/* Result highlight box */
.mm-result {
	background: linear-gradient(135deg, var(--mm-deep) 0%, var(--mm-mid) 100%);
	color: #ffffff;
	border-radius: 14px;
}

/* Number input styling (remove spin buttons for cleaner look, keep native for a11y where useful) */
input[type="number"] {
	-moz-appearance: textfield;
}

/* Range slider accent */
input[type="range"] {
	accent-color: var(--mm-lime-dark);
}

/* Simple fade-in for calculator results */
.mm-fade-in {
	animation: mmFadeIn 0.25s ease-out;
}
@keyframes mmFadeIn {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: translateY(0); }
}

/* EMI schedule & yearly summary tables */
.mm-schedule-table {
	width: 100%;
	min-width: 560px;
	border-collapse: collapse;
}
.mm-schedule-table th {
	position: sticky;
	top: 0;
	background: #EDF3E0;
	color: #24301A;
	font-weight: 700;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 10px 14px;
	text-align: left;
	border-bottom: 1px solid #E4E9D8;
	white-space: nowrap;
}
.mm-schedule-table td {
	padding: 9px 14px;
	font-size: 0.85rem;
	color: #3A4530;
	border-bottom: 1px solid #EEF2E4;
	white-space: nowrap;
}
.mm-schedule-table tbody tr:last-child td {
	border-bottom: none;
}
.mm-schedule-table tbody tr:nth-child(even) {
	background: #FBFCF8;
}
.mm-schedule-table .text-right {
	text-align: right;
}

/* Scrollable wrapper for long yearly summary tables */
.mm-table-scroll {
	max-height: 440px;
	overflow-y: auto;
}

/* Year-wise accordion rows inside the EMI Payment Schedule */
.mm-year-item .mm-year-panel .mm-schedule-table {
	min-width: 480px;
}
.mm-year-toggle {
	cursor: pointer;
}
.mm-year-icon {
	transition: transform 0.18s ease;
	display: inline-block;
}

/* Home Loan Prepayment Calculator — validation message box */
.mm-error-box {
	background: #FBEDEA;
	border: 1px solid #E9C6BC;
	color: #8A3B26;
	border-radius: 12px;
	padding: 14px 16px;
	font-size: 0.85rem;
	line-height: 1.5;
}

/* Mobile menu */
#mm-mobile-menu {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}
#mm-mobile-menu.open {
	max-height: 480px;
}

.no-scrollbar::-webkit-scrollbar{display:none}
.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}

/* Footer link columns: left-align on desktop, centered single column on mobile.
   (Fixes missing responsive utility classes in the compiled Tailwind build.) */
footer.mm-texture .grid {
	grid-template-columns: repeat(1, minmax(0, 1fr));
	text-align: center;
}
footer.mm-texture .grid > div a,
footer.mm-texture .grid > div .flex {
	justify-content: center;
}
@media (min-width: 768px) {
	footer.mm-texture .grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
		text-align: left;
	}
	footer.mm-texture .grid > div .flex {
		justify-content: flex-start;
	}
	footer.mm-texture .grid > div.col-span-2 p {
		margin-left: 0;
		margin-right: 0;
	}
}
@media (max-width: 767px) {
footer.mm-texture .grid-cols-1{
	gap:35px;
}
footer.mm-texture .grid-cols-1 .col-span-2 {
    grid-column: span 1 / span 1;
}
footer.mm-texture .border-t{
	flex-direction: column;
	padding-bottom:50px;
}
footer.mm-texture .border-t div{
	-webkit-box-ordinal-group: 1;
	-ms-flex-order: 0;
	order: 0;
}
footer.mm-texture .border-t p{
	-webkit-box-ordinal-group: 2;
	-ms-flex-order: 1;
	order: 1;
}
footer.mm-texture .pt-16 {
    padding-top: 50px;
}
}