/*!
 * SEF Responsive – mobile/tablet layer for the partner dashboard
 * ---------------------------------------------------------------------------
 * DESKTOP (>= 1200px) IS NOT TOUCHED: every rule below is inside a max-width
 * media query. The elements created by sef-responsive.js (.sefr-*) are hidden
 * by the one rule outside a media query (just below) and are only shown inside
 * the mobile/tablet/phone media queries.
 *
 * Exception: section "HEADER LOGIN / SIGNUP" (end of file) is for the public
 * site header on every front-end page; its rules are scoped to body.sefr-site
 * and live inside max-width: 880px media queries.
 *
 * Scope: body.sefr-dashboard (added by sef-responsive-loader.php). The extra
 * class lets these rules beat the theme's inline <style> blocks, which are
 * printed inside <body> after this file. !important is used only where the
 * existing CSS already uses !important or an inline style attribute.
 *
 * Breakpoints
 *   <= 1199.98px  tablet landscape / small laptop – off-canvas sidebar
 *   <=  991.98px  tablet portrait
 *   <=  767.98px  phone
 *   <=  360px     small phone
 * ------------------------------------------------------------------------- */

/* Elements created by sef-responsive.js. The top bar and overlay do not exist
   on a page loaded at desktop width; this keeps them hidden if the window is
   widened back to desktop after being narrow. The "Back" button of the detail
   pages (.sefr-back) is created at every width but is shown on phones only. */
.sefr-topbar,
.sefr-overlay,
.sefr-back {
	display: none;
}

/* ==========================================================================
   1. APP SHELL – off-canvas sidebar, top bar, overlay  (<= 1199.98px)
   ========================================================================== */
