/**************************************************************************************************/
/* SafeBiz theme — "Fresh Fintech" (sky + deep blue)                                              */
/* Loaded AFTER bootstrap.min.css and site.css so these rules win.                                */
/* Strategy: drive as much as possible through Bootstrap 5.3 CSS variables, then add a small      */
/* number of explicit component overrides where Bootstrap doesn't expose a variable.              */
/**************************************************************************************************/

/**************************************************************************************************/
/* Self-hosted fonts — Poppins (headings) + Inter (body/UI). Files live in /fonts.                */
/**************************************************************************************************/

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("/fonts/inter-400.woff2") format("woff2");
}

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("/fonts/inter-500.woff2") format("woff2");
}

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("/fonts/inter-600.woff2") format("woff2");
}

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("/fonts/inter-700.woff2") format("woff2");
}

@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("/fonts/poppins-500.woff2") format("woff2");
}

@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("/fonts/poppins-600.woff2") format("woff2");
}

@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("/fonts/poppins-700.woff2") format("woff2");
}

/**************************************************************************************************/
/* Design tokens                                                                                  */
/**************************************************************************************************/

:root {
	/* Brand palette */
	--sb-blue: #2563eb; /* primary accent — CTAs                */
	--sb-blue-hover: #1d4ed8; /* hover                                */
	--sb-blue-active: #1e40af; /* pressed                              */
	--sb-blue-soft: #eff6ff; /* tinted surfaces / hero wash          */
	--sb-navy: #1e3a8a; /* headings / nav                       */
	--sb-navy-dark: #172554; /* nav hover / deep accents             */
	--sb-on-accent: #ffffff; /* text ON blue buttons (contrast)      */
	--sb-ink: #1f2937; /* body text                            */
	--sb-muted: #64748b; /* secondary text                       */
	--sb-border: #e2e8f0; /* hairlines                            */
	--sb-surface: #ffffff;
	--sb-surface-soft: #f8fafc; /* page/section wash                    */

	/* Shape + depth */
	--sb-radius: 0.75rem;
	--sb-radius-sm: 0.5rem;
	--sb-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
	--sb-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
	--sb-shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.12);

	/* Map onto Bootstrap's theme variables so stock components pick up the brand automatically */
	--bs-primary: var(--sb-blue);
	--bs-primary-rgb: 37, 99, 235;
	--bs-success-rgb: 37, 99, 235;
	--bs-dark-rgb: 30, 58, 138; /* makes .bg-dark / .navbar-dark deep blue      */
	--bs-link-color: var(--sb-navy);
	--bs-link-color-rgb: 30, 58, 138;
	--bs-link-hover-color: var(--sb-navy-dark);
	--bs-link-hover-color-rgb: 23, 37, 84;
	--bs-body-color: var(--sb-ink);
	--bs-body-color-rgb: 31, 41, 55;
	--bs-body-bg: var(--sb-surface);
	--bs-border-color: var(--sb-border);
	--bs-emphasis-color: var(--sb-navy);
	--bs-border-radius: var(--sb-radius-sm);
	--bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/**************************************************************************************************/
/* Typography                                                                                     */
/**************************************************************************************************/

body {
	font-family: var(--bs-body-font-family);
	color: var(--sb-ink);
	background-color: var(--sb-surface);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
	font-family: "Poppins", var(--bs-body-font-family);
	color: var(--sb-navy);
	font-weight: 600;
	letter-spacing: -0.01em;
}

h1, .h1 {
	font-weight: 700;
	letter-spacing: -0.02em;
}

/* legend was darkcyan in site.css — align to brand */
legend {
	font-family: "Poppins", var(--bs-body-font-family);
	color: var(--sb-navy);
	font-weight: 600;
	border-bottom: 1px solid var(--sb-border);
}

