/* Pledge Plugin - Premium Frontend UI */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
	--plg-primary: #8b1d47;
	/* Maroon/Burgundy from images */
	--plg-primary-hover: #70163a;
	--plg-accent: #6366f1;
	--plg-bg: #ffffff;
	--plg-bg-alt: #f9fafb;
	--plg-text: #111827;
	--plg-text-muted: #6b7280;
	--plg-border: #e5e7eb;
	--plg-radius-lg: 24px;
	--plg-radius-md: 16px;
	--plg-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

.plg-frontend-wrapper {
	font-family: 'Inter', -apple-system, sans-serif;
	color: var(--plg-text);
	max-width: 1200px;
	margin: 0 auto;
	padding: 0px 20px;
	line-height: 1.5;
}

/* Hero Section */
.plg-hero {
	text-align: center;
	padding: 10px 0;
	margin-bottom: 50px !important;
}

.plg-hero-badge {
	display: inline-flex;
	padding: 6px 16px;
	background: #fff1f2;
	color: #9f1239;
	border-radius: 100px;
	font-size: 0.875rem;
	font-weight: 600;
	margin-bottom: 24px;
	border: 1px solid #fecdd3;
}

.plg-hero h1 {
	font-size: 3.5rem;
	font-weight: 800;
	letter-spacing: -0.025em;
	margin-bottom: 16px;
	color: #0f172a;
}

.plg-hero p {
	font-size: 1.125rem;
	color: var(--plg-text-muted);
	max-width: 600px;
	margin: 0 auto 40px;
}

.plg-hero-stats {
	display: flex;
	justify-content: center;
	gap: 64px;
	margin-top: 40px;
}

.plg-hero-stat-item h3 {
	font-size: 2.25rem;
	font-weight: 800;
	margin: 0;
	color: #0f172a;
}

.plg-hero-stat-item p {
	margin: 4px 0 0;
	font-size: 0.95rem;
	color: var(--plg-text-muted);
}

/* How It Works */
.plg-how-it-works {
	padding: 10px 0;
	text-align: center;
	margin-top: 50px !important;
}

.plg-section-title {
	font-size: 1.5rem;
	font-weight: 800;
	margin-bottom: 10px;
}

.plg-steps-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 40px;
}

.plg-step-card {
	padding: 24px;
}

.plg-step-icon {
	width: 64px;
	height: 64px;
	background: #fff1f2;
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 24px;
	font-size: 1.5rem;
}

.plg-step-num {
	color: var(--plg-primary);
	font-weight: 700;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 8px;
	display: block;
}

.plg-step-card h4 {
	font-size: 1.25rem;
	font-weight: 700;
	margin-bottom: 12px;
}

.plg-step-card p {
	font-size: 0.95rem;
	color: var(--plg-text-muted);
	line-height: 1.6;
}

/* Filters & Search */
.plg-list-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-bottom: 32px;
	flex-wrap: wrap;
	gap: 20px;
}

.plg-list-info h2 {
	font-size: 1.75rem;
	font-weight: 800;
	margin: 0;
}

.plg-list-info p {
	color: var(--plg-text-muted);
	margin: 4px 0 0;
}

.plg-search-wrap {
	position: relative;
	width: 320px;
}

.plg-search-input {
	width: 100%;
	padding: 12px 16px 12px 40px;
	border: 1px solid var(--plg-border);
	border-radius: 12px !important;
	background: #f9fafb;
	font-size: 0.95rem;
}

.plg-search-wrap::before {
	content: '🔍';
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 0.9rem;
	opacity: 0.5;
}

.plg-categories {
	display: flex;
	gap: 8px;
	margin-bottom: 40px;
	overflow-x: auto;
	padding-bottom: 8px;
}

.plg-cat-btn {
	padding: 8px 18px;
	border-radius: 100px;
	border: 1px solid var(--plg-border);
	background: white !important;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.2s;
}

.plg-cat-btn:hover {
	background: var(--plg-bg-alt);
}

.plg-cat-btn.active {
	background: var(--plg-primary) !important;
	color: white;
	border-color: var(--plg-primary);
}

/* Pledge Cards */
.plg-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
}

.plg-card {
	background: white;
	border: 1px solid var(--plg-border);
	border-radius: var(--plg-radius-md);
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
}

.plg-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.plg-card-img-wrap {
	height: 200px;
	position: relative;
}

.plg-card-img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
}

.plg-card-tag {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 4px 10px;
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(4px);
	border-radius: 6px;
	font-size: 0.7rem;
	font-weight: 700;
	color: var(--plg-text);
}

.plg-card-body {
	padding: 24px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.plg-card-body h3 {
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0 0 12px;
}

.plg-card-body p {
	font-size: 0.9rem;
	color: var(--plg-text-muted);
	margin-bottom: 24px;
	line-height: 1.6;
}

.plg-progress-area {
	margin-top: auto;
	margin-bottom: 24px;
}

.plg-progress-bar-bg {
	height: 8px;
	background: #f1f5f9;
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 8px;
}

.plg-progress-bar-fill {
	height: 100%;
	background: var(--plg-primary);
	border-radius: 4px;
}

.plg-progress-labels {
	display: flex;
	justify-content: space-between;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--plg-text-muted);
}

.plg-card-footer {
	display: flex;
	justify-content: space-between;
	font-size: 0.8rem;
	color: var(--plg-text-muted);
	margin-bottom: 20px;
	padding-top: 16px;
	border-top: 1px solid #f1f5f9;
}

.plg-btn-main {
	width: 100%;
	padding: 14px !important;
	background: var(--plg-primary) !important;
	color: white;
	border: none !important;
	border-radius: 10px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.plg-btn-main:hover {
	background: var(--plg-primary-hover) !important;
	color: white;
}

/* Detail View */
.plg-detail-view {
	display: none;
}

.plg-back-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--plg-text-muted);
	text-decoration: none;
	font-weight: 600;
	margin-bottom: 32px;
	cursor: pointer;
}