@media (max-width: 1199.98px) {

	body.sefr-dashboard {
		--sefr-topbar-h: 60px;
		--sefr-gutter: 16px;
	}

	/* Safety net against any stray horizontal scroll */
	body.sefr-dashboard .dashboard-wrapper {
		overflow-x: clip;
	}
	/* The white page card clips its rounded corners with overflow:hidden, which
	   also turns it into a scroll container and breaks position:sticky inside
	   it. "clip" keeps the clipping without that side effect. */
	body.sefr-dashboard .main_content {
		overflow: clip;
	}

	/* ---- Top bar (injected by JS) ---- */
	body.sefr-dashboard .sefr-topbar {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		z-index: 1030;
		display: flex;
		align-items: center;
		gap: 12px;
		height: calc(var(--sefr-topbar-h) + env(safe-area-inset-top, 0px));
		padding: env(safe-area-inset-top, 0px) 16px 0;
		background: #ffffff;
		border-bottom: 1px solid #EAECF0;
		box-shadow: 0 1px 8px rgba(16, 24, 40, .06);
	}
	body.sefr-dashboard .sefr-burger,
	body.sefr-dashboard .sefr-me {
		flex: 0 0 auto;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		margin: 0;
		padding: 0 !important;
		border: 1px solid #EAECF0 !important;
		border-radius: 10px;
		background: #F9FAFB !important;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}
	body.sefr-dashboard .sefr-burger {
		flex-direction: column;
		gap: 4px;
	}
	body.sefr-dashboard .sefr-burger span {
		display: block;
		width: 18px;
		height: 2px;
		border-radius: 2px;
		background: #344054;
		transition: transform .25s ease, opacity .2s ease;
	}
	html.sefr-nav-open body.sefr-dashboard .sefr-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
	html.sefr-nav-open body.sefr-dashboard .sefr-burger span:nth-child(2) { opacity: 0; }
	html.sefr-nav-open body.sefr-dashboard .sefr-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
	body.sefr-dashboard .sefr-burger:focus-visible,
	body.sefr-dashboard .sefr-me:focus-visible {
		outline: 2px solid #3A58EF;
		outline-offset: 2px;
	}
	body.sefr-dashboard .sefr-brand {
		flex: 1 1 auto;
		min-width: 0;
		display: flex;
		align-items: center;
	}
	body.sefr-dashboard .sefr-brand img {
		display: block;
		height: 36px;
		width: auto;
		max-width: 100%;
	}
	body.sefr-dashboard .sefr-me {
		overflow: hidden;
		border-radius: 50%;
		padding: 0 !important;
	}
	body.sefr-dashboard .sefr-me img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	/* ---- Drawer ---- */
	body.sefr-dashboard .sidebar,
	body.sefr-dashboard .sidebar.collapsed {
		width: min(310px, 86vw) !important;
		height: 100vh;
		height: 100dvh;
		z-index: 1045;
		transform: translateX(-105%);
		visibility: hidden;
		transition: transform .3s cubic-bezier(.4, 0, .2, 1), visibility 0s linear .3s;
		box-shadow: none;
		padding-top: env(safe-area-inset-top, 0px);
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
	html.sefr-nav-open body.sefr-dashboard .sidebar {
		transform: translateX(0);
		visibility: visible;
		transition: transform .3s cubic-bezier(.4, 0, .2, 1), visibility 0s;
		box-shadow: 0 20px 48px rgba(16, 24, 40, .28);
	}
	body.sefr-dashboard .sidebar .nav-section {
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
	}
	/* The collapse icon becomes a close (X) icon inside the drawer */
	body.sefr-dashboard .sidebar .toggle-btn {
		position: relative;
		width: 36px;
		height: 36px;
		border-radius: 8px;
	}
	body.sefr-dashboard .sidebar .toggle-btn svg { display: none; }
	body.sefr-dashboard .sidebar .toggle-btn::before,
	body.sefr-dashboard .sidebar .toggle-btn::after {
		content: "";
		position: absolute;
		top: 50%;
		left: 50%;
		width: 18px;
		height: 2px;
		margin: -1px 0 0 -9px;
		border-radius: 2px;
		background: #475467;
	}
	body.sefr-dashboard .sidebar .toggle-btn::before { transform: rotate(45deg); }
	body.sefr-dashboard .sidebar .toggle-btn::after { transform: rotate(-45deg); }
	/* Tooltips are for the collapsed desktop rail only */
	body.sefr-dashboard .sidebar .tooltip,
	body.sefr-dashboard #tooltip { display: none !important; }

	/* ---- Overlay (injected by JS) ---- */
	body.sefr-dashboard .sefr-overlay {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 1044;
		background: rgba(16, 24, 40, .45);
		opacity: 0;
		visibility: hidden;
		transition: opacity .3s ease, visibility 0s linear .3s;
		-webkit-tap-highlight-color: transparent;
	}
	html.sefr-nav-open body.sefr-dashboard .sefr-overlay {
		opacity: 1;
		visibility: visible;
		transition: opacity .3s ease, visibility 0s;
	}
	html.sefr-nav-open,
	html.sefr-nav-open body.sefr-dashboard {
		overflow: hidden;
	}

	/* ---- Content column takes the full width ---- */
	body.sefr-dashboard .main-content,
	body.sefr-dashboard .sidebar.collapsed ~ .main-content,
	body.sefr-dashboard .sidebar ~ .main-content {
		margin-left: 0 !important;
		width: 100%;
		max-width: 100%;
		min-width: 0;
		padding: calc(var(--sefr-topbar-h) + env(safe-area-inset-top, 0px) + 16px) var(--sefr-gutter) 24px;
	}
}

/* Short screens (phone in landscape): header + profile + sign-out would leave
   only ~2 menu items visible, so the whole drawer scrolls as one instead. */
@media (max-width: 1199.98px) and (max-height: 520px) {
	body.sefr-dashboard .sidebar {
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
	}
	body.sefr-dashboard .sidebar > * {
		flex-shrink: 0;
	}
	body.sefr-dashboard .sidebar .nav-section {
		flex: 0 0 auto;
		overflow: visible;
	}
	body.sefr-dashboard .sidebar .sidebar-footer {
		padding-bottom: 12px;
	}
	body.sefr-dashboard .sidebar .sidebar-header {
		min-height: 52px;
		padding-top: 8px;
		padding-bottom: 8px;
	}
	body.sefr-dashboard .sidebar .user-profile {
		margin: 8px 12px;
		padding: 10px 12px;
	}
}

/* ==========================================================================
   2. SHARED PAGE PARTS – banner, title + search, filters, lists, pagination
   ========================================================================== */
@media (max-width: 1199.98px) {

	body.sefr-dashboard img,
	body.sefr-dashboard video,
	body.sefr-dashboard iframe {
		max-width: 100%;
	}

	/* Breadcrumb wraps instead of running off-screen */
	body.sefr-dashboard .main_content .breadcrumb {
		flex-wrap: wrap;
		row-gap: 4px;
	}

	/* Title row: title on the left, search + filter button on the right; wraps */
	body.sefr-dashboard .title_filter {
		flex-wrap: wrap;
		gap: 12px;
	}
	body.sefr-dashboard .title_filter .left_section {
		flex: 1 1 280px;
		min-width: 0;
	}
	body.sefr-dashboard .title_filter .right_filter_section {
		flex: 1 1 320px;
		min-width: 0;
		max-width: 100%;
		justify-content: flex-end;
	}
	body.sefr-dashboard .right_filter_section .searchbox {
		flex: 1 1 auto;
		min-width: 0;
		max-width: 420px;
	}
	body.sefr-dashboard .right_filter_section .searchbox input.form-control {
		width: 100% !important;
		max-width: 100%;
		min-width: 0;
	}

	/* Filters wrap in an even grid. new-dashboard.css forces
	   ".main_content .banner_content .filter_box { display:flex !important }",
	   so the grid needs the same weight here. */
	body.sefr-dashboard .main_content .banner_content .filter_box,
	body.sefr-dashboard .filter_box.active {
		display: grid !important;
		grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
		gap: 8px;
		align-items: stretch;
	}
	body.sefr-dashboard .filter_box .filter_select_box {
		width: auto !important;
		min-width: 0;
		max-width: none;
	}
	/* (Select2 keeps the real <select> visually hidden – leave that one alone) */
	body.sefr-dashboard .filter_box .filter_select_box select:not(.select2-hidden-accessible),
	body.sefr-dashboard .filter_box .filter_select_box .select2-container,
	body.sefr-dashboard .filter_box .filter_select_box input {
		width: 100% !important;
		max-width: 100%;
	}
	body.sefr-dashboard .filter_box .apply_clear_btn {
		grid-column: 1 / -1;
		flex-wrap: wrap;
	}

	/* Tables keep their columns and scroll inside their own box */
	body.sefr-dashboard .table-responsive {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		max-width: 100%;
	}
	body.sefr-dashboard .student_list_wrapper,
	body.sefr-dashboard .sit_list_wrapper {
		max-width: 100%;
		min-width: 0;
	}

	/* Pagination bar wraps */
	body.sefr-dashboard .pagination_main_bottom {
		flex-wrap: wrap;
		gap: 12px;
		row-gap: 12px;
	}
	body.sefr-dashboard .pagination_main_bottom .pagination-left {
		flex-wrap: wrap;
		gap: 8px 16px;
		min-width: 0;
	}
	body.sefr-dashboard .pagination_box,
	body.sefr-dashboard .pagination_box nav {
		max-width: 100%;
		min-width: 0;
	}
	body.sefr-dashboard .pagination_box .pagination {
		flex-wrap: wrap;
		gap: 4px;
	}

	/* Bootstrap modals never wider than the screen */
	body.sefr-dashboard .modal-dialog {
		max-width: min(var(--bs-modal-width, 500px), calc(100vw - 24px));
	}
	body.sefr-dashboard .modal-dialog.modal-lg,
	body.sefr-dashboard .modal-dialog.modal-xl,
	body.sefr-dashboard .contribution_modal .modal-dialog,
	body.sefr-dashboard .payment_info .modal-dialog {
		max-width: calc(100vw - 24px);
	}
}

@media (max-width: 767.98px) {

	body.sefr-dashboard {
		--sefr-gutter: 12px;
	}

	body.sefr-dashboard .main_content {
		border-radius: 12px;
	}
	body.sefr-dashboard .main_content .banner_content {
		padding: 16px 12px;
	}
	body.sefr-dashboard .main_inner_content {
		padding: 12px;
	}

	/* 16px text in form fields stops iOS Safari from zooming in on focus */
	body.sefr-dashboard .main-content input[type="text"],
	body.sefr-dashboard .main-content input[type="search"],
	body.sefr-dashboard .main-content input[type="email"],
	body.sefr-dashboard .main-content input[type="tel"],
	body.sefr-dashboard .main-content input[type="number"],
	body.sefr-dashboard .main-content input[type="date"],
	body.sefr-dashboard .main-content textarea,
	body.sefr-dashboard .modal input[type="text"],
	body.sefr-dashboard .modal input[type="email"],
	body.sefr-dashboard .modal input[type="tel"],
	body.sefr-dashboard .modal input[type="number"],
	body.sefr-dashboard .modal textarea,
	body.sefr-dashboard .select2-search__field,
	body.sefr-dashboard .main-content select:not(.select2-hidden-accessible),
	body.sefr-dashboard .modal select:not(.select2-hidden-accessible) {
		font-size: 16px !important;
	}

	/* Tighter vertical rhythm on phones (desktop uses 40px section paddings) */
	body.sefr-dashboard .main_content .top_title_section {
		padding-top: 12px;
		padding-bottom: 4px;
	}
	body.sefr-dashboard .main_content > section.total_number,
	body.sefr-dashboard .main_content section.total_number {
		padding-top: 16px;
		padding-bottom: 4px;
		margin-top: 0;
		margin-bottom: 4px;
	}
	body.sefr-dashboard .main_content section.total_number > .container {
		padding-left: 12px;
		padding-right: 12px;
	}
	body.sefr-dashboard .main_inner_content .student_list_main {
		padding-top: 8px;
		padding-bottom: 8px;
	}

	/* Page title */
	body.sefr-dashboard .title_filter .left_section h3 {
		font-size: 24px !important;
		line-height: 1.3 !important;
	}
	body.sefr-dashboard .main_content .banner_content .title_filter .left_section p {
		font-size: 14px;
	}

	/* Search takes the full row, filter button beside it */
	body.sefr-dashboard .title_filter .right_filter_section {
		flex: 1 1 100%;
		justify-content: stretch;
	}
	body.sefr-dashboard .right_filter_section .searchbox {
		max-width: none;
	}

	/* Filters: 2 per row, buttons full width */
	body.sefr-dashboard .main_content .banner_content .filter_box,
	body.sefr-dashboard .filter_box.active {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	body.sefr-dashboard .filter_box .apply_clear_btn .btn {
		flex: 1 1 0;
	}

	/* Tables – FALLBACK only. On phones sef-responsive.js turns every table
	   into cards (see section "TABLE CARDS" at the end of this file); these
	   rules only matter for the moment before that script has run.
	   Short columns stay on one line, the first (name) column wraps at a
	   readable width; the table scrolls sideways inside its box. */
	body.sefr-dashboard .student_list_table th,
	body.sefr-dashboard .student_list_table td,
	body.sefr-dashboard .se-table th,
	body.sefr-dashboard .se-table td {
		white-space: nowrap;
	}
	/* School-name column (first column) on the two school lists */
	body.sefr-dashboard.page-template-templatestemplate-schools-support-php .student_list_table td:first-child,
	body.sefr-dashboard.page-template-templatestemplate-computer-lab-support-php .student_list_table td:first-child {
		white-space: normal;
		min-width: 180px;
		max-width: 240px;
	}
	/* (The Student Impact Tracking table has its own sticky column widths –
	   only its long text columns are allowed to wrap.) */
	body.sefr-dashboard .se-table td:nth-child(3) {
		white-space: normal;
		min-width: 180px;
	}
	/* Student Impact Tracking: three sticky columns (checkbox, name, action)
	   would fill a phone screen, leaving no room to scroll the data. On phones
	   only the checkbox + a narrower name column stay pinned. */
	body.sefr-dashboard .se-table-box .se-table th.se-sticky-l2,
	body.sefr-dashboard .se-table-box .se-table td.se-sticky-l2 {
		white-space: normal;
		min-width: 118px;
		max-width: 136px;
		overflow-wrap: anywhere;
	}
	body.sefr-dashboard .se-table-box .se-table th.se-sticky-r1,
	body.sefr-dashboard .se-table-box .se-table td.se-sticky-r1 {
		position: static;
	}

	/* SIT table box: no fixed desktop height on phones */
	body.sefr-dashboard .se-table-box {
		min-height: 0;
	}

	/* Pagination stacks */
	body.sefr-dashboard .pagination_main_bottom {
		flex-direction: column;
		align-items: stretch;
	}
	body.sefr-dashboard .pagination_main_bottom .pagination-left {
		justify-content: space-between;
	}
	body.sefr-dashboard .pagination_box .pagination {
		justify-content: center;
	}

	/* Bootstrap modals: comfortable phone layout.
	   width (not only max-width) keeps the 8px screen margin even when a page
	   gives its modal a bigger max-width with an ID selector
	   (e.g. "#thankyouModal .modal-dialog { max-width: 600px }"). */
	body.sefr-dashboard .modal-dialog,
	body.sefr-dashboard .modal-dialog.modal-lg,
	body.sefr-dashboard .contribution_modal .modal-dialog,
	body.sefr-dashboard .payment_info .modal-dialog {
		width: calc(100% - 16px);
		max-width: calc(100vw - 16px);
		margin: 8px auto;
	}
	body.sefr-dashboard .modal-dialog-centered {
		min-height: calc(100% - 16px);
	}
	/* new-dashboard.css has "@media (max-width:640px) { .modal-content { width:95% } }",
	   which leaves the white box of page-level modals (Techlabs "Support",
	   student donation) narrower than its dialog and stuck to the left. */
	body.sefr-dashboard .modal-dialog > .modal-content {
		width: 100%;
	}
	body.sefr-dashboard .modal-header,
	body.sefr-dashboard .modal-body,
	body.sefr-dashboard .modal-footer {
		padding-left: 16px;
		padding-right: 16px;
	}
	body.sefr-dashboard .modal-footer {
		flex-wrap: wrap;
		gap: 8px;
	}
	body.sefr-dashboard .modal-footer > .btn,
	body.sefr-dashboard .modal-footer > button {
		flex: 1 1 140px;
		margin: 0;
	}
}

@media (max-width: 360px) {
	body.sefr-dashboard {
		--sefr-gutter: 8px;
	}
	body.sefr-dashboard .sefr-topbar {
		padding-left: 10px;
		padding-right: 10px;
		gap: 8px;
	}
	body.sefr-dashboard .sefr-brand img {
		height: 32px;
	}
	body.sefr-dashboard .main_content .banner_content .filter_box,
	body.sefr-dashboard .filter_box.active {
		grid-template-columns: 1fr;
	}
	body.sefr-dashboard .title_filter .left_section h3 {
		font-size: 22px !important;
	}
}

@media (max-width: 991.98px) {

	/* "Cancel / Proceed with selected students" bar (Aadhaar Vidhyarthi list):
	   pinned to the bottom of the screen while the list is in view.
	   The page shows/hides it with an inline display:block / none. */
	body.sefr-dashboard .table-action-buttons {
		position: sticky !important;
		bottom: 0 !important;
		right: auto !important;
		left: auto !important;
		float: none !important;
		clear: both;
		z-index: 20 !important;
		margin: 12px 0 0 !important;
		padding: 12px !important;
		gap: 8px;
		background: #ffffff;
		border: 1px solid #EAECF0;
		border-radius: 12px;
		box-shadow: 0 -6px 18px rgba(16, 24, 40, .10);
	}
	body.sefr-dashboard .table-action-buttons[style*="block"] {
		display: flex !important;
	}
	body.sefr-dashboard .table-action-buttons > button {
		margin: 0 !important;
		white-space: nowrap;
	}
	body.sefr-dashboard .table-action-buttons > button:last-child {
		flex: 1 1 auto;
		min-width: 0;
		white-space: normal;
		line-height: 1.25;
	}

	/* Same idea for the Student Impact Tracking selection bar */
	body.sefr-dashboard .sit_action_bar {
		position: sticky;
		bottom: 0;
		z-index: 20;
		gap: 10px;
		padding: 12px;
		margin-top: 8px;
		background: #ffffff;
		border: 1px solid #EAECF0;
		border-radius: 12px;
		box-shadow: 0 -6px 18px rgba(16, 24, 40, .10);
	}
	body.sefr-dashboard .sit_action_bar .sit_action_summary {
		flex: 1 1 100%;
		margin: 0;
	}
	body.sefr-dashboard .sit_action_bar .sit_action_btns {
		flex: 1 1 100%;
	}
	body.sefr-dashboard .sit_action_bar .sit_btn_proceed {
		flex: 1 1 auto;
		min-width: 0;
		white-space: normal;
		line-height: 1.25;
		padding-left: 12px;
		padding-right: 12px;
	}
}

@media (max-width: 767.98px) {

	/* Payment box used in the payment/support modals (QR | OR | bank details):
	   stacked, with a horizontal "OR" divider */
	body.sefr-dashboard .payment-card {
		flex-direction: column;
		align-items: stretch !important;
		gap: 12px;
		padding: 16px;
	}
	body.sefr-dashboard .payment-card .qr-section {
		min-width: 0;
		align-self: center;
	}
	body.sefr-dashboard .payment-card .or-divider,
	body.sefr-dashboard .payment-card .student-or-divider {
		align-self: stretch;
		min-height: 0;
		padding: 2px 0;
	}
	body.sefr-dashboard .payment-card .or-divider::before,
	body.sefr-dashboard .payment-card .student-or-divider::before {
		width: 100%;
		height: 1px;
		left: 0;
		top: 50%;
		margin: 0;
		transform: translateY(-50%);
	}
	body.sefr-dashboard .payment-card .or-divider span,
	body.sefr-dashboard .payment-card .student-or-divider span {
		padding: 0 10px;
	}
	body.sefr-dashboard .payment-card .bank-details {
		width: 100%;
		min-width: 0;
		overflow-wrap: anywhere;
	}
}

@media (max-width: 991.98px) {

	/* "You haven't made any contributions yet" empty state
	   (Aadhaar Vidyalay / Vidhyarthi Supported, Student Impact Tracking).
	   new-dashboard.css pulls the stat card up by -68px, which overlaps the
	   text once it wraps on narrower screens. */
	body.sefr-dashboard .no-contribution-section-wrapper {
		min-height: 0;
		padding: 32px 8px;
	}
	body.sefr-dashboard .no-contribution-section-wrapper .total_number {
		margin-top: 8px !important;
		padding: 16px 0 0 !important;
	}
	body.sefr-dashboard .no-contribution-section-wrapper .total_number_inner {
		max-width: 100%;
	}
}

@media (max-width: 767.98px) {
	body.sefr-dashboard .no-contribution-section-wrapper {
		padding: 20px 4px;
	}
	body.sefr-dashboard .no-contribution-section img {
		width: 150px;
		height: auto;
		margin-bottom: 12px;
	}
	body.sefr-dashboard .no-contribution-section h3 {
		font-size: 21px !important;
		line-height: 1.3 !important;
	}
	body.sefr-dashboard .no-contribution-section p {
		font-size: 14px;
	}
	body.sefr-dashboard .no-contribution-section-wrapper .total_number_inner .row > [class*="col-md-"] {
		flex: 0 0 100%;
		max-width: 100%;
		padding: 12px 4px;
		border-right: 0;
		border-bottom: 1px solid #EAECF0;
	}
	body.sefr-dashboard .no-contribution-section-wrapper .total_number_inner .row > [class*="col-md-"]:last-child {
		border-bottom: 0;
	}
}

/* ==========================================================================
   SIDEBAR MODALS  (template-parts/dashboard-sidebar.php – every page)
   "Support with a Direct Contribution": the "How it works" panel (min-width
   350px) and the form sit side by side; on phones they stack.
   ========================================================================== */
@media (max-width: 767.98px) {
	body.sefr-dashboard .contribution_modal .content-wrapper {
		flex-direction: column;
	}
	body.sefr-dashboard .contribution_modal .how-it-works {
		min-width: 0;
		width: 100%;
		padding: 18px 16px;
	}
	body.sefr-dashboard .contribution_modal .contribution-details {
		width: 100%;
		min-width: 0;
		padding: 18px 16px;
	}
	body.sefr-dashboard .contribution_modal .form-row {
		flex-wrap: wrap;
		gap: 12px;
	}
	body.sefr-dashboard .contribution_modal .form-row > * {
		flex: 1 1 100%;
		min-width: 0;
		max-width: 100%;
	}
	body.sefr-dashboard .contribution_modal .payment-options {
		flex-wrap: wrap;
		gap: 10px;
	}
	body.sefr-dashboard .contribution_modal .payment-options > * {
		flex: 1 1 140px;
		min-width: 0;
	}
	body.sefr-dashboard .contribution_modal .modal-body {
		overflow-x: hidden;
	}

	/* Disclaimer modal: the theme sets "#disclaimerModal .modal-dialog
	   { max-width: 600px }" (ID selector), so it needs an ID here too to keep
	   the same 8px screen margin as the other modals. */
	body.sefr-dashboard #disclaimerModal .modal-dialog {
		max-width: calc(100vw - 16px);
		margin: 8px auto;
	}
}

/* ==========================================================================
   AADHAAR SAATHIS  (templates/template-our-volunteer.php)
   The page has its own phone rules (one big card per row, ~400px tall each:
   a 90-card page was ~36,000px long on a phone). On phones two compact
   cards per row are shown instead (480–767px: bigger photos; < 480px:
   smaller photos), which cuts the page to about a third.
   ========================================================================== */
@media (max-width: 767.98px) {
	body.sefr-dashboard.page-template-templatestemplate-our-volunteer-php .student_list_main > .container > section {
		padding-top: 8px;
		padding-bottom: 8px;
		margin-bottom: 16px;
	}
	body.sefr-dashboard .Core_Volunteers_Main {
		padding-top: 12px;
		padding-bottom: 12px;
	}
	body.sefr-dashboard .Core_Volunteers_Main .volunteer_title {
		font-size: 21px;
		margin-bottom: 16px;
	}
	/* A PHP notice printed inside the card grid (seen locally with
	   display_errors on) leaves <br> items that take up grid cells. */
	body.sefr-dashboard .Core_Volunteers_Box .row.justify-content-center > br {
		display: none;
	}
}
@media (max-width: 767.98px) {
	body.sefr-dashboard .Core_Volunteers_Box .row.justify-content-center {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
		margin-left: 0;               /* Bootstrap .row gutters pushed the cards */
		margin-right: 0;              /* onto the page card's border */
		padding: 0 12px;
	}
	/* anything that is not a card (e.g. a PHP notice printed locally) takes a
	   full row instead of stretching the card columns */
	body.sefr-dashboard .Core_Volunteers_Box .row.justify-content-center > :not(.Core_Volunteers_Box1) {
		grid-column: 1 / -1;
		min-width: 0;
		max-width: 100%;
		overflow-x: auto;
	}
	/* LinkedIn icon: 18px image, 40px tap area */
	body.sefr-dashboard .Core_Volunteers_Box1 a.LinkedIn_Link {
		width: 40px;
		height: 40px;
		margin: -8px auto -10px;
		border-radius: 10px;
	}
	body.sefr-dashboard .Core_Volunteers_Box1 {
		max-width: none;
		padding: 24px 12px 18px;
	}
	body.sefr-dashboard .Core_Volunteers_Box1 .Upload_Image_Box {
		height: auto;
	}
	body.sefr-dashboard .Core_Volunteers_Box1 .Upload_Profile_Image {
		max-width: 150px;
		height: 150px;
	}
	body.sefr-dashboard .Core_Volunteers_Box1 .Upload_Profile_Image_Author {
		width: 110px;
		height: 110px !important;
	}
	body.sefr-dashboard .Core_Volunteers_Box1 .Upload_Image_Box::after {
		right: calc(50% - 82px);
	}
	body.sefr-dashboard .Core_Volunteers_Box1 h3 {
		font-size: 15px;
		overflow-wrap: anywhere;
	}
}
/* small phones: two cards per row with smaller photos */
@media (max-width: 479.98px) {
	body.sefr-dashboard .Core_Volunteers_Box .row.justify-content-center {
		gap: 10px;
		padding: 0 2px;
	}
	body.sefr-dashboard .Core_Volunteers_Box1 {
		margin: 0;
		padding: 18px 8px 12px;
		border-radius: 16px;
	}
	body.sefr-dashboard .Core_Volunteers_Box1 .Upload_Profile_Image {
		max-width: 116px;
		height: 116px;
	}
	body.sefr-dashboard .Core_Volunteers_Box1 .Upload_Profile_Image_Author {
		width: 84px;
		height: 84px !important;
		border-width: 3px;
	}
	body.sefr-dashboard .Core_Volunteers_Box1 .Upload_Image_Box::after {
		top: -4px;
		right: calc(50% - 62px);
		width: 24px;
		height: 24px;
	}
	body.sefr-dashboard .Core_Volunteers_Box1 h3 {
		margin: 10px 0 2px;
		font-size: 14px;
		line-height: 1.35;
	}
	body.sefr-dashboard .Core_Volunteers_Box1 p {
		margin: 0 0 8px;
		font-size: 13px;
		line-height: 1.4;
	}
}

/* ==========================================================================
   CONTACT US  (templates/template-contact-us.php)
   The page already stacks at 960px; on phones its three nested paddings
   (page card + .contactus_main + cards) leave the form ~235px wide.
   ========================================================================== */
@media (max-width: 767.98px) {
	body.sefr-dashboard .contactus_main {
		padding: 16px 0;
		min-height: 0;
	}
	body.sefr-dashboard .contactus_main .contact-layout {
		gap: 16px;
	}
	body.sefr-dashboard .contactus_main .contact-left,
	body.sefr-dashboard .contactus_main .info-card,
	body.sefr-dashboard .contactus_main .form-card {
		width: 100%;
		max-width: 100%;
	}
	body.sefr-dashboard .contactus_main .info-card,
	body.sefr-dashboard .contactus_main .form-card {
		padding: 20px 16px;
	}
}

/* ==========================================================================
   SCHOOL / STUDENT DETAIL  (template-school-details.php, template-student-details.php)
   The detail card is pulled up over the banner (-110px). On phones the banner
   holds the 40px "Back" button (the breadcrumb is hidden), so the card
   overlaps a little less and leaves room for it.
   ========================================================================== */
@media (max-width: 767.98px) {
	body.sefr-dashboard section.student_detail_main .student_detail_content {
		margin-top: -98px;
	}
	body.sefr-dashboard section.inner_banner .container,
	body.sefr-dashboard section.student_detail_main > .container {
		padding-left: 12px;
		padding-right: 12px;
	}
	body.sefr-dashboard .table-container {
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
}

/* ==========================================================================
   3. DASHBOARD  (templates/dashboard-template.php)
   ========================================================================== */
@media (max-width: 1199.98px) {

	/* Welcome banner: full-bleed inside the content column, flush under the top bar */
	body.sefr-dashboard #maincontent .dashboard_banner {
		margin-top: -16px;
		margin-left: calc(var(--sefr-gutter) * -1);
		margin-right: calc(var(--sefr-gutter) * -1);
	}
	body.sefr-dashboard #maincontent .dashboard_banner .container {
		padding-left: calc(var(--sefr-gutter) + 4px);
		padding-right: calc(var(--sefr-gutter) + 4px);
	}
	body.sefr-dashboard .dashboard_banner .row {
		row-gap: 16px;
	}
	body.sefr-dashboard .dashboard_banner .person_name {
		min-width: 0;
	}
	body.sefr-dashboard .dashboard_banner .person_name h3 {
		overflow-wrap: anywhere;
	}
	body.sefr-dashboard .select_annual_report,
	body.sefr-dashboard .annual_report {
		flex-wrap: wrap;
	}

	/* "Need support" stat strip */
	body.sefr-dashboard .total_number_inner {
		padding: 20px 16px;
	}
	body.sefr-dashboard .total_number_inner .col-md-4 {
		padding: 0 16px;
	}
	body.sefr-dashboard .total_number_content {
		gap: 14px;
		padding-right: 28px;
	}
	body.sefr-dashboard .total_number_box {
		min-width: 0;
	}
	body.sefr-dashboard .total_number_box h2 {
		font-size: 28px !important;
	}
	body.sefr-dashboard .total_number_box p {
		font-size: 15px;
	}

	/* Student slider heading */
	body.sefr-dashboard .studentbox_main .title_box {
		flex-wrap: wrap;
		gap: 8px;
	}

	/* Tax-benefit card */
	body.sefr-dashboard .info-banner-card .info-banner-left {
		flex: 1 1 320px;
	}
}

@media (max-width: 991.98px) {

	/* Banner: welcome text on top, annual report below */
	body.sefr-dashboard .dashboard_banner {
		padding-bottom: 40px !important;
	}
	body.sefr-dashboard .dashboard_banner .person_name_image,
	body.sefr-dashboard .dashboard_banner .person_name_image + .col-md-6,
	body.sefr-dashboard .dashboard_banner .row > .col-md-6 {
		flex: 0 0 100%;
		max-width: 100%;
		width: 100%;
	}
	body.sefr-dashboard .select_annual_report,
	body.sefr-dashboard .annual_report {
		justify-content: flex-start;
	}

	/* My contributions + student slider stack */
	body.sefr-dashboard #my-contributions,
	body.sefr-dashboard #studentbox_main {
		flex: 0 0 100%;
		max-width: 100%;
		width: 100%;
	}
	body.sefr-dashboard .my-contributions {
		height: auto;
	}
	body.sefr-dashboard .studentbox_main .title_box {
		padding-right: 88px;
	}
}

