/*
 * Mobile home page: visual consistency pass (FactoryPlans).
 * Optional layer on top of mobile-blocks.css / mobile-home.css. To revert, remove the
 * <link ... mobile-home-polish.css> line in resources/views/index.blade.php,
 * or delete this file.
 * Nothing else depends on it.
 *
 * Mobile only: every rule is inside the same max-width query as mobile-home.css.
 * Selectors start with "html body" so they win over mobile-home.css without
 * editing it.
 */
@media (max-width: 767.98px) {

	/* 1. Cards look like the desktop boxes: light grey with a coloured top border.
	      No card is highlighted on its own. */
	html body .m-flow .m-tool .featured-box,
	html body .m-flow .featured-box.m-tool {
		background: #f7f7f7 !important;
		border: 1px solid #e6e6e6 !important;
		border-radius: 4px !important;
		box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
		margin: 0 0 14px !important;
	}
	html body .m-flow .m-tool .featured-box .box-content,
	html body .m-flow .featured-box.m-tool > .box-content {
		border-top: 4px solid #0099e6 !important;  /* primary (default) */
		border-radius: 4px 4px 0 0;
		padding: 16px !important;
	}
	/* same top-border colours as the desktop theme (css/custom.css) */
	html body .m-flow .m-tool .featured-box.featured-box-secondary .box-content,
	html body .m-flow .featured-box.m-tool.featured-box-secondary > .box-content { border-top-color: #e36159 !important; }
	html body .m-flow .m-tool .featured-box.featured-box-tertiary .box-content,
	html body .m-flow .featured-box.m-tool.featured-box-tertiary > .box-content { border-top-color: #2baab1 !important; }
	html body .m-flow .m-tool .featured-box.featured-box-quaternary .box-content,
	html body .m-flow .featured-box.m-tool.featured-box-quaternary > .box-content { border-top-color: #383f48 !important; }

	html body .m-flow .m-tool .form-group:last-child { margin-bottom: 0 !important; }

	/* 2. Titles: centred, coloured like the card's top border (as on desktop) */
	html body .m-flow .m-title {
		margin-bottom: 12px !important;
		justify-content: center;
		text-align: center !important;
	}
	html body .m-flow .featured-box-primary    .m-title { color: #0099e6 !important; }
	html body .m-flow .featured-box-secondary  .m-title { color: #e36159 !important; }
	html body .m-flow .featured-box-tertiary   .m-title { color: #2baab1 !important; }
	html body .m-flow .featured-box-quaternary .m-title { color: #383f48 !important; }

	/* 3. Every button is solid blue, with the same height and radius as the inputs */
	html body .m-flow .m-tool .btn,
	html body .m-flow .m-tool input[type="submit"] {
		min-height: 48px;
		margin: 8px 0 0 !important;
		border: 2px solid #0099e6 !important;
		border-radius: 6px !important;
		background: #0099e6 !important;
		color: #fff !important;
	}
	/* a button that comes straight after the title needs no top gap
	   (Document Upload, Cancellation), so every card has the same title-to-control spacing */
	html body .m-flow .m-tool .m-title + .form-group .btn { margin-top: 0 !important; }
	html body .m-call-btn { border-radius: 6px; }

	/* 4. Inputs: same height, border and radius in every card */
	html body .m-flow .m-tool .form-control {
		height: 46px;
		border: 1px solid #cfd8e0 !important;
		border-radius: 6px !important;
		background-color: #fff;
	}
	html body .m-flow .m-tool textarea.form-control { height: auto; }

	/* 5. Helper text under buttons: same gap, size and colour */
	html body .m-flow .m-tool .m-note,
	html body .m-flow .m-tool .m-note i {
		margin: 10px 0 0 !important;
		font-size: 13px !important;
		line-height: 1.45 !important;
		color: #5f6b76 !important;
	}

	/* 6. Learn More matches the cards: grey with a blue top border */
	html body .m-learn-title,
	html body .m-learn-links {
		background: #f7f7f7;
		border-color: #e6e6e6;
	}
	html body .m-learn-title {
		border-top: 4px solid #0099e6;
		border-radius: 4px 4px 0 0;
		color: #0099e6;
		text-align: center;
	}
	html body .m-learn-links { border-radius: 0 0 4px 4px; }}