a {
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

/* Long-form legal/content pages: constrained measure + comfortable rhythm */
.content-readable {
	max-width: 860px;
	margin-left: auto;
	margin-right: auto;
	line-height: 1.75;
}

.content-readable h2,
.content-readable h3 {
	margin-top: 2rem;
}

/**************************************************************************************************/
/* Navigation                                                                                     */
/**************************************************************************************************/

.navbar.bg-dark {
	background-color: var(--sb-navy) !important;
	box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
}

/* Override the blue hover that site.css hard-codes (rgb(53,152,219)) → brand light blue */
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus,
.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .show > .nav-link {
	color: #bfdbfe !important; /* light blue, readable on deep blue */
}

/* Dropdown menus in the member tabs */
.dropdown-menu {
	border: 1px solid var(--sb-border);
	border-radius: var(--sb-radius-sm);
	box-shadow: var(--sb-shadow);
	padding: 0.375rem;
}

.dropdown-item {
	border-radius: 0.375rem;
	padding: 0.45rem 0.75rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
	background-color: var(--sb-blue-soft);
	color: var(--sb-navy-dark);
}

.dropdown-item:active,
.dropdown-item.active {
	background-color: var(--sb-blue);
	color: var(--sb-on-accent);
}

/**************************************************************************************************/
/* Buttons                                                                                        */
/**************************************************************************************************/

.btn {
	border-radius: 999px; /* pill buttons — the friendly fintech tell */
	font-weight: 600;
	padding-left: 1.25rem;
	padding-right: 1.25rem;
}

.btn-sm {
	padding-left: 0.9rem;
	padding-right: 0.9rem;
}

/* Primary + Success = brand blue with white text for AA contrast */
.btn-primary,
.btn-success {
	--bs-btn-color: var(--sb-on-accent);
	--bs-btn-bg: var(--sb-blue);
	--bs-btn-border-color: var(--sb-blue);
	--bs-btn-hover-color: var(--sb-on-accent);
	--bs-btn-hover-bg: var(--sb-blue-hover);
	--bs-btn-hover-border-color: var(--sb-blue-hover);
	--bs-btn-active-color: var(--sb-on-accent);
	--bs-btn-active-bg: var(--sb-blue-active);
	--bs-btn-active-border-color: var(--sb-blue-active);
	--bs-btn-disabled-color: var(--sb-on-accent);
	--bs-btn-disabled-bg: var(--sb-blue);
	--bs-btn-disabled-border-color: var(--sb-blue);
}

.btn-outline-primary {
	--bs-btn-color: var(--sb-navy);
	--bs-btn-border-color: var(--sb-blue);
	--bs-btn-hover-color: var(--sb-on-accent);
	--bs-btn-hover-bg: var(--sb-blue);
	--bs-btn-hover-border-color: var(--sb-blue);
	--bs-btn-active-color: var(--sb-on-accent);
	--bs-btn-active-bg: var(--sb-blue-active);
	--bs-btn-active-border-color: var(--sb-blue-active);
}

/* Secondary = quiet blue-tinted outline */
.btn-secondary {
	--bs-btn-color: var(--sb-navy);
	--bs-btn-bg: #ffffff;
	--bs-btn-border-color: var(--sb-border);
	--bs-btn-hover-color: var(--sb-navy-dark);
	--bs-btn-hover-bg: var(--sb-surface-soft);
	--bs-btn-hover-border-color: var(--sb-muted);
	--bs-btn-active-bg: var(--sb-surface-soft);
	--bs-btn-active-border-color: var(--sb-muted);
}

/**************************************************************************************************/
/* Cards + surfaces                                                                               */
/**************************************************************************************************/

.card {
	border: 1px solid var(--sb-border);
	border-radius: var(--sb-radius);
	box-shadow: var(--sb-shadow-sm);
}

.card.shadow,
.card.shadow-sm {
	box-shadow: var(--sb-shadow) !important;
}

.card-header {
	background-color: var(--sb-surface-soft);
	border-bottom: 1px solid var(--sb-border);
	font-family: "Poppins", var(--bs-body-font-family);
	font-weight: 600;
	color: var(--sb-navy);
}

/* Optional blue top-accent for feature/highlight cards: class="card card-accent" */
/*.card-accent {
	border-top: 3px solid var(--sb-blue);
}*/

/* Hero wash used on landing/login-style pages: class="hero" */
.hero {
	background: linear-gradient(160deg, var(--sb-blue-soft) 0%, #ffffff 70%);
	border-radius: var(--sb-radius);
	padding: 2.5rem;
}

/* Full-bleed background-image hero: class="hero-bg" wrapping .hero-bg__img,       */
/* .hero-bg__overlay and .hero-bg__content. The <asp:Image> is positioned as a     */
/* cover layer so ImageUrl keeps working without code-behind changes.              */
.hero-bg {
	position: relative;
	overflow: hidden;
	border-radius: var(--sb-radius);
	padding: 4.5rem 2.5rem;
	box-shadow: var(--sb-shadow);
}

.hero-bg__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.hero-bg__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(160deg, rgba(30, 58, 138, 0.6) 0%, rgba(37, 99, 235, 0.45) 100%);
}

.hero-bg__content {
	position: relative; /* sits above the image + overlay */
}

/* Headings default to navy in this theme — flip to white over the dark overlay */
.hero-bg h1,
.hero-bg .h1 {
	color: #ffffff;
}

.hero-bg p {
	color: rgba(255, 255, 255, 0.92);
}

/**************************************************************************************************/
/* Forms                                                                                          */
/**************************************************************************************************/

.form-control,
.form-select {
	border-radius: var(--sb-radius-sm);
	border-color: var(--sb-border);
}

.form-control:focus,
.form-select:focus {
	border-color: #93c5fd; /* blue-300 */
	box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.25);
}

