/**
 * Stylesheet for public donation and ticketing elements
 */

/* Main Wrapper Containers */
.giveblocks-donation-card-wrapper,
.giveblocks-event-card-wrapper,
.giveblocks-portal-wrapper {
	margin: 20px auto;
	max-width: 600px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #1e293b;
	box-sizing: border-box;
}

/* Event checkout layout. Kept in the registered public stylesheet so it is cached and loaded by WordPress. */
.giveblocks-event-grid {
	display: grid !important;
	grid-template-columns: 1.2fr 1fr !important;
	gap: 25px !important;
	align-items: start !important;
	width: 100% !important;
	max-width: 1100px !important;
	margin: 0 auto !important;
	box-sizing: border-box !important;
}
.giveblocks-event-grid.giveblocks-event-checkout-only { display: block !important; max-width: 600px !important; }
@media (max-width: 768px) {
	.giveblocks-event-grid { grid-template-columns: 1fr !important; gap: 20px !important; width: 100% !important; max-width: 100% !important; min-width: 0 !important; margin: 16px 0 !important; box-sizing: border-box !important; }
	.giveblocks-event-grid .giveblocks-event-left-col, .giveblocks-event-grid .giveblocks-event-right-col, .giveblocks-event-grid .giveblocks-frontend-card, .giveblocks-event-grid .tier-details { min-width: 0 !important; }
	.giveblocks-event-grid .giveblocks-frontend-card { padding: 20px !important; }
	.giveblocks-event-grid .giveblocks-ticket-tier-row, .giveblocks-event-grid .giveblocks-addon-item-row label { gap: 12px !important; }
	.giveblocks-event-grid .tier-name { display: block; overflow-wrap: anywhere; }
	.giveblocks-event-grid .giveblocks-ticket-qty { flex: 0 0 auto; }
}