@media (max-width: 767.98px) {

	body.sefr-dashboard .dashboard_banner {
		padding: 12px 0 28px !important;
		background-size: 200px auto !important;
	}
	body.sefr-dashboard .banner_main_title {
		margin-bottom: 16px;
	}
	/* Banner content lines up with the cards below it */
	body.sefr-dashboard #maincontent .dashboard_banner .row {
		margin-left: 0;
		margin-right: 0;
	}
	body.sefr-dashboard #maincontent .dashboard_banner .row > [class*="col-"] {
		padding-left: 0;
		padding-right: 0;
	}
	body.sefr-dashboard .dashboard_banner .person_name_image {
		gap: 12px;
	}
	body.sefr-dashboard .person_name_image .person_image_icon {
		width: 56px;
		height: 56px;
		flex: 0 0 56px;
	}
	body.sefr-dashboard .person_name_image .person_image_icon img {
		width: 56px !important;
		height: 56px !important;
		object-fit: cover;
	}
	body.sefr-dashboard .person_name h3 {
		font-size: 22px !important;
		line-height: 1.3 !important;
	}
	body.sefr-dashboard .annual_report {
		gap: 10px;
	}
	body.sefr-dashboard .annual_report p {
		flex: 1 1 100%;
		margin: 0;
		font-size: 14px;
	}

	body.sefr-dashboard .total_number {
		padding-bottom: 8px;
		margin-bottom: 16px;
	}

	/* Stat strip: one card per row, dividers become separators */
	body.sefr-dashboard .total_number_inner .row {
		row-gap: 0;
	}
	body.sefr-dashboard .total_number_inner .col-md-4 {
		flex: 0 0 100%;
		max-width: 100%;
		padding: 14px 4px;
		border-right: 0;
		border-bottom: 1px solid #EAECF0;
	}
	body.sefr-dashboard .total_number_inner .row > .col-md-4:last-child {
		border-bottom: 0;
	}
	body.sefr-dashboard .total_number_content {
		align-items: center;
	}

	/* Direct contribution box */
	body.sefr-dashboard .direct-contribution {
		padding: 16px;
		margin-bottom: 16px;
	}
	body.sefr-dashboard .left_column.col-md-6 .direct-contribution {
		min-height: 0;
	}
	body.sefr-dashboard .left_column.col-md-6 .direct-contribution .donate-btn {
		position: static;
		margin-bottom: 0;
	}
	body.sefr-dashboard .direct-contribution .donate-btn {
		width: 100%;
		justify-content: center;
		padding: 10px 16px;
	}

	/* Info banner under it */
	body.sefr-dashboard .info-banner {
		flex-wrap: wrap;
		align-items: flex-start;
	}
	body.sefr-dashboard .info-banner .info-text {
		flex: 1 1 calc(100% - 40px);
		min-width: 0;
	}

	/* My contributions */
	body.sefr-dashboard .my-contributions {
		padding: 16px;
	}
	body.sefr-dashboard .my-contributions .total-card {
		margin-bottom: 20px;
	}
	body.sefr-dashboard .my-contributions .stat-item {
		padding: 0 8px;
	}
	body.sefr-dashboard .my-contributions .stat-number,
	body.sefr-dashboard .my-contributions .total-amount {
		font-size: 28px;
	}
	body.sefr-dashboard .my-contributions .stat-label {
		font-size: 14px;
	}

	/* Student slider */
	body.sefr-dashboard .studentbox_main {
		padding: 12px;
	}
	body.sefr-dashboard .studentbox_main .title_box {
		padding-right: 84px;
		align-items: flex-start;
	}
	body.sefr-dashboard .studentbox_main .title_box h3 {
		font-size: 17px;
	}
	body.sefr-dashboard .studentbox_main .title_box .title_box_leftcontent p {
		font-size: 14px;
	}

	/* Tax-benefit card: text then full-width button */
	body.sefr-dashboard .info-banner-card {
		padding: 14px;
	}
	body.sefr-dashboard .info-banner-card .info-banner-left {
		flex: 1 1 100%;
	}
	body.sefr-dashboard .info-banner-card .info-banner-btn {
		width: 100%;
		justify-content: center;
	}

	/* Video / testimonial / achievements */
	body.sefr-dashboard .video_sldiermain {
		padding: 12px;
		margin-bottom: 20px;
	}
	body.sefr-dashboard .testimonial-slider .slick-list {
		margin: 0 !important;
	}
	body.sefr-dashboard .testimonial-card {
		margin: 0 4px;
		min-height: 0;
	}
	body.sefr-dashboard .social-eye-achievements {
		padding: 16px;
	}
}