.plg-detail-grid {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 40px;
}

.plg-detail-img {
	width: 100%;
	height: 450px;
	object-fit: cover;
	border-radius: var(--plg-radius-md);
	margin-bottom: 32px;
}

.plg-detail-content h1 {
	font-size: 2.5rem;
	font-weight: 800;
	margin: 12px 0 24px;
}

.plg-detail-desc {
	font-size: 1.1rem;
	color: #4b5563;
	line-height: 1.8;
	margin-bottom: 40px;
}

.plg-detail-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	margin-bottom: 40px;
	font-size: 0.95rem;
	color: var(--plg-text-muted);
}

.plg-detail-progress {
	background: white;
	padding: 32px;
	border-radius: 16px;
	border: 1px solid var(--plg-border);
	margin-bottom: 32px;
}

/* Sidebar / Demographics */
.plg-sidebar-card {
	background: white;
	border: 1px solid var(--plg-border);
	border-radius: 20px;
	padding: 32px;
	position: sticky;
	top: 40px;
}

.plg-side-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin-bottom: 32px;
}

.plg-side-stat-item {
	background: #f9fafb;
	padding: 16px 8px;
	border-radius: 12px;
	text-align: center;
}

.plg-side-stat-val {
	font-weight: 800;
	font-size: 1.25rem;
	display: block;
}

.plg-side-stat-label {
	font-size: 0.75rem;
	color: var(--plg-text-muted);
}

/* Charts */
.plg-chart-wrap {
	margin-bottom: 32px;
}

.plg-chart-title {
	font-size: 1rem;
	font-weight: 700;
	margin-bottom: 16px;
}

.plg-donut-chart {
	width: 180px;
	height: 180px;
	margin: 0 auto 24px;
	border-radius: 50%;
	background: conic-gradient(#d5d5d5 0% 50%, #d5d5d5 50% 100%);
	/* background: conic-gradient(#ec4899 0% 50%, #3b82f6 50% 100%); */
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.plg-donut-chart::after {
	content: '';
	width: 120px;
	height: 120px;
	background: white;
	border-radius: 50%;
}

.plg-chart-legend {
	display: flex;
	justify-content: center;
	gap: 16px;
	font-size: 0.85rem;
	font-weight: 600;
}

.plg-bar-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.plg-bar-item {
	display: flex;
	align-items: center;
	gap: 12px;
}

.plg-bar-name {
	width: 100px;
	font-size: 0.8rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.plg-bar-track {
	flex: 1;
	height: 6px;
	background: #f1f5f9;
	border-radius: 3px;
}

.plg-bar-fill {
	height: 100%;
	background: #3b82f6;
	border-radius: 3px;
}

.plg-bar-val {
	font-size: 0.8rem;
	font-weight: 600;
}

/* Modals */
.plg-modal {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(8px);
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.plg-modal-content {
	background: white;
	width: 100%;
	max-width: 550px;
	border-radius: 32px;
	padding: 48px;
	position: relative;
	max-height: 90vh;
	overflow-y: auto;
}

.plg-modal-close {
	position: absolute;
	top: 24px;
	right: 24px;
	font-size: 1.5rem;
	cursor: pointer;
	color: var(--plg-text-muted);
}

/* Form Styles */
.plg-form-group {
	margin-bottom: 20px;
}

.plg-form-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	font-size: 0.9rem;
}

.plg-form-input {
	width: 100%;
	padding: 12px 16px !important;
	border: 1.5px solid var(--plg-border);
	border-radius: 12px !important;
	font-size: 1rem;
	background: #ffffff;
	transition: all 0.2s ease;
	outline: none;
	appearance: none;
}

.plg-form-input:focus {
	border-color: var(--plg-primary) !important;
	box-shadow: 0 0 0 4px rgba(139, 29, 71, 0.1) !important;
}

select.plg-form-input {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 16px;
	padding-right: 40px;
}

.plg-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

/* Success Modal */
.plg-success-icon {
	width: 80px;
	height: 80px;
	background: #dcfce7;
	color: #166534;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2.5rem;
	margin: 0 auto 24px;
}

/* Responsiveness */
/* Share Section */
.plg-detail-share {
	margin-top: 40px;
	padding-top: 32px;
	border-top: 1px solid var(--plg-border);
}

.plg-share-title {
	font-size: 0.8rem;
	font-weight: 700;
	margin-bottom: 16px;
	color: var(--plg-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.plg-share-btns {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.plg-share-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: #f3f4f6;
	color: #4b5563;
	text-decoration: none;
	transition: all 0.2s;
	border: none;
	cursor: pointer;
	font-size: 1.2rem;
}

.plg-share-btn:hover {
	background: var(--plg-primary);
	color: white;
	transform: translateY(-3px);
}

.plg-share-btn.plg-copy-btn {
	width: auto;
	padding: 0 20px;
	font-size: 0.85rem;
	font-weight: 700;
	gap: 8px;
}

@media (max-width: 1024px) {
	.plg-grid {
		grid-template-columns: 1fr 1fr;
	}

	.plg-detail-grid {
		grid-template-columns: 1fr;
	}

	.plg-sidebar-card {
		position: static;
		margin-top: 40px;
	}
}

@media (max-width: 768px) {
	.plg-hero h1 {
		font-size: 2.5rem;
	}

	.plg-grid {
		grid-template-columns: 1fr;
	}

	.plg-steps-grid {
		grid-template-columns: 1fr;
	}

	.plg-hero-stats {
		gap: 32px;
	}

	.plg-modal-content {
		padding: 32px;
	}
}