/**************************************************************************************************/
/* Misc components                                                                                */
/**************************************************************************************************/

.nav-tabs .nav-link.active {
	color: var(--sb-navy);
	border-bottom-color: var(--sb-surface);
	font-weight: 600;
}

.nav-tabs .nav-link:hover {
	color: var(--sb-navy-dark);
}

.list-group-item.active {
	background-color: var(--sb-blue);
	border-color: var(--sb-blue);
	color: var(--sb-on-accent);
}

.progress-bar {
	background-color: var(--sb-blue);
}

.alert {
	border-radius: var(--sb-radius-sm);
	border: 1px solid transparent;
}

/**************************************************************************************************/
/* Footer                                                                                         */
/**************************************************************************************************/

footer {
	color: var(--sb-muted);
}

footer a {
	color: var(--sb-navy);
}

footer a:hover {
	color: var(--sb-navy-dark);
}

/* .carousel-inner clips overflow (to hide adjacent slides), which also cuts */
/* off the cards' box-shadow. Pad the inner container so the shadow renders.  */
#bulletCarousel .carousel-inner {
	padding: 0.5rem 0.5rem 1.25rem;
}

/* Responsive bullet carousel: one card at a time on mobile, all three         */
/* side-by-side (static grid) from lg up, where controls/indicators are hidden. */
@media (min-width: 992px) {
	#bulletCarousel .carousel-inner {
		display: flex;
	}

	#bulletCarousel .carousel-item {
		display: block;
		flex: 0 0 33.3333%;
		margin-right: 0;
		transform: none !important;
	}

	#bulletCarousel .carousel-indicators,
	#bulletCarousel .carousel-control-prev,
	#bulletCarousel .carousel-control-next {
		display: none;
	}

	/* Align the outer cards flush with the container: drop the inner side */
	/* padding, then the first card's left and last card's right gutter.    */
	#bulletCarousel .carousel-inner {
		padding-left: 0;
		padding-right: 0;
	}

	#bulletCarousel .carousel-item:first-child > div {
		padding-left: 0;
	}

	#bulletCarousel .carousel-item:last-child > div {
		padding-right: 0;
	}
}

/* The default control chevrons are white and vanish on the light page      */
/* background, so give them a filled blue circle to sit in (mobile view).    */
#bulletCarousel .carousel-control-prev,
#bulletCarousel .carousel-control-next {
	width: 3rem;
	align-items: center;
	opacity: 1;
}

#bulletCarousel .carousel-control-prev-icon,
#bulletCarousel .carousel-control-next-icon {
	width: 2.5rem;
	height: 2.5rem;
	background-color: var(--sb-blue);
	background-size: 1.25rem 1.25rem;
	border-radius: 50%;
}