/* ==========================================================================
   TABLE CARDS  (phones only, <= 767px)
   --------------------------------------------------------------------------
   Every table.table on the dashboard pages (plus the Student Impact
   Tracking table.se-table) is shown as one card per row on phones.

   The table HTML is NOT changed. sef-responsive.js (section "TABLE CARDS")
   only adds, while the screen is phone-sized:
     table            .sefr-cards        (+ .sefr-no-sort when nothing sorts)
     scroll wrapper   .sefr-cards-host   (.table-responsive / .table-container / .se-table-scroll)
     SIT outer box    .sefr-cards-box    (.se-table-box)
     <th>             .sefr-th-sort      sortable heading  -> "Sort by" chip
                      .sefr-th-check     select-all heading -> "Select all" chip
     <tr>             .sefr-row-empty    "No records / Loading…" row
     <td>             data-label="<heading text>"  (shown with ::before)
                      .sefr-cell-title   the Name column -> card title
                      .sefr-cell-check   row checkbox    -> top-right corner
                      .sefr-cell-action  Action column   -> buttons at the bottom
                      .sefr-cell-empty   the single cell of an empty row
     <a> in Action    .sefr-icon-link    icon-only link (eye / download)

   Sticky cells: the Student Impact Tracking table pins its checkbox, name and
   Action columns with position:sticky (+ left/right offsets, borders and
   backgrounds). Inside a card nothing scrolls sideways, so every th/td is
   reset to position:static with no offsets – otherwise they would keep
   their sticky offsets and overlap inside the card.
   ========================================================================== */
