/**
 * TempleSetu NGO Partner (Lite) — Public Stylesheet
 * Neutral, professional appearance for directories and dashboards.
 */

/* ── Reset / Base ─────────────────────────────────────────────────────────── */
.ts-ngo-directory *,
.ts-ngo-single-wrap *,
.ts-ngo-dashboard * {
	box-sizing: border-box;
}

/* ── Shared Utilities ────────────────────────────────────────────────────── */
.ts-ngo-label {
	font-weight: 600;
	margin-right: 0.25em;
}

.ts-ngo-no-results {
	color: #666;
	font-style: italic;
	padding: 1rem 0;
}

.ts-ngo-btn {
	display: inline-block;
	padding: 0.5rem 1.1rem;
	background-color: #1a5276;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-size: 0.875rem;
	font-weight: 600;
	border: 2px solid #1a5276;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.ts-ngo-btn:hover,
.ts-ngo-btn:focus {
	background-color: #154360;
	border-color: #154360;
	color: #fff;
	text-decoration: none;
}

.ts-ngo-btn--outline {
	background-color: transparent;
	color: #1a5276;
}

.ts-ngo-btn--outline:hover,
.ts-ngo-btn--outline:focus {
	background-color: #1a5276;
	color: #fff;
}

/* ── Verified Badge ──────────────────────────────────────────────────────── */
.ts-ngo-badge {
	display: inline-block;
	padding: 0.2rem 0.65rem;
	border-radius: 12px;
	font-size: 0.78rem;
	font-weight: 600;
	cursor: default;
}

.ts-ngo-badge--verified {
	background-color: #d5f5e3;
	color: #1d6a3a;
	border: 1px solid #a9dfbf;
}

/* ── Directory ────────────────────────────────────────────────────────────── */
.ts-ngo-directory {
	margin: 1.5rem 0;
}

.ts-ngo-filter-label {
	margin-bottom: 1rem;
	color: #444;
}

.ts-ngo-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 260px, 1fr ) );
	gap: 1.5rem;
	margin-bottom: 2rem;
}

/* ── NGO Card ────────────────────────────────────────────────────────────── */
.ts-ngo-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #dce1e7;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.06 );
	transition: box-shadow 0.2s ease;
}

.ts-ngo-card:hover {
	box-shadow: 0 4px 12px rgba( 0, 0, 0, 0.1 );
}

.ts-ngo-card__logo {
	width: 100%;
	height: 140px;
	background-color: #f0f3f7;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.ts-ngo-card__logo img {
	max-width: 100%;
	max-height: 140px;
	object-fit: contain;
}

.ts-ngo-card__logo-placeholder {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background-color: #1a5276;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ts-ngo-card__logo-placeholder span {
	color: #fff;
	font-size: 1.6rem;
	font-weight: 700;
	text-transform: uppercase;
}

.ts-ngo-card__body {
	padding: 1rem 1rem 0.5rem;
	flex: 1;
}

.ts-ngo-card__name {
	font-size: 1rem;
	margin: 0 0 0.5rem;
}

.ts-ngo-card__name a {
	text-decoration: none;
	color: #1a5276;
}

.ts-ngo-card__name a:hover {
	text-decoration: underline;
}

.ts-ngo-card__body .ts-ngo-badge {
	margin-bottom: 0.5rem;
}

.ts-ngo-card__focus,
.ts-ngo-card__geo {
	font-size: 0.82rem;
	color: #555;
	margin: 0.25rem 0;
}

.ts-ngo-card__footer {
	padding: 0.75rem 1rem 1rem;
	border-top: 1px solid #f0f3f7;
}

/* ── Directory Footer ─────────────────────────────────────────────────────── */
.ts-ngo-directory-footer {
	margin-top: 1.5rem;
	font-size: 0.875rem;
	color: #555;
	border-top: 1px solid #dce1e7;
	padding-top: 1rem;
}

/* ── Single NGO Partner ────────────────────────────────────────────────────── */
.ts-ngo-single-wrap {
	max-width: 820px;
	margin: 2rem auto;
	padding: 0 1rem;
}

.ts-ngo-single-header {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 2px solid #e8ecf1;
}