/* Place the indicator dots below the slides (not overlaid) and give them */
/* the blue accent, since the defaults are white and overlap the content. */
#bulletCarousel .carousel-indicators {
	position: static;
	margin: 1rem 0 0;
}

#bulletCarousel .carousel-indicators [data-bs-target] {
	box-sizing: content-box;
	width: 10px;
	height: 10px;
	padding: 12px; /* transparent padding enlarges the tap target to ~34px for touch */
	border: 0; /* drop the default transparent top/bottom borders so it's round, not oval */
	border-radius: 50%;
	margin: 0 6px;
	background-color: var(--sb-blue);
	background-clip: content-box; /* keep the visible dot 10px; padding stays clickable but clear */
}

/**************************************************************************************************/
/* Stacked tables                                                                                 */
/**************************************************************************************************/

/* Add .table-stack to a wide table (GridView) that does not fit on a phone. Below   */
/* md each data row collapses into a labeled card, so the data reads top-to-bottom   */
/* instead of scrolling sideways inside a .table-responsive box. Every data cell     */
/* needs a data-label attribute holding its column header — for a GridView, call     */
/* UIHelpers.ApplyStackedTableSettings and ApplyStackedTableRowSettings.             */
/*                                                                                  */
/* /scripts/table.stack.js replaces that attribute with a .table-stack-label span so */
/* the label is real text rather than generated content; the ::before rule below is  */
/* the fallback for when the script has not run.                                     */

/* At every width, a long unbroken value (an email address, an account number) has to */
/* wrap rather than widen the table, because there is no .table-responsive box around */
/* it to scroll in.                                                                   */
.table-stack > tbody > tr > td {
	overflow-wrap: anywhere;
}

/* Same reason: .pagination is a nowrap flex row, and PageButtonCount is 10, so the  */
/* pager on its own is wider than a phone. Let it wrap onto multiple lines rather     */
/* than stretch the table (and the page) past the viewport.                           */
.table-stack .bs-pagination .pagination {
	flex-wrap: wrap;
	row-gap: 0.25rem;
}

/* In table view the header row does the labelling, so the per-cell label is hidden    */
/* (from assistive technology as well, which is why this is display: none).            */
.table-stack-label {
	display: none;
}

/* WCAG 2.5.8 asks for 24x24 CSS px pointer targets. The icon-only action links in     */
/* these grids are about 16px, so give the icon inside them a box to sit in. The box   */
/* grows right of the glyph (the default justify-content) rather than around it, so    */
/* the glyph still lines up with the column heading instead of sitting indented.       */
.table-stack td a > .bi {
	display: inline-flex;
	align-items: center;
	min-width: 1.75rem;
	min-height: 1.75rem;
}

@media (max-width: 767.98px) {
	.table-stack > thead {
		display: none; /* the per-cell labels replace the header row */
	}

	/* The GridView pager row (PagerStyle-CssClass="bs-pagination") is not data, so it stays a row. */
	.table-stack > tbody > tr:not(.bs-pagination) {
		display: block;
		overflow: hidden; /* keeps .table-striped's cell backgrounds inside the rounded corners */
		border: 1px solid var(--bs-border-color);
		border-radius: var(--sb-radius-sm);
		margin-bottom: 0.75rem;
	}

	.table-stack > tbody > tr:not(.bs-pagination) > td {
		display: flex;
		align-items: baseline;
		gap: 0.75rem;
		border: 0;
		padding: 0.4rem 0.75rem;
		text-align: left;
	}

	/* The label column is a fixed share of the card so the values line up down its left edge. */
	.table-stack > tbody > tr:not(.bs-pagination) > td > .table-stack-label,
	.table-stack > tbody > tr:not(.bs-pagination) > td[data-label]::before {
		display: block;
		flex: 0 0 40%;
		color: var(--sb-navy);
		font-weight: 600;
		overflow-wrap: break-word; /* labels are real words, so only break them as a last resort */
	}

	/* Fallback for when table.stack.js has not replaced the attribute with a real span. */
	.table-stack > tbody > tr:not(.bs-pagination) > td[data-label]::before {
		content: attr(data-label);
	}
}