@media (max-width: 767.98px) {

	/* ---- Wrappers: no sideways scroll, no table frame around the cards ---- */
	body.sefr-dashboard .sefr-cards-host {
		overflow: visible !important;
		max-width: 100%;
		border: 0 !important;
		background: transparent !important;
		box-shadow: none !important;
	}
	body.sefr-dashboard .sefr-cards-box {
		border: 0 !important;
		border-radius: 0 !important;
		background: transparent !important;
		overflow: visible !important;
		min-height: 0 !important;
	}

	/* ---- table / tbody become plain blocks ---- */
	body.sefr-dashboard table.sefr-cards,
	body.sefr-dashboard table.sefr-cards > tbody {
		display: block;
		width: 100% !important;
		min-width: 0 !important;      /* SIT table has min-width:1405px on desktop */
		max-width: 100% !important;
		margin: 0 !important;
		border: 0 !important;
		background: transparent !important;
		table-layout: auto !important;
	}
	body.sefr-dashboard table.sefr-cards > colgroup {
		display: none;                /* desktop column widths do not apply to cards */
	}

	/* ---- Heading row -> horizontal "Sort by" chip bar ---- */
	body.sefr-dashboard table.sefr-cards > thead {
		display: block;
		margin: 0 0 12px;
		background: transparent !important;
	}
	body.sefr-dashboard table.sefr-cards.sefr-no-sort > thead {
		display: none;                /* no sortable column: headings are only labels now */
	}
	body.sefr-dashboard table.sefr-cards > thead > tr {
		display: flex;
		align-items: center;
		gap: 8px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding: 2px 1px 4px;
		background: transparent !important;
	}
	body.sefr-dashboard table.sefr-cards > thead > tr::-webkit-scrollbar {
		display: none;
	}
	body.sefr-dashboard table.sefr-cards > thead > tr::before {
		content: "Sort by";
		flex: 0 0 auto;
		font-size: 12px;
		font-weight: 500;
		color: #667085;
	}
	body.sefr-dashboard table.sefr-cards > thead > tr > th {
		display: none;                /* plain headings (Action, empty) are hidden */
	}
	body.sefr-dashboard table.sefr-cards > thead > tr > th.sefr-th-sort,
	body.sefr-dashboard table.sefr-cards > thead > tr > th.sefr-th-check {
		display: inline-flex;
		align-items: center;
		gap: 4px;
		flex: 0 0 auto;
		/* sticky reset (SIT) */
		position: static !important;
		left: auto !important;
		right: auto !important;
		width: auto !important;
		min-width: 0 !important;
		max-width: none !important;
		height: auto !important;
		margin: 0 !important;
		padding: 6px 12px !important;
		border: 1px solid #D0D5DD !important;
		border-radius: 999px !important;
		background: #ffffff !important;
		box-shadow: none !important;
		color: #344054 !important;
		font-size: 12px !important;
		font-weight: 500 !important;
		line-height: 1.3 !important;
		letter-spacing: 0 !important;
		text-transform: none !important;
		white-space: nowrap !important;
		cursor: pointer;
		user-select: none;
	}
	body.sefr-dashboard table.sefr-cards > thead > tr > th.sefr-th-check::after {
		content: "Select all";
	}
	body.sefr-dashboard table.sefr-cards > thead > tr > th.sefr-th-check input {
		margin: 0;
	}
	/* The column that is currently sorted */
	body.sefr-dashboard table.sefr-cards > thead > tr > th.sort-asc,
	body.sefr-dashboard table.sefr-cards > thead > tr > th.sort-desc,
	body.sefr-dashboard table.sefr-cards > thead > tr > th.sefr-th-sorted {
		border-color: #3A58EF !important;
		background: #EEF1FF !important;
		color: #3A58EF !important;
	}

	/* ---- Each row is a card ---- */
	body.sefr-dashboard table.sefr-cards > tbody > tr {
		display: flex;
		flex-direction: column;       /* lets the title / action cells be re-ordered */
		position: relative;           /* anchor for the checkbox corner */
		margin: 0 0 12px;
		padding: 12px 14px 6px;
		background: #ffffff !important;
		border: 1px solid #EAECF0 !important;
		border-radius: 12px;
		box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
	}
	body.sefr-dashboard table.sefr-cards > tbody > tr:last-child {
		margin-bottom: 4px;
	}
	/* Selected row (SIT: tr.se-row-on, Vidhyarthi list: checked checkbox) */
	body.sefr-dashboard table.sefr-cards > tbody > tr.se-row-on,
	body.sefr-dashboard table.sefr-cards > tbody > tr:has(.custom-checkbox.checked),
	body.sefr-dashboard table.sefr-cards > tbody > tr:has(input[type="checkbox"]:checked) {
		background: #F5F7FF !important;
		border-color: #3A58EF !important;
		box-shadow: 0 0 0 1px #3A58EF;
	}

	/* ---- Every cell: "label ........ value" line ---- */
	body.sefr-dashboard table.sefr-cards > tbody > tr > td {
		display: flex;
		align-items: flex-start;
		justify-content: space-between;
		gap: 12px;
		/* sticky reset – SIT pins td.se-sticky-l1 / l2 / r1 with left/right offsets */
		position: static !important;
		left: auto !important;
		right: auto !important;
		z-index: auto !important;
		width: auto !important;
		min-width: 0 !important;
		max-width: none !important;
		height: auto !important;
		margin: 0 !important;
		padding: 8px 0 !important;
		border: 0 !important;
		border-bottom: 1px dashed #EAECF0 !important;
		background: transparent !important;
		box-shadow: none !important;
		text-align: right !important;
		vertical-align: top;
		white-space: normal !important;
		overflow: visible !important;
		overflow-wrap: anywhere;
		font-size: 14px;
		line-height: 1.45;
		color: #1D2939;
	}
	body.sefr-dashboard table.sefr-cards > tbody > tr > td::before {
		content: attr(data-label);
		flex: 0 0 42%;
		max-width: 42%;
		margin-right: auto;           /* label left; value (+ any icon after it) together on the right */
		text-align: left;
		font-size: 12px;
		font-weight: 500;
		line-height: 1.6;
		color: #667085;
		text-transform: none;
		letter-spacing: 0;
		white-space: normal;
	}
	/* Cells without a heading show only their value */
	body.sefr-dashboard table.sefr-cards > tbody > tr > td[data-label=""]::before,
	body.sefr-dashboard table.sefr-cards > tbody > tr > td:not([data-label])::before {
		content: none;
		display: none;
	}
	body.sefr-dashboard table.sefr-cards > tbody > tr > td:last-child {
		border-bottom: 0 !important;
	}
	/* Inline helpers inside cells (name + verified tick, badges) keep their own look */
	body.sefr-dashboard table.sefr-cards > tbody > tr > td > * {
		max-width: 100%;
	}

	/* ---- Card title (the Name column) ---- */
	body.sefr-dashboard table.sefr-cards > tbody > tr > td.sefr-cell-title {
		order: -1;
		justify-content: flex-start;
		text-align: left !important;
		padding: 2px 0 10px !important;
		margin-bottom: 2px !important;
		border-bottom: 1px solid #EAECF0 !important;
		font-size: 15px;
		font-weight: 600;
		color: #101828;
	}
	body.sefr-dashboard table.sefr-cards > tbody > tr > td.sefr-cell-title::before {
		content: none;
		display: none;
	}
	/* room for the checkbox in the corner */
	body.sefr-dashboard table.sefr-cards > tbody > tr.sefr-has-check > td.sefr-cell-title {
		padding-right: 40px !important;
	}

	/* ---- Row checkbox -> top-right corner of the card ---- */
	body.sefr-dashboard table.sefr-cards > tbody > tr > td.sefr-cell-check {
		position: absolute !important;
		top: 12px;
		right: 12px !important;
		left: auto !important;
		width: auto !important;
		padding: 0 !important;
		border: 0 !important;
		z-index: 2 !important;
	}
	body.sefr-dashboard table.sefr-cards > tbody > tr > td.sefr-cell-check::before {
		content: none;
		display: none;
	}
	body.sefr-dashboard table.sefr-cards > tbody > tr > td.sefr-cell-check:empty {
		display: none;                /* rows that cannot be selected have no checkbox */
	}

	/* ---- Action column -> buttons along the bottom of the card ---- */
	body.sefr-dashboard table.sefr-cards > tbody > tr > td.sefr-cell-action {
		order: 99;
		justify-content: flex-end;
		align-items: center;
		flex-wrap: wrap;
		gap: 8px;
		padding: 12px 0 8px !important;
		border-bottom: 0 !important;
	}
	body.sefr-dashboard table.sefr-cards > tbody > tr > td.sefr-cell-action::before {
		content: none;
		display: none;
	}
	body.sefr-dashboard table.sefr-cards > tbody > tr > td.sefr-cell-action a {
		flex: 1 1 100%;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 6px;
		min-height: 40px;
		padding: 8px 14px !important;
		border: 1px solid #3A58EF !important;
		border-radius: 8px !important;
		background: #ffffff !important;
		color: #3A58EF !important;
		font-size: 14px !important;
		font-weight: 500 !important;
		text-decoration: none !important;
		line-height: 1.2;
	}
	body.sefr-dashboard table.sefr-cards > tbody > tr > td.sefr-cell-action a:active {
		background: #EEF1FF !important;
	}
	/* icon-only links (eye / download) are square buttons side by side */
	body.sefr-dashboard table.sefr-cards > tbody > tr > td.sefr-cell-action a.sefr-icon-link {
		flex: 0 0 44px;
		width: 44px;
		min-height: 44px;
		padding: 0 !important;
	}
	body.sefr-dashboard table.sefr-cards > tbody > tr > td.sefr-cell-action a.sefr-icon-link img {
		width: 20px;
		height: 20px;
	}

	/* ---- "No records" / "Loading…" row ---- */
	body.sefr-dashboard table.sefr-cards > tbody > tr.sefr-row-empty {
		padding: 28px 16px;
		border-style: dashed !important;
		box-shadow: none;
		align-items: center;
	}
	body.sefr-dashboard table.sefr-cards > tbody > tr > td.sefr-cell-empty {
		display: block;
		width: 100% !important;
		padding: 0 !important;
		border: 0 !important;
		text-align: center !important;
		color: #667085;
	}
	body.sefr-dashboard table.sefr-cards > tbody > tr > td.sefr-cell-empty::before {
		content: none;
		display: none;
	}
}