.ts-ngo-single-logo img {
	max-width: 120px;
	max-height: 120px;
	object-fit: contain;
	border-radius: 4px;
}

.ts-ngo-single-name {
	margin: 0 0 0.5rem;
	font-size: 1.75rem;
}

.ts-ngo-detail-list {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.4rem 1rem;
	margin: 0 0 1.5rem;
}

.ts-ngo-detail-list dt {
	font-weight: 600;
	color: #333;
}

.ts-ngo-detail-list dd {
	margin: 0;
	color: #555;
}

.ts-ngo-single-description {
	margin-bottom: 2rem;
	line-height: 1.7;
}

.ts-ngo-back-link {
	color: #1a5276;
	text-decoration: none;
	font-size: 0.875rem;
}

.ts-ngo-back-link:hover {
	text-decoration: underline;
}

/* ── Embedded Impact Section (on single profile page) ─────────────────────── */
.ts-ngo-single-impact {
	margin: 2.5rem 0 2rem;
	padding-top: 2rem;
	border-top: 2px solid #e8ecf1;
}

.ts-ngo-single-impact__heading {
	font-size: 1.25rem;
	color: #1a5276;
	margin: 0 0 1.25rem;
}

/* ── Dashboard ───────────────────────────────────────────────────────────── */
.ts-ngo-dashboard {
	margin: 1.5rem 0;
}

.ts-ngo-dashboard__title {
	margin: 0 0 1rem;
	font-size: 1.3rem;
	color: #1a5276;
}

.ts-ngo-totals-row {
	display: flex;
	gap: 1rem;
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
}

.ts-ngo-total-card {
	flex: 1;
	min-width: 180px;
	background: #f0f6ff;
	border: 1px solid #c5d9f5;
	border-radius: 6px;
	padding: 1rem 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.ts-ngo-total-card__number {
	font-size: 2rem;
	font-weight: 700;
	color: #1a5276;
	line-height: 1;
}

.ts-ngo-total-card__label {
	font-size: 0.8rem;
	color: #555;
}

/* Date range filter */
.ts-ngo-range-filter {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1rem;
	flex-wrap: wrap;
}

.ts-ngo-range-filter__label {
	font-weight: 600;
	font-size: 0.875rem;
	color: #444;
}

.ts-ngo-range-btn {
	display: inline-block;
	padding: 0.3rem 0.85rem;
	border: 1px solid #b0bec5;
	border-radius: 4px;
	font-size: 0.82rem;
	color: #444;
	text-decoration: none;
	background: #fff;
	transition: border-color 0.2s, background 0.2s;
}

.ts-ngo-range-btn:hover,
.ts-ngo-range-btn:focus {
	border-color: #1a5276;
	color: #1a5276;
	text-decoration: none;
}

.ts-ngo-range-btn--active {
	background: #1a5276;
	border-color: #1a5276;
	color: #fff;
}

.ts-ngo-range-btn--active:hover,
.ts-ngo-range-btn--active:focus {
	color: #fff;
}

.ts-ngo-range-summary {
	margin-bottom: 1rem;
	font-size: 0.9rem;
	color: #555;
}

/* Entries table */
.ts-ngo-table-wrap {
	overflow-x: auto;
}

.ts-ngo-entries-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
}

.ts-ngo-entries-table th,
.ts-ngo-entries-table td {
	text-align: left;
	padding: 0.6rem 0.85rem;
	border-bottom: 1px solid #e0e6ed;
}

.ts-ngo-entries-table thead th {
	background: #f0f3f7;
	font-weight: 600;
	color: #333;
}

.ts-ngo-entries-table tbody tr:last-child td {
	border-bottom: none;
}

.ts-ngo-entries-table tfoot tr td {
	background: #f0f6ff;
	border-top: 2px solid #c5d9f5;
}

.ts-ngo-empty {
	color: #aaa;
}

/* Admin picker (on public page for admin) */
.ts-ngo-picker-form {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-bottom: 1.5rem;
}

.ts-ngo-admin-unavailable {
	color: #666;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media ( max-width: 600px ) {
	.ts-ngo-single-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.ts-ngo-grid {
		grid-template-columns: 1fr;
	}

	.ts-ngo-totals-row {
		flex-direction: column;
	}
}