/* Direct campaign pages are standalone pages, so these selectors are strictly scoped. */
body.giveblocks-direct-landing {
	background-color: #f8fafc !important;
	color: #1e293b !important;
	font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	align-items: center;
	justify-content: center;
}
.giveblocks-direct-landing .giveblocks-landing-container { width: 100%; max-width: 1000px; padding: 40px 20px; box-sizing: border-box; }
.giveblocks-direct-landing .giveblocks-landing-card-outer { background: #fff; border-radius: 16px; border: 1px solid #eef2f6; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, .05), 0 8px 10px -6px rgba(0, 0, 0, .05); overflow: hidden; padding: 30px; }
.giveblocks-direct-landing .giveblocks-landing-footer { margin-top: 30px; text-align: center; font-size: 13px; color: #64748b; }
.giveblocks-direct-landing .giveblocks-landing-footer a { color: var(--giveblocks-landing-accent, #006fd6); text-decoration: none; font-weight: 600; }
.giveblocks-direct-landing .giveblocks-landing-logo-header { text-align: center; margin-bottom: 25px; }
.giveblocks-direct-landing .giveblocks-landing-logo-header img { max-height: var(--giveblocks-branding-logo-height, 55px); width: auto; }
.giveblocks-direct-landing .giveblocks-landing-logo-header h1 { margin: 5px 0 0; font-size: 20px; font-weight: 800; color: #0f172a; }

/* Base Cards */
.giveblocks-frontend-card {
	background: #ffffff;
	border: 1px solid #eef2f6;
	border-radius: 12px;
	padding: 24px;
	margin-bottom: 20px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
	box-sizing: border-box;
}

/* Optional Gutenberg solid layout: one cohesive form instead of separate cards. */
.giveblocks-layout-solid {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 18px;
	padding: 28px;
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.giveblocks-layout-solid .giveblocks-frontend-card {
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	padding: 24px 0;
	margin: 0;
	border-top: 1px solid #eef2f6;
}

.giveblocks-layout-solid .giveblocks-frontend-card:first-of-type {
	border-top: 0;
}

.giveblocks-layout-solid .giveblocks-campaign-header-banner {
	border-radius: 12px !important;
}

.giveblocks-corners-square,
.giveblocks-corners-square *,
.giveblocks-corners-square .giveblocks-campaign-header-banner {
	border-radius: 0 !important;
}

.giveblocks-goal-progress {
	margin-top: 20px;
	padding: 14px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
}

.giveblocks-goal-progress > div { display:flex; justify-content:space-between; gap:12px; font-size:12px; color:#475569; }
.giveblocks-goal-progress strong { color:#0f172a; }
.giveblocks-goal-progress i { display:block; height:8px; margin-top:10px; background:#e2e8f0; border-radius:999px; overflow:hidden; }
.giveblocks-goal-progress b { display:block; height:100%; background:var(--giveblocks-accent); border-radius:inherit; }

.giveblocks-event-details {
	display: grid;
	gap: 8px;
	margin: 0 0 16px;
	color: #334155;
	font-size: 14px;
	font-weight: 600;
}

.giveblocks-event-details > div {
	display: flex;
	align-items: center;
	gap: 8px;
}

.giveblocks-event-details .dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
	color: var(--giveblocks-accent);
}

.giveblocks-card-title {
	margin: 0 0 20px 0;
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
	display: flex;
	align-items: center;
	gap: 8px;
}

.giveblocks-card-title .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

/* Fields & Inputs */
.giveblocks-field-group {
	margin-bottom: 16px;
	display: flex;
	flex-direction: column;
}

.giveblocks-field-label {
	font-size: 13px;
	font-weight: 600;
	color: #475569;
	margin-bottom: 6px;
}

.giveblocks-field-label.required::after {
	content: " *";
	color: #ef4444;
}

.giveblocks-input-field {
	height: 40px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: 0 12px;
	font-size: 14px;
	color: #0f172a;
	background-color: #ffffff;
	transition: all 0.2s ease;
	width: 100%;
	box-sizing: border-box;
}

select.giveblocks-input-field {
	height: 40px;
	padding: 0 8px;
}

textarea.giveblocks-input-field {
	height: auto;
	padding: 10px 12px;
}

.giveblocks-input-field:focus {
	border-color: var(--giveblocks-accent);
	outline: none;
	box-shadow: 0 0 0 3px rgba(0, 111, 214, 0.1);
}

/* Pill Toggle button */
.giveblocks-frequency-toggle {
	display: flex;
	background: #f1f5f9;
	border-radius: 8px;
	padding: 4px;
	margin-bottom: 20px;
}

.giveblocks-freq-btn {
	flex: 1;
	height: 38px;
	border: none;
	background: transparent;
	font-size: 14px;
	font-weight: 600;
	color: #64748b;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.giveblocks-freq-btn.active {
	background: #ffffff;
	color: var(--giveblocks-accent);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Grid button amounts */
.giveblocks-amounts-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
}

.giveblocks-amount-btn {
	height: 44px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 700;
	color: #334155;
	cursor: pointer;
	transition: all 0.2s ease;
}

.giveblocks-amount-btn:hover {
	border-color: var(--giveblocks-accent);
	color: var(--giveblocks-accent);
	background-color: #f0f7ff;
}

.giveblocks-amount-btn.active {
	background: var(--giveblocks-accent);
	border-color: var(--giveblocks-accent);
	color: #ffffff;
}

/* Fee coverage card block */
.fee-coverage-card {
	border-left: 4px solid var(--giveblocks-accent);
	background: #f0f7ff;
}

/* Some themes apply full-height input rules to every form control. Keep
 * checkout checkboxes native, compact, and aligned with their label text. */
.fee-coverage-card .giveblocks-checkbox-label {
	align-items: flex-start;
}

.fee-coverage-card #giveblocks-cover-fees,
.giveblocks-addon-checkbox {
	-webkit-appearance: checkbox !important;
	appearance: checkbox !important;
	flex: 0 0 18px !important;
	width: 18px !important;
	height: 18px !important;
	min-width: 18px !important;
	min-height: 18px !important;
	max-width: 18px !important;
	max-height: 18px !important;
	margin: 3px 0 0 !important;
	padding: 0 !important;
	box-sizing: border-box !important;
	accent-color: var(--giveblocks-accent);
}

/* Summary table checkout */
.giveblocks-sandbox-notice {
	margin: 16px 0;
	padding: 12px 14px;
	border: 1px solid #f59e0b;
	border-radius: 8px;
	background: #fffbeb;
	color: #92400e;
	font-size: 14px;
	line-height: 1.45;
}

.giveblocks-summary-table {
	width: 100%;
	border-collapse: collapse;
}

.giveblocks-summary-table td {
	padding: 8px 0;
	font-size: 14px;
	color: #475569;
}

.giveblocks-summary-table .text-right {
	text-align: right;
	font-weight: 600;
	color: #0f172a;
}

.giveblocks-summary-table .total-row td {
	padding-top: 15px;
	border-top: 1px solid #e2e8f0;
	font-size: 16px;
	color: #0f172a;
}

.giveblocks-summary-table .total-row .text-right {
	color: var(--giveblocks-accent);
	font-size: 18px;
}

/* Public custom buttons */
.giveblocks-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 500;
	border-radius: 6px;
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.2s ease;
}

.giveblocks-btn-primary {
	background-color: var(--giveblocks-accent);
	border-color: var(--giveblocks-accent);
	color: #ffffff !important;
}

.giveblocks-btn-primary:hover {
	opacity: 0.9;
}

.giveblocks-btn-outline {
	background-color: transparent;
	border-color: #cbd5e1;
	color: #475569;
}

.giveblocks-btn-outline:hover {
	background-color: #f8fafc;
	color: #0f172a;
}

/* Event List rows */
.giveblocks-ticket-tier-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #f1f5f9;
	padding: 15px 0;
}

.giveblocks-ticket-tier-row:last-child {
	border-bottom: none;
}

.giveblocks-ticket-tier-row.sold-out {
	opacity: 0.6;
}

.tier-name {
	font-size: 15px;
	color: #0f172a;
	font-weight: 700;
}

.tier-price {
	font-size: 14px;
	font-weight: 700;
	color: var(--giveblocks-accent);
	margin-left: 8px;
}

.giveblocks-quantity-stepper {
	display: inline-grid;
	grid-template-columns: 34px 38px 34px;
	align-items: stretch;
	border: 1px solid #dbe5ef;
	border-radius: 7px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.giveblocks-quantity-stepper button {
	border: 0;
	background: #fff;
	color: #334155;
	font-size: 18px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
}

.giveblocks-quantity-stepper button:hover:not(:disabled) { background: #f0f8ff; color: var(--giveblocks-accent); }
.giveblocks-quantity-stepper button:disabled { color: #cbd5e1; cursor: not-allowed; }
.giveblocks-quantity-stepper .giveblocks-ticket-qty { width: 38px; min-width: 0; padding: 0; border: 0; border-left: 1px solid #e2e8f0; border-right: 1px solid #e2e8f0; border-radius: 0; background: #fff; color: #0f172a; font-weight: 700; text-align: center; appearance: textfield; }
.giveblocks-quantity-stepper .giveblocks-ticket-qty::-webkit-outer-spin-button,
.giveblocks-quantity-stepper .giveblocks-ticket-qty::-webkit-inner-spin-button { appearance: none; margin: 0; }
.giveblocks-quantity-stepper.is-disabled { background: #f8fafc; }

/* Optioned event add-ons, such as shirt sizes, use the same understated helper
   treatment as the rest of the checkout form. */
.giveblocks-addon-qty-wrapper .giveblocks-addon-attendee-note {
	display: block;
	margin: 9px 0 0 0;
	padding: 8px 10px;
	border-left: 3px solid var(--giveblocks-accent);
	border-radius: 3px;
	background: #f8fafc;
	color: #64748b;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.45;
}

.giveblocks-attendee-addon-field {
	margin: 14px 0 0;
	padding-top: 14px;
	border-top: 1px solid #e2e8f0;
}

.giveblocks-attendee-addon-field .giveblocks-input-field { background: #fff; }
.giveblocks-attendee-volunteer-field { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid #e2e8f0; }

/* Addons lists layout */
.giveblocks-addon-item-row {
	border-bottom: 1px solid #f1f5f9;
	padding: 15px 0;
}

.giveblocks-addon-item-row:last-child {
	border-bottom: none;
}

.giveblocks-addon-item-row .giveblocks-checkbox-label { font-size: 15px !important; line-height: 1.35; }
.giveblocks-addon-item-row .giveblocks-addon-name { color: #334155; font-size: 15px; font-weight: 600; }
.giveblocks-addon-item-row .giveblocks-addon-price { color: #0f172a; font-size: 15px; font-weight: 700; white-space: nowrap; }
.giveblocks-event-checkout-goal { margin: 0 0 16px; }

/* Dynamic Attendee sub-cards */
.giveblocks-attendee-card {
	background: #f8fafc;
	border: 1px solid #eef2f6;
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 12px;
}

/* Portal Elements styling */
.giveblocks-portal-table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
}

.giveblocks-portal-table th {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: #64748b;
	padding: 8px 0;
	border-bottom: 2px solid #f1f5f9;
	letter-spacing: 0.05em;
}

.giveblocks-portal-table td {
	padding: 12px 0;
	border-bottom: 1px solid #f1f5f9;
	font-size: 14px;
}

.giveblocks-portal-table tr:last-child td {
	border-bottom: none;
}

.giveblocks-portal-table .text-right {
	text-align: right;
}

.giveblocks-badge {
	display: inline-block;
	padding: 4px 8px;
	font-size: 10px;
	font-weight: 700;
	border-radius: 4px;
	letter-spacing: 0.03em;
}

.giveblocks-badge-donation {
	background-color: #fff3eb;
	color: #ff5500;
}

.giveblocks-badge-ticket {
	background-color: #eff6ff;
	color: #006fd6;
}

.giveblocks-badge-yes {
	background-color: #ecfdf5;
	color: #059669;
}

/* Donor Portal Dashboard Redesign - Enclosed Card Layout */
.giveblocks-portal-wrapper {
	width: min(1180px, calc(100vw - 32px));
	max-width: none !important;
	margin: 30px auto;
}

/* The portal is intended to be a roomy workspace while still following the
   page's natural center line on desktop themes. */
.giveblocks-portal-wrapper {
	position: relative;
	left: auto;
	transform: none;
}

.giveblocks-portal-box {
	background: #ffffff;
	border: 1px solid #eef2f6;
	border-radius: 12px;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-sizing: border-box;
}

.giveblocks-portal-box-header {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 24px 30px;
	border-bottom: 1px solid #eef2f6;
	background: #ffffff;
}

.giveblocks-portal-box-body {
	display: flex;
	flex-direction: row;
	background: #ffffff;
}

.giveblocks-portal-box-sidebar {
	width: 250px;
	border-right: 1px solid #eef2f6;
	padding: 24px 16px;
	display: flex;
	flex-direction: column;
	background: #ffffff;
	flex-shrink: 0;
	box-sizing: border-box;
}

.giveblocks-portal-box-content {
	flex-grow: 1;
	padding: 30px;
	background: #ffffff;
	min-width: 0;
	box-sizing: border-box;
}

/* Sidebar profile card in header */
.giveblocks-portal-box-header .giveblocks-profile-avatar {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: #47af50; /* soft green avatar */
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 22px;
	flex-shrink: 0;
}

.giveblocks-portal-box-header .giveblocks-profile-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.giveblocks-portal-box-header .giveblocks-profile-name {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	color: #2c3e50;
}

.giveblocks-portal-box-header .giveblocks-profile-meta {
	font-size: 13px;
	color: #7f8c8d;
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 4px;
}

.giveblocks-portal-box-header .giveblocks-meta-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

.giveblocks-portal-box-header .giveblocks-meta-item .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
	color: #7f8c8d;
}

/* Sidebar Menu styling */
.giveblocks-portal-box-sidebar .giveblocks-portal-menu {
	list-style: none;
	padding: 0;
	margin: 0;
}

.giveblocks-portal-box-sidebar .giveblocks-portal-menu li {
	margin-bottom: 4px;
}

.giveblocks-portal-box-sidebar .giveblocks-portal-menu li a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	color: #555555;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	border-radius: 0;
	transition: all 0.2s ease;
	border-left: 3px solid transparent;
}

.giveblocks-portal-box-sidebar .giveblocks-portal-menu li a:hover {
	color: #000000;
	background: #fcfcfc;
}

.giveblocks-portal-box-sidebar .giveblocks-portal-menu li.active a {
	color: #000000;
	background: #ffffff;
	border-left: 3px solid #47af50; /* green active bar */
	font-weight: 700;
}

.giveblocks-portal-box-sidebar .giveblocks-portal-menu li a .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.giveblocks-portal-box-sidebar .giveblocks-portal-logout-wrap {
	margin-top: auto;
	padding-top: 20px;
}

.giveblocks-portal-box-sidebar .giveblocks-portal-logout-link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	color: #47af50; /* soft green logout */
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
}

.giveblocks-portal-box-sidebar .giveblocks-portal-logout-link:hover {
	background: #f8fafc;
}

.giveblocks-portal-box-sidebar .giveblocks-portal-logout-link .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.giveblocks-portal-content {
	flex-grow: 1;
	min-width: 0;
}

.giveblocks-portal-tab-content {
	display: none;
}

.giveblocks-portal-tab-content.active {
	display: block;
}

/* Stats dashboard styling */
.giveblocks-portal-stats-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin-bottom: 30px;
}

.giveblocks-portal-stat-card {
	background: #ffffff;
	border: 1px solid #eef2f6;
	border-radius: 8px;
	padding: 20px;
	box-shadow: none;
}

.giveblocks-portal-stat-card label {
	font-size: 11px;
	font-weight: 700;
	color: #7f8c8d;
	text-transform: uppercase;
	margin-bottom: 6px;
	display: block;
}

.giveblocks-portal-stat-card h3 {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	color: #2c3e50;
}

/* Custom Table in Portal Box Content */
.giveblocks-portal-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 15px;
}

.giveblocks-portal-table th {
	font-size: 12px;
	font-weight: 700;
	color: #7f8c8d;
	border-bottom: 1px solid #f1f1f1;
	padding: 12px 15px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.giveblocks-portal-table td {
	padding: 16px 15px;
	border-bottom: 1px solid #f1f1f1;
	font-size: 14px;
	line-height: 1.5;
}

/* Subscriptions and details card headers */
.giveblocks-portal-box-content .giveblocks-frontend-card {
	border: none;
	box-shadow: none;
	padding: 0;
	margin-bottom: 30px;
}

.giveblocks-portal-box-content .giveblocks-card-title {
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 20px;
	border-bottom: 1px solid #f1f1f1;
	padding-bottom: 10px;
	margin-top: 0;
}

/* Block layout options.  The solid variation makes the whole portal feel like
   one unified panel instead of a collection of smaller cards. */
.giveblocks-portal-layout-solid .giveblocks-portal-box {
	border-color: #dbe5ef;
	box-shadow: 0 14px 32px rgba(15, 23, 42, 0.09);
}

.giveblocks-portal-layout-solid .giveblocks-portal-box-header,
.giveblocks-portal-layout-solid .giveblocks-portal-box-sidebar {
	background: #f8fafc;
}

.giveblocks-portal-layout-solid .giveblocks-portal-stat-card {
	padding: 18px 0;
	border: 0;
	border-radius: 0;
	border-bottom: 1px solid #e2e8f0;
	background: transparent;
}

.giveblocks-portal-layout-solid .giveblocks-portal-stats-grid {
	gap: 0;
	margin-bottom: 30px;
	border: 1px solid #dbe5ef;
	background: #ffffff;
}

.giveblocks-portal-layout-solid .giveblocks-portal-box-content .giveblocks-frontend-card {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
}

.giveblocks-portal-layout-solid .giveblocks-portal-stats-grid .giveblocks-portal-stat-card {
	padding: 20px;
	border-right: 1px solid #e2e8f0;
	border-bottom: 0;
}

.giveblocks-portal-layout-solid .giveblocks-portal-stats-grid .giveblocks-portal-stat-card:last-child {
	border-right: 0;
}

/* Square is deliberately comprehensive so the setting has the same visual
   effect as the donation and event form blocks. */
.giveblocks-portal-corners-square .giveblocks-portal-box,
.giveblocks-portal-corners-square .giveblocks-portal-box *,
.giveblocks-portal-corners-square .giveblocks-frontend-card {
	border-radius: 0 !important;
}

/* Donor portal detail dialogs */
.giveblocks-portal-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	overflow-y: auto;
	padding: 32px 18px;
	background: rgba(15, 23, 42, 0.58);
	box-sizing: border-box;
}

.giveblocks-portal-modal .giveblocks-modal-content {
	width: min(680px, 100%);
	margin: 5vh auto;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(15, 23, 42, 0.26);
	overflow: hidden;
	box-sizing: border-box;
}

.giveblocks-portal-modal .giveblocks-modal-content.giveblocks-modal-lg {
	width: min(840px, 100%);
}

.giveblocks-portal-modal .giveblocks-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 19px 24px;
	border-bottom: 1px solid #e7edf4;
	background: #fff;
}

.giveblocks-portal-modal .giveblocks-modal-body {
	padding: 22px 24px !important;
}

.giveblocks-portal-modal .giveblocks-close-portal-modal.dashicons {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 7px;
	background: transparent;
	color: #64748b;
	cursor: pointer;
	font-size: 20px;
}

.giveblocks-portal-modal .giveblocks-close-portal-modal:hover,
.giveblocks-portal-modal .giveblocks-close-portal-modal:focus {
	background: #f1f5f9;
	color: #0f172a;
}

.giveblocks-portal-modal .giveblocks-modal-body table td {
	border-bottom: 1px solid #f1f5f9;
}

.giveblocks-portal-modal .giveblocks-modal-body table tr:last-child td {
	border-bottom: 0;
}

.giveblocks-portal-modal .giveblocks-modal-content > div:last-child {
	padding: 16px 24px 20px !important;
	background: #f8fafc;
}

/* Responsive portal grid */
@media (max-width: 768px) {
	.giveblocks-portal-wrapper { width: calc(100vw - 20px); margin: 16px auto !important; padding: 0; box-sizing: border-box; }

	.giveblocks-portal-box-header { gap: 12px; padding: 18px; }
	.giveblocks-portal-box-header .giveblocks-profile-avatar { width: 52px; height: 52px; font-size: 18px; }
	.giveblocks-portal-box-header .giveblocks-profile-name { font-size: 17px; }
	.giveblocks-portal-box-header .giveblocks-profile-meta { font-size: 12px; }

	.giveblocks-portal-box-body {
		flex-direction: column;
	}
	
	.giveblocks-portal-box-sidebar {
		width: 100%;
		border-right: none;
		border-bottom: 1px solid #eef2f6;
		min-height: auto;
		padding: 8px 10px;
		display: block;
	}

	.giveblocks-portal-box-sidebar .giveblocks-portal-menu {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 4px;
		overflow: visible;
	}
	.giveblocks-portal-box-sidebar .giveblocks-portal-menu li { margin: 0; min-width: 0; }
	.giveblocks-portal-box-sidebar .giveblocks-portal-menu li a { justify-content: center; gap: 6px; padding: 9px 6px; font-size: 12px; border-left: 0; border-bottom: 3px solid transparent; border-radius: 6px; white-space: nowrap; }
	.giveblocks-portal-box-sidebar .giveblocks-portal-menu li.active a { border-left: 0; border-bottom-color: #47af50; background: #f0fdf4; }
	.giveblocks-portal-box-sidebar .giveblocks-portal-menu li a .dashicons { font-size: 16px; width: 16px; height: 16px; }
	.giveblocks-portal-box-sidebar .giveblocks-portal-logout-wrap { margin: 4px 0 0; padding: 0; text-align: center; }
	.giveblocks-portal-box-sidebar .giveblocks-portal-logout-link { display: inline-flex; padding: 7px 10px; font-size: 12px; border-radius: 6px; }
	.giveblocks-portal-box-sidebar .giveblocks-portal-logout-link .dashicons { font-size: 18px; width: 18px; height: 18px; }

	.giveblocks-portal-box-content { padding: 20px 18px; }
	
	.giveblocks-portal-stats-grid {
		grid-template-columns: 1fr;
	}
	.giveblocks-portal-layout-solid .giveblocks-portal-stats-grid .giveblocks-portal-stat-card {
		border-right: 0;
		border-bottom: 1px solid #e2e8f0;
	}
	.giveblocks-portal-layout-solid .giveblocks-portal-stats-grid .giveblocks-portal-stat-card:last-child { border-bottom: 0; }

	/* Ticket orders become compact, readable cards so the action never falls
	   outside the viewport on phones. */
	#tab-tickets .giveblocks-portal-table,
	#tab-tickets .giveblocks-portal-table tbody,
	#tab-tickets .giveblocks-portal-table tr,
	#tab-tickets .giveblocks-portal-table td { display: block; width: 100%; box-sizing: border-box; }
	#tab-tickets .giveblocks-portal-table thead { display: none; }
	#tab-tickets .giveblocks-portal-table tr { margin: 0 0 12px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 9px; background: #f8fafc; }
	#tab-tickets .giveblocks-portal-table td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 0; border: 0; font-size: 13px; text-align: right; }
	#tab-tickets .giveblocks-portal-table td::before { color: #64748b; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
	#tab-tickets .giveblocks-portal-table td:nth-child(1)::before { content: 'Date'; }
	#tab-tickets .giveblocks-portal-table td:nth-child(2)::before { content: 'Event'; }
	#tab-tickets .giveblocks-portal-table td:nth-child(3)::before { content: 'Tickets'; }
	#tab-tickets .giveblocks-portal-table td:nth-child(4)::before { content: 'Paid'; }
	#tab-tickets .giveblocks-portal-table td:nth-child(5) { padding-top: 10px; }
	#tab-tickets .giveblocks-portal-table td:nth-child(5)::before { display: none; }
	#tab-tickets .giveblocks-portal-table td:nth-child(5) .giveblocks-portal-view-tickets-btn { width: 100%; height: 36px !important; }

	.giveblocks-portal-modal {
		padding: 12px;
	}

	.giveblocks-portal-modal .giveblocks-modal-content {
		margin: 0 auto;
		border-radius: 10px;
	}

	.giveblocks-portal-modal .giveblocks-modal-header,
	.giveblocks-portal-modal .giveblocks-modal-body {
		padding-left: 16px;
		padding-right: 16px;
	}
}