/* ==========================================================================
   BREADCRUMB + BACK BUTTON  (phones only, <= 767px)
   - The breadcrumb is hidden on phones on every dashboard page (the page
     title right below it already says where you are). Tablet and desktop
     keep the breadcrumb.
   - On the school / student detail pages sef-responsive.js (section
     "BACK BUTTON") adds an <a class="sefr-back"> where the breadcrumb was.
     It takes the visitor back to the page they came from. No template is
     changed.
   ========================================================================== */
@media (max-width: 767.98px) {

	body.sefr-dashboard .main_content nav[aria-label="breadcrumb"],
	body.sefr-dashboard .main_content ol.breadcrumb {
		display: none !important;
	}

	/* "Back" pill – top-left of the detail banner */
	body.sefr-dashboard .sefr-back {
		position: relative;
		z-index: 1;
		display: inline-flex;
		align-items: center;
		gap: 6px;
		height: 40px;
		padding: 0 16px 0 10px;
		border: 1px solid #DDDDDD;
		border-radius: 999px;
		background: rgba(255, 255, 255, 0.92);
		box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
		color: #344054 !important;
		font-family: "Reddit Sans", sans-serif;
		font-size: 15px;
		font-weight: 500;
		line-height: 1;
		text-decoration: none !important;
		-webkit-tap-highlight-color: transparent;
	}
	body.sefr-dashboard .sefr-back svg {
		flex: 0 0 20px;
		width: 20px;
		height: 20px;
	}
	body.sefr-dashboard .sefr-back:hover,
	body.sefr-dashboard .sefr-back:active {
		background: #FFFFFF;
		border-color: #C9CFDA;
		color: #3A58EF !important;
	}
	body.sefr-dashboard .sefr-back:focus-visible {
		outline: 2px solid #3A58EF;
		outline-offset: 2px;
	}
}

/* ==========================================================================
   RIGHT-SIDE OFFCANVAS PANELS  (phones only, <= 767px)
   Panels that slide in from the right (.offcanvas-end) on the dashboard pages:
     A. .selected_student  #selectedStudentOffcanvas – "Review Your Selected
        Students" (Aadhaar Vidhyarthi Platform, Student Impact Tracking,
        Dashboard > saved payments). template-parts/scholarship-payment-components.php
     B. .school-offcanvas – school details from Aadhaar Techlabs > View.
        templates/template-computer-lab-support.php
     C. .verifybymain  #verifyby – "Verified by" volunteer panel on the student
        detail page. templates/template-student-details.php
   On desktop/tablet they are 400–620px wide; on a phone they were already
   full width but kept desktop paddings, a 32px close button and side-by-side
   rows that squeeze or overflow (A's "View Bank Details" button ran 19px off
   the screen). On phones each panel now opens as a full app screen:
   a header with the title and a 44px close button, a scrolling body, and the
   main action(s) pinned to the bottom. Markup and scripts are not changed.
   ========================================================================== */
@media (max-width: 767.98px) {

	/* ---- shared ---- */
	body.sefr-dashboard .offcanvas.offcanvas-end {
		width: 100% !important;
		max-width: 100%;
		border-left: 0;
		box-shadow: none;
	}
	body.sefr-dashboard .offcanvas.offcanvas-end .offcanvas-body {
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
	}

	/* ---- A. Review Your Selected Students ---- */
	body.sefr-dashboard .selected_student .offcanvas-header {
		flex: 0 0 auto;
		padding: 12px 12px 12px 16px;
		border-bottom: 1px solid #EAECF0;
	}
	body.sefr-dashboard .selected_student .header-top {
		align-items: center;
		gap: 12px;
		margin-bottom: 4px;
	}
	body.sefr-dashboard .selected_student .offcanvas-title {
		font-size: 20px;
		line-height: 1.3;
	}
	body.sefr-dashboard .selected_student .btn-close {
		flex: 0 0 44px;
		width: 44px;
		height: 44px;
		border-radius: 10px;
		background-size: 12px;
	}
	body.sefr-dashboard .selected_student .offcanvas-subtitle {
		padding-right: 56px;
		font-size: 13px;
		line-height: 1.45;
	}
	/* body = scrolling list + amount + buttons pinned at the bottom */
	body.sefr-dashboard .selected_student .offcanvas-body {
		padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
		overflow: hidden;
	}
	body.sefr-dashboard .selected_student .schools-container {
		min-height: 0;
		margin: 0 -16px;
		padding: 0 16px;
	}
	body.sefr-dashboard .selected_student .school-card {
		padding: 14px;
		margin-bottom: 12px;
	}
	body.sefr-dashboard .selected_student .school-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
		padding-bottom: 12px;
		margin-bottom: 4px;
	}
	body.sefr-dashboard .selected_student .school-name {
		font-size: 16px;
		line-height: 1.35;
		overflow-wrap: anywhere;
	}
	body.sefr-dashboard .selected_student .school-total {
		font-size: 13px;
	}
	/* student row: avatar | name + amount (2 lines) | remove */
	body.sefr-dashboard .selected_student .student-item {
		display: grid;
		grid-template-columns: 40px minmax(0, 1fr) 40px;
		grid-template-areas:
			"avatar name   remove"
			"avatar amount remove";
		column-gap: 12px;
		row-gap: 6px;
		align-items: center;
		padding: 12px 0;
	}
	body.sefr-dashboard .selected_student .student-item:last-child {
		border-bottom: 0;
	}
	body.sefr-dashboard .selected_student .student-item:hover {
		background: transparent;
	}
	body.sefr-dashboard .selected_student .student-avatar {
		grid-area: avatar;
		width: 40px;
		height: 40px;
	}
	body.sefr-dashboard .selected_student .student-info {
		grid-area: name;
		min-width: 0;
		gap: 6px;
	}
	body.sefr-dashboard .selected_student .student-name {
		min-width: 0;
		font-size: 15px;
		line-height: 1.35;
		overflow-wrap: anywhere;
	}
	body.sefr-dashboard .selected_student .student-amount-editable {
		grid-area: amount;
		justify-self: start;
		margin-left: 0;
		gap: 6px;
	}
	/* 16px text: iOS does not zoom into the field on focus */
	body.sefr-dashboard .selected_student .student-amount-editable .amount-input {
		width: 140px;
		height: 40px;
		padding: 6px 10px;
		font-size: 16px;
	}
	body.sefr-dashboard .selected_student .remove-btn {
		grid-area: remove;
		justify-self: end;
		width: 40px;
		height: 40px;
		padding: 0;
		border-radius: 10px;
	}
	body.sefr-dashboard .selected_student .remove-btn:active {
		background: #FEF3F2;
	}
	body.sefr-dashboard .selected_student .final-amount {
		flex: 0 0 auto;
		margin: 12px 0 0;
		padding: 12px 16px !important; /* new-dashboard.css sets it with !important */
	}
	body.sefr-dashboard .selected_student .footer-section {
		flex: 0 0 auto;
		align-items: stretch;         /* both buttons the same height */
		gap: 10px;
		padding-top: 12px;
		border-top: 0;
	}
	body.sefr-dashboard .selected_student .footer-section > .btn,
	body.sefr-dashboard .selected_student .footer-section > button {
		flex: 1 1 0;
		min-width: 0;
		min-height: 48px;
		padding: 10px 8px !important; /* new-dashboard.css: .btn-proceed padding/size !important */
		font-size: 14px !important;
		line-height: 1.25;
		white-space: normal;          /* wraps only on very narrow phones */
	}

	/* ---- B. Aadhaar Techlabs – school details ----
	   Layout as a grid: [title | close] / verified row / scrolling body /
	   "Support" button pinned at the bottom. The header wrapper is turned into
	   "display: contents" so its two children (verified row, Support button)
	   can be placed in different rows; the elements themselves are unchanged. */
	body.sefr-dashboard .school-offcanvas.offcanvas {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-rows: auto auto minmax(0, 1fr) auto;
		padding: 0;
	}
	body.sefr-dashboard .school-offcanvas > .close_button_div {
		grid-column: 2;
		grid-row: 1;
		margin: 0;
		padding: 10px 10px 0 0;
	}
	body.sefr-dashboard .school-offcanvas .btn_close {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		border-radius: 10px;
		background: transparent;
	}
	body.sefr-dashboard .school-offcanvas .btn_close svg {
		width: 28px;
		height: 28px;
	}
	body.sefr-dashboard .school-offcanvas > .school-title {
		grid-column: 1;
		grid-row: 1;
		align-self: center;
		margin: 0;
		padding: 14px 0 4px 16px;
		font-size: 20px;
		line-height: 1.3;
		overflow-wrap: anywhere;
	}
	body.sefr-dashboard .school-offcanvas > .offcanvas-header {
		display: contents;
	}
	body.sefr-dashboard .school-offcanvas > .offcanvas-header > div {
		grid-column: 1 / -1;
		grid-row: 2;
		padding: 0 16px 12px;
		border-bottom: 1px solid #EAECF0;
	}
	body.sefr-dashboard .school-offcanvas > .offcanvas-header > .button {
		grid-column: 1 / -1;
		grid-row: 4;
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 48px;
		margin: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
	}
	body.sefr-dashboard .school-offcanvas > .offcanvas-body {
		grid-column: 1 / -1;
		grid-row: 3;
		min-height: 0;
		padding: 16px;
		border-bottom: 1px solid #EAECF0;
	}
	body.sefr-dashboard .school-offcanvas .computer-card {
		gap: 12px;
		margin: 0 0 24px;
	}
	body.sefr-dashboard .school-offcanvas .computer-left {
		min-width: 0;
	}
	body.sefr-dashboard .school-offcanvas .computer-icon {
		flex: 0 0 auto;
	}
	body.sefr-dashboard .school-offcanvas .offcanvas-body .section {
		margin-bottom: 24px;
	}
	body.sefr-dashboard .school-offcanvas .contribution-row {
		gap: 12px;
	}
	body.sefr-dashboard .school-offcanvas .contribution-row > *:last-child {
		flex: 0 0 auto;
		white-space: nowrap;
	}
	body.sefr-dashboard .school-offcanvas .contact-body {
		align-items: flex-start;
	}
	body.sefr-dashboard .school-offcanvas .contact-body > div {
		min-width: 0;
	}
	/* round placeholder; a missing photo no longer spills its alt text */
	body.sefr-dashboard .school-offcanvas .contact-img {
		flex: 0 0 48px;
		overflow: hidden;
		background: #DDE3F0;
		color: transparent;
		font-size: 0;
	}
	body.sefr-dashboard .school-offcanvas .contact-details {
		line-height: 1.8;
		overflow-wrap: anywhere;
	}
	body.sefr-dashboard .school-offcanvas .contact-details img {
		width: 16px;
		height: 16px;
		margin-right: 2px;
		vertical-align: -3px;
	}

	/* ---- C. Verified by (student detail) ---- */
	body.sefr-dashboard .verifybymain .offcanvas-header {
		justify-content: space-between;
		align-items: center;
		gap: 12px;
		min-height: 60px;
		padding: 8px 8px 8px 16px;
		border-bottom: 1px solid #EAECF0;
	}
	/* panel title (the header had only the close button) */
	body.sefr-dashboard .verifybymain .offcanvas-header::before {
		content: "Verified by";
		color: #101828;
		font-family: "Reddit Sans", sans-serif;
		font-size: 18px;
		font-weight: 600;
		line-height: 1.3;
	}
	body.sefr-dashboard .verifybymain .offcanvas-header button {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border-radius: 10px;
	}
	body.sefr-dashboard .verifybymain .offcanvas-header button svg {
		width: 28px;
		height: 28px;
	}
	body.sefr-dashboard .verifybymain .offcanvas-body {
		padding: 20px 16px calc(24px + env(safe-area-inset-bottom, 0px));
	}
	body.sefr-dashboard .verifybymain .city_name_box {
		gap: 14px;
		margin-bottom: 20px;
	}
	body.sefr-dashboard .verifybymain .img_icon {
		flex: 0 0 64px;
		width: 64px;
		height: 64px;
		background: #EAECFE;
	}
	/* round placeholder; a missing photo no longer spills its alt text */
	body.sefr-dashboard .verifybymain .img_icon img {
		display: block;
		width: 100%;
		height: 100%;
		max-width: 100%;
		object-fit: cover;
		color: transparent;
		font-size: 0;
	}
	body.sefr-dashboard .verifybymain .name_content {
		min-width: 0;
	}
	body.sefr-dashboard .verifybymain .name_icon h4 {
		margin: 0;
		font-size: 20px;
		line-height: 1.3;
		overflow-wrap: anywhere;
	}
	body.sefr-dashboard .verifybymain .about_info {
		padding-top: 20px;
		margin-top: 20px;
	}
	body.sefr-dashboard .verifybymain .about_info p {
		font-size: 15px;
		line-height: 1.55;
	}
	body.sefr-dashboard .verifybymain .fdata {
		overflow-wrap: anywhere;
	}
}

/* ==========================================================================
   AADHAAR VIDHYARTHI PLATFORM – select-all bar, list cards, action bar
   (phones only, <= 767px)   templates/template-aadhar-shiksha.php
   - The "Select All Students / 10 Selected / Reset Selection" bar was one
     row: on a phone the label broke into 3 lines, the count badge became a
     tall box and "Reset Selection" ran out of the box. Now: row 1 = checkbox
     + label (the label is tappable too – see sef-responsive.js), row 2 =
     count badge on the left and Reset on the right (row 2 only appears while
     something is selected; the page shows/hides those two itself).
   - Card lists (this page's list view and the other list pages that use
     the same .student_list_wrapper box): the cards sat flush against the
     bordered box, so the card borders and the box border touched. The list
     now has an inner padding like the grid view.
   - Cancel / Proceed bar: equal-height buttons, less side padding.
   ========================================================================== */
@media (max-width: 767.98px) {

	body.sefr-dashboard .student_list_wrapper .select-all-bar {
		flex-wrap: wrap;
		align-items: center;
		gap: 10px;
		padding: 12px;
	}
	body.sefr-dashboard .student_list_wrapper .select-all-bar > .custom-checkbox {
		flex: 0 0 auto;
	}
	/* fills row 1, so the badge and Reset go to row 2 */
	body.sefr-dashboard .student_list_wrapper .select-all-bar .select-all-label {
		flex: 1 1 calc(100% - 40px);
		min-width: 0;
		font-size: 14px;
		line-height: 20px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}
	body.sefr-dashboard .student_list_wrapper .select-all-bar .selected-count-badge {
		flex: 0 0 auto;
		padding: 6px 12px;
		border-radius: 999px;
		font-size: 12px;
		line-height: 16px;
		white-space: nowrap;
	}
	body.sefr-dashboard .student_list_wrapper .select-all-bar .reset-selection-btn {
		flex: 0 0 auto;
		align-items: center;
		justify-content: center;
		min-height: 32px;
		margin-left: auto;
		padding: 6px 12px;
		font-size: 13px;
		line-height: 16px;
		white-space: nowrap;
	}

	/* Card lists inside the bordered list box (Vidhyarthi list view, Schools
	   Seeking Support, Techlabs, Schools / Students Supported): inner padding
	   so the cards do not touch the box border */
	body.sefr-dashboard .student_list_wrapper > .sefr-cards-host {
		padding: 12px 12px 0;
	}

	/* Cancel / Proceed bar (new-dashboard.css sets the button paddings with !important) */
	body.sefr-dashboard .table-action-buttons {
		align-items: stretch;
	}
	body.sefr-dashboard .table-action-buttons > button {
		min-height: 44px;
		padding: 8px 16px !important;
	}
	body.sefr-dashboard .table-action-buttons > button:last-child {
		padding: 8px 12px !important;
	}
}

/* ==========================================================================
   MOBILE POLISH – found in the full phone check (phones only, <= 767px)
   ========================================================================== */
@media (max-width: 767.98px) {

	/* Sort chips: headings typed in CAPITALS ("SCHOOL NAME") show in Title
	   Case like the card labels. sef-responsive.js puts the Title Case text
	   in data-sefr-label and adds .sefr-th-relabel; the <th> text itself is
	   not changed (desktop keeps it). */
	body.sefr-dashboard table.sefr-cards > thead > tr > th.sefr-th-relabel {
		gap: 0;
		font-size: 0 !important;
	}
	body.sefr-dashboard table.sefr-cards > thead > tr > th.sefr-th-relabel::before {
		content: attr(data-sefr-label);
		font-size: 12px;
		line-height: 1.3;
	}
	body.sefr-dashboard table.sefr-cards > thead > tr > th.sefr-th-relabel > .sort-icon {
		margin-left: 4px;
		font-size: 12px;
	}

	/* Schools Seeking Support: an empty icon link (href="#", its image file
	   images/link-img.svg does not exist) sat after "Total Students" /
	   "Computers Needed" and pushed the value off the right edge */
	body.sefr-dashboard table.sefr-cards td a.link_img_icon[href="#"] {
		display: none;
	}

	/* Select2 lists (filters, contribution modal): 40px rows are easier to tap */
	body.sefr-dashboard .select2-results__option {
		padding-top: 10px;
		padding-bottom: 10px;
	}

	/* My Profile panel: the three tabs wrapped onto three lines – now three
	   equal tabs in one row (long names wrap inside their tab, so all three
	   stay visible); the close (×) gets a 44px tap area */
	body.sefr-dashboard #myprofile .nav-tabs {
		flex-wrap: nowrap;
	}
	body.sefr-dashboard #myprofile .nav-tabs > .nav-item {
		flex: 1 1 0;
		min-width: 0;
		display: flex;
	}
	body.sefr-dashboard #myprofile .nav-tabs .nav-link {
		flex: 1 1 auto;
		height: auto;                 /* new-dashboard.css: 42px, too short for 2 lines */
		min-height: 44px;
		padding: 6px 4px;
		font-size: 12.5px;
		line-height: 1.3;
		text-align: center;
		white-space: normal;
	}
	body.sefr-dashboard #myprofile .modal-header .btn_close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		margin: -8px -10px -8px 0;
		cursor: pointer;
	}

	/* Dashboard carousels: 24px arrows get a 36px tap area (same icon, same
	   place – the extra 12px is centred on it) */
	body.sefr-dashboard .slick-prev.slick-arrow,
	body.sefr-dashboard .slick-next.slick-arrow {
		width: 36px;
		height: 36px;
		margin-top: -6px;
	}
	body.sefr-dashboard .slick-prev.slick-arrow {
		right: 40px !important;
	}
	body.sefr-dashboard .studentbox_main .view_all {
		display: inline-block;
		padding: 6px 0;
	}
	/* 72px of empty space under "Aadhaar Vidyarthi you've supported" */
	body.sefr-dashboard .my_contributions {
		margin-bottom: 16px;
		padding-bottom: 16px;
	}

	/* Contact Us: full-width Submit */
	body.sefr-dashboard #contactForm .btn-submit {
		width: 100%;
		min-height: 48px;
	}
	/* Contact Us "Follow us": the page squeezes 5 icons into a 200px bar
	   (22×28px each) – now 40px tap areas in a bar as wide as needed */
	body.sefr-dashboard .contactus_main .social-bar {
		width: auto;
		height: auto;
		padding: 0;
		gap: 8px;
		flex-wrap: wrap;
	}
	body.sefr-dashboard .contactus_main .social-bar a {
		flex: 0 0 40px;
		width: 40px;
		height: 40px;
		border-radius: 8px;
	}

	/* Aadhaar Vidhyarthi: grid / list switch buttons 42×30 -> 42×36 */
	body.sefr-dashboard .ash-view-toggle .ash-gvt-btn {
		height: 36px;
	}

	/* Student detail – "Support this Student": tidy radio labels, full-width button */
	body.sefr-dashboard #donate-section .checkbox-label {
		line-height: 1.4;
	}
	body.sefr-dashboard #donate-section #sefSubmitDonation {
		width: 100%;
		min-height: 48px;
	}
}

/* ==========================================================================
   HEADER LOGIN / SIGNUP  (public site header – every front-end page)
   --------------------------------------------------------------------------
   The site header is an Elementor (Theme Builder) header. Its two buttons
     Login   div#logout-cust-mark   (js/sef-auth.js turns it into "Logout"
                                    for a signed-in visitor)
     Signup  #signup-toggle-btn     (js/sef-auth.js hides it with an inline
                                    display:none for a signed-in visitor)
   are set to "Hide on Mobile" (<= 767px) and "Hide on Mobile Extra"
   (768–880px) in Elementor, so phones never showed them.
   sef-responsive.js (section "HEADER LOGIN / SIGNUP") marks the header:
     .sefr-hdr        the .main-header that holds the buttons
     .sefr-hdr-row    the row with the logo and the right-hand container
     .sefr-hdr-right  the container with menu button + Login + Signup
   Layout:
     521–880px  the buttons sit next to the menu button, as on a tablet
     <= 520px   row 1: logo + menu button, row 2: Login | Signup (equal width)
   881px and up: nothing here applies (desktop / tablet unchanged).
   ========================================================================== */
@media (max-width: 880px) {

	/* Undo Elementor's "Hide on Mobile / Mobile Extra" for the two buttons.
	   No !important: sef-auth.js's inline display:none (signed in) still wins. */
	body.sefr-site .sefr-hdr .sefr-hdr-right > #logout-cust-mark,
	body.sefr-site .sefr-hdr .sefr-hdr-right > #signup-toggle-btn {
		display: block;
		flex: 0 0 auto;
	}
	/* Login (a plain div after sef-auth.js rewrites it) – centred text, 40px tall */
	body.sefr-site .sefr-hdr .sefr-hdr-right > #logout-cust-mark {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 40px;
		padding: 6px 16px;
		font-size: 14px;
		line-height: 1.2;
		text-align: center;
		white-space: nowrap;
		cursor: pointer;
	}
	body.sefr-site .sefr-hdr .sefr-hdr-right > #signup-toggle-btn .elementor-button {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 40px;
		padding: 6px 16px;
		font-size: 14px;
		line-height: 1.2;
		white-space: nowrap;
	}
	/* no "grow" zoom on tap */
	body.sefr-site .sefr-hdr .sefr-hdr-right > #logout-cust-mark:hover {
		transform: none;
	}
	/* the menu button must never be squeezed by the two extra buttons */
	body.sefr-site .sefr-hdr .sefr-hdr-right > .elementor-widget-nav-menu {
		flex: 0 0 auto;
		width: auto;
	}
}

/* 521–767px: Elementor sizes the logo / right containers 75% / 25% on
   "mobile"; with the two buttons the right side needs its own width, so the
   right container takes what it needs and the logo shrinks to the rest */
@media (min-width: 520.02px) and (max-width: 767.98px) {
	body.sefr-site .sefr-hdr .sefr-hdr-row > .sefr-hdr-right {
		flex: 0 0 auto;
		width: auto;
	}
	body.sefr-site .sefr-hdr .sefr-hdr-row > :first-child:not(.sefr-hdr-right) {
		flex: 1 1 0;
		width: auto;
		min-width: 0;
	}
}

@media (max-width: 520px) {

	/* row 1: logo + menu button, row 2: Login | Signup */
	body.sefr-site .sefr-hdr .sefr-hdr-row {
		flex-wrap: wrap;
		row-gap: 4px;
	}
	body.sefr-site .sefr-hdr .sefr-hdr-right {
		display: contents;            /* its children join the row above */
	}
	body.sefr-site .sefr-hdr .sefr-hdr-right > .elementor-widget-nav-menu {
		margin-left: auto;            /* menu button stays at the right of the logo */
	}
	body.sefr-site .sefr-hdr .sefr-hdr-right > #logout-cust-mark,
	body.sefr-site .sefr-hdr .sefr-hdr-right > #signup-toggle-btn {
		order: 10;                    /* after the logo and the menu button */
		flex: 1 1 calc(50% - 8px);    /* two equal buttons on their own row */
		min-width: 0;
		margin-bottom: 6px;
	}
	body.sefr-site .sefr-hdr .sefr-hdr-right > #logout-cust-mark {
		min-height: 44px;
		margin-right: 8px;
	}
	body.sefr-site .sefr-hdr .sefr-hdr-right > #signup-toggle-btn .elementor-button {
		width: 100%;
		min-height: 44px;
	}
}
