/**
 * PressPrimer Quiz - Upgrade Page Styles
 *
 * Styles for the in-product Upgrade page shown to free / Educator / School
 * users. Visually distinct from the rest of the admin so it feels like a
 * deliberate marketing surface (dark hero, color-accented tier cards,
 * light celebratory footer, teal sticky purchase bar) while still using
 * WP admin spacing conventions.
 *
 * @package PressPrimer_Quiz
 * @since 2.3.0
 */

/* =============================================================
   Page container — adds bottom padding so the sticky footer bar
   never overlaps the final section's content.
   ============================================================= */

.ppq-upgrade-page {
	max-width: 1240px;
	margin: 20px auto 0;
	padding-bottom: 80px;
}

.ppq-upgrade-page section {
	margin-bottom: 56px;
}

/* =============================================================
   Hero — dark navy → teal gradient, white text, mascot at right
   inside a soft white circle so the white-bodied mascot reads
   against the dark gradient.
   ============================================================= */

.ppq-upgrade-hero {
	position: relative;
	background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #14b8a6 130%);
	border-radius: 12px;
	padding: 48px 56px;
	color: #fff;
	display: flex;
	align-items: center;
	gap: 32px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

/* Subtle dot pattern behind the hero text for visual interest. */
.ppq-upgrade-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
	background-size: 22px 22px;
	pointer-events: none;
}

.ppq-upgrade-hero-content {
	flex: 1;
	min-width: 0;
	position: relative;
	z-index: 1;
}

.ppq-upgrade-hero-logo {
	display: block;
	height: 56px;
	width: auto;
	margin: 0 0 28px;
}

.ppq-upgrade-hero h1 {
	font-size: 34px;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
	margin: 0 0 18px;
	padding: 0;
}

.ppq-upgrade-intro {
	font-size: 16px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.92);
	max-width: 640px;
	margin: 0 0 28px;
}

/* Primary CTA — bright teal so it pops against the dark hero.
   Hover follows the existing plugin pattern: just darken bg + border. */
.ppq-upgrade-cta.button.button-primary {
	background: #14b8a6;
	border-color: #0d9488;
	color: #fff;
	padding: 12px 36px;
	height: auto;
	font-size: 17px;
	line-height: 1.4;
	font-weight: 600;
	text-shadow: none;
	box-shadow: 0 4px 12px rgba(20, 184, 166, 0.35);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border-radius: 6px;
}

.ppq-upgrade-cta.button.button-primary:hover {
	background: #0d9488;
	border-color: #0d9488;
	color: #fff;
}

.ppq-upgrade-cta.button.button-primary:focus {
	background: #0d9488;
	border-color: #0d9488;
	color: #fff;
	box-shadow: 0 0 0 1px #fff, 0 0 0 3px #0d9488;
}

.ppq-upgrade-cta-arrow {
	font-size: 18px;
	line-height: 1;
}

/* Mascot circle — wrapper is clipped to a circle and the image
   fills it. Image bg (white) matches wrapper bg so the squirrel
   appears centered in a clean white disk. Outer ring shadow gives
   the soft halo on the dark hero. */
.ppq-upgrade-hero-mascot-wrap {
	width: 220px;
	height: 220px;
	flex-shrink: 0;
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: 50%;
	overflow: hidden;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 0 6px rgba(255, 255, 255, 0.15);
}

.ppq-upgrade-hero-mascot {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

/* =============================================================
   Section headers (shared by Tiers + Comparison)
   ============================================================= */

.ppq-upgrade-section-header {
	text-align: center;
	padding-top: 16px;
	margin-bottom: 36px;
}

.ppq-upgrade-section-header h2 {
	margin: 0 0 14px;
	font-size: 26px;
	font-weight: 700;
	color: #1d2327;
	line-height: 1.25;
}

.ppq-upgrade-section-header p {
	margin: 0;
	font-size: 15px;
	color: #50575e;
}

/* =============================================================
   Tier cards — three columns, middle one (School) is featured.
   ============================================================= */

.ppq-upgrade-tier-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	align-items: stretch;
	padding-top: 16px;
}

.ppq-upgrade-tier-card {
	position: relative;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 32px 28px 28px;
	display: flex;
	flex-direction: column;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ppq-upgrade-tier-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);
}

.ppq-upgrade-tier-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 6px;
	border-radius: 12px 12px 0 0;
	background: #c3c4c7;
}

.ppq-upgrade-tier-card.ppq-upgrade-tier-educator::before {
	background: linear-gradient(90deg, #2271b1, #3b82f6);
}

.ppq-upgrade-tier-card.ppq-upgrade-tier-school::before {
	background: linear-gradient(90deg, #14b8a6, #0d9488);
}

.ppq-upgrade-tier-card.ppq-upgrade-tier-enterprise::before {
	background: linear-gradient(90deg, #7c3aed, #9333ea);
}

.ppq-upgrade-tier-card.is-featured {
	border-color: #14b8a6;
	border-width: 2px;
	box-shadow: 0 8px 24px rgba(20, 184, 166, 0.18);
	transform: translateY(-8px);
}

.ppq-upgrade-tier-card.is-featured:hover {
	transform: translateY(-10px);
	box-shadow: 0 12px 30px rgba(20, 184, 166, 0.25);
}

.ppq-upgrade-tier-badge {
	position: absolute;
	top: -14px;
	left: 50%;
	transform: translateX(-50%);
	background: #0f766e;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 6px 14px;
	border-radius: 999px;
	box-shadow: 0 3px 8px rgba(15, 118, 110, 0.35);
	white-space: nowrap;
}

.ppq-upgrade-tier-name {
	margin: 0 0 6px;
	font-size: 22px;
	font-weight: 700;
	color: #0f172a;
}

.ppq-upgrade-tier-tagline {
	margin: 0 0 16px;
	font-size: 14px;
	font-weight: 500;
	color: #0f766e;
}

.ppq-upgrade-tier-card.ppq-upgrade-tier-educator .ppq-upgrade-tier-tagline {
	color: #2271b1;
}

.ppq-upgrade-tier-card.ppq-upgrade-tier-enterprise .ppq-upgrade-tier-tagline {
	color: #7c3aed;
}

.ppq-upgrade-tier-description {
	margin: 0 0 20px;
	font-size: 14px;
	line-height: 1.55;
	color: #475569;
}

.ppq-upgrade-tier-highlights {
	list-style: none;
	padding: 0;
	margin: 0 0 24px;
	flex-grow: 1;
}

.ppq-upgrade-tier-highlights li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 14px;
	line-height: 1.5;
	color: #1e293b;
	padding: 6px 0;
	border-bottom: 1px solid #f1f5f9;
}

.ppq-upgrade-tier-highlights li:last-child {
	border-bottom: none;
}

.ppq-upgrade-tier-check {
	color: #14b8a6;
	font-weight: 700;
	font-size: 14px;
	line-height: 1.5;
	flex-shrink: 0;
}

.ppq-upgrade-tier-card.ppq-upgrade-tier-educator .ppq-upgrade-tier-check {
	color: #2271b1;
}

.ppq-upgrade-tier-card.ppq-upgrade-tier-enterprise .ppq-upgrade-tier-check {
	color: #7c3aed;
}

.ppq-upgrade-tier-link.button {
	align-self: stretch;
	text-align: center;
	height: auto;
	padding: 14px 20px;
	font-size: 16px;
	font-weight: 600;
	border-radius: 6px;
	line-height: 1.2;
}

.ppq-upgrade-tier-link.button.button-secondary:focus {
	box-shadow: 0 0 0 1px #fff, 0 0 0 3px #2271b1;
}

.ppq-upgrade-tier-link.button.button-primary {
	background: #14b8a6;
	border-color: #0d9488;
	color: #fff;
	text-shadow: none;
	box-shadow: none;
}

.ppq-upgrade-tier-link.button.button-primary:hover {
	background: #0d9488;
	border-color: #0d9488;
	color: #fff;
}

.ppq-upgrade-tier-link.button.button-primary:focus {
	background: #0d9488;
	border-color: #0d9488;
	color: #fff;
	box-shadow: 0 0 0 1px #fff, 0 0 0 3px #0d9488;
}

/* =============================================================
   Narrow sections — the comparison table and footer CTA are
   centered and constrained to 900px so they read like body
   copy rather than full-bleed marketing tiles.
   ============================================================= */

.ppq-upgrade-comparison,
.ppq-upgrade-footer-cta {
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
}

/* =============================================================
   Comparison table
   ============================================================= */

.ppq-upgrade-table-scroller {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.ppq-upgrade-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
}

.ppq-upgrade-table thead th {
	background: #f8fafc;
	border-bottom: 2px solid #e2e8f0;
	color: #0f172a;
	font-weight: 600;
	font-size: 14px;
	text-align: center;
	padding: 18px 16px;
	vertical-align: middle;
}

.ppq-upgrade-table thead th.ppq-upgrade-col-feature {
	text-align: left;
	min-width: 280px;
}

.ppq-upgrade-table thead th.ppq-upgrade-col-tier {
	min-width: 110px;
}

.ppq-upgrade-table thead th.ppq-upgrade-col-school {
	background: #ecfdf5;
	color: #0f766e;
	position: relative;
}

.ppq-upgrade-col-name {
	display: block;
	font-size: 15px;
}

.ppq-upgrade-col-pill {
	display: inline-block;
	margin-top: 4px;
	background: #0f766e;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 2px 8px;
	border-radius: 999px;
}

.ppq-upgrade-table tbody td,
.ppq-upgrade-table tbody th {
	padding: 12px 16px;
	border-bottom: 1px solid #f1f5f9;
	font-size: 14px;
	color: #1e293b;
	vertical-align: middle;
	background: transparent;
}

/* Row-header cells (`<th scope="row">`) match the visual weight of
   regular data cells — the scope attribute is for screen readers, not
   a cue to bold the text. */
.ppq-upgrade-cell-label {
	text-align: left;
	font-weight: 400;
	color: #1e293b;
}

.ppq-upgrade-cell {
	text-align: center;
}

.ppq-upgrade-table tbody td.ppq-upgrade-cell-school {
	background: #f0fdfa;
}

.ppq-upgrade-category-row th {
	background: #f8fafc;
	color: #475569;
	text-align: left;
	padding: 10px 16px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	border-top: 1px solid #e2e8f0;
	border-bottom: 1px solid #e2e8f0;
}

.ppq-upgrade-category-row th.ppq-upgrade-cell-school {
	background: #f8fafc;
}

.ppq-upgrade-cell-yes {
	color: #14b8a6;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
}

.ppq-upgrade-cell-no {
	color: #64748b;
	font-size: 18px;
	line-height: 1;
}

.ppq-upgrade-cell-note {
	color: #1e293b;
	font-size: 13px;
	font-weight: 600;
}

/* =============================================================
   Footer CTA — soft yellow card with celebrating mascot in a
   circle. Calls out the 14-day money-back guarantee. Uses
   box-sizing: border-box so the section's outer width matches
   the comparison table's outer width (both end at 900px).
   ============================================================= */

.ppq-upgrade-footer-cta {
	box-sizing: border-box;
	background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
	border: 1px solid #bfdbfe;
	border-radius: 12px;
	padding: 32px 36px;
	display: flex;
	align-items: center;
	gap: 28px;
	box-shadow: 0 4px 16px rgba(59, 130, 246, 0.10);
}

.ppq-upgrade-footer-mascot-wrap {
	width: 140px;
	height: 140px;
	flex-shrink: 0;
	background: #fff;
	border-radius: 50%;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2), 0 0 0 6px rgba(255, 255, 255, 0.7);
}

.ppq-upgrade-footer-mascot {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.ppq-upgrade-footer-content {
	flex: 1;
	min-width: 0;
}

.ppq-upgrade-footer-cta h2 {
	font-size: 24px;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 10px;
	line-height: 1.25;
}

.ppq-upgrade-footer-cta p {
	font-size: 15px;
	line-height: 1.6;
	color: #334155;
	margin: 0 0 20px;
}

.ppq-upgrade-footer-button.button.button-primary {
	background: #14b8a6;
	border-color: #0d9488;
	color: #fff;
	padding: 12px 32px;
	height: auto;
	font-size: 16px;
	font-weight: 600;
	text-shadow: none;
	box-shadow: 0 3px 8px rgba(20, 184, 166, 0.3);
	border-radius: 6px;
	line-height: 1.4;
}

.ppq-upgrade-footer-button.button.button-primary:hover {
	background: #0d9488;
	border-color: #0d9488;
	color: #fff;
}

.ppq-upgrade-footer-button.button.button-primary:focus {
	background: #0d9488;
	border-color: #0d9488;
	color: #fff;
	box-shadow: 0 0 0 1px #fff, 0 0 0 3px #0d9488;
}

/* =============================================================
   Sticky purchase bar — pinned to bottom of viewport. Uses the
   brand teal so it reads as a marketing surface rather than an
   extension of the dark WordPress admin chrome. Inner content
   is constrained to 900px to match the body sections above.
   ============================================================= */

.ppq-upgrade-sticky-bar {
	position: fixed;
	bottom: 0;
	left: 160px; /* WP collapsed admin menu */
	right: 0;
	background: #0d9488;
	color: #fff;
	border-top: 4px solid #5eead4;
	box-shadow: 0 -4px 16px rgba(13, 148, 136, 0.3);
	z-index: 9999;
}

@media screen and (min-width: 961px) {
	.ppq-upgrade-sticky-bar {
		left: 160px;
	}
}

.folded .ppq-upgrade-sticky-bar {
	left: 36px;
}

.auto-fold .ppq-upgrade-sticky-bar {
	left: 36px;
}

@media screen and (min-width: 961px) {
	.auto-fold .ppq-upgrade-sticky-bar {
		left: 160px;
	}
}

@media screen and (max-width: 782px) {
	.ppq-upgrade-sticky-bar {
		left: 0;
	}
}

.ppq-upgrade-sticky-bar-inner {
	max-width: 900px;
	margin: 0 auto;
	padding: 14px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.ppq-upgrade-sticky-bar-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.ppq-upgrade-sticky-bar-text strong {
	font-size: 22px;
	font-weight: 700;
	color: #fff;
	line-height: 1.3;
}

.ppq-upgrade-sticky-bar-text span {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.92);
}

/* Sticky bar CTA — inverted (white on teal) so the call to
   action remains visually dominant against the teal bar. */
.ppq-upgrade-sticky-bar-cta.button.button-primary {
	background: #fff;
	border-color: #fff;
	color: #0d9488;
	padding: 12px 36px;
	height: auto;
	font-size: 17px;
	font-weight: 700;
	text-shadow: none;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
	border-radius: 6px;
	flex-shrink: 0;
	line-height: 1.3;
}

.ppq-upgrade-sticky-bar-cta.button.button-primary:hover {
	background: #f1f5f9;
	border-color: #f1f5f9;
	color: #0f766e;
}

.ppq-upgrade-sticky-bar-cta.button.button-primary:focus {
	background: #f1f5f9;
	border-color: #f1f5f9;
	color: #0f766e;
	box-shadow: 0 0 0 1px #0d9488, 0 0 0 3px #fff;
}

/* =============================================================
   Responsive — stack hero, tier cards, footer CTA, sticky bar
   ============================================================= */

@media screen and (max-width: 1024px) {
	.ppq-upgrade-tier-cards {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.ppq-upgrade-tier-card.is-featured {
		transform: none;
	}

	.ppq-upgrade-tier-card.is-featured:hover {
		transform: translateY(-2px);
	}
}

@media screen and (max-width: 782px) {
	.ppq-upgrade-page {
		padding-bottom: 140px;
	}

	.ppq-upgrade-page section {
		margin-bottom: 40px;
	}

	.ppq-upgrade-hero {
		flex-direction: column;
		text-align: center;
		padding: 32px 24px;
		gap: 20px;
	}

	.ppq-upgrade-hero-content {
		order: 2;
	}

	.ppq-upgrade-hero-mascot-wrap {
		order: 1;
		width: 160px;
		height: 160px;
	}

	.ppq-upgrade-hero-logo {
		margin-left: auto;
		margin-right: auto;
	}

	.ppq-upgrade-hero h1 {
		font-size: 26px;
	}

	.ppq-upgrade-intro {
		font-size: 15px;
	}

	.ppq-upgrade-section-header h2 {
		font-size: 22px;
	}

	.ppq-upgrade-table thead th.ppq-upgrade-col-feature {
		min-width: 200px;
	}

	.ppq-upgrade-footer-cta {
		flex-direction: column;
		text-align: center;
		padding: 28px 24px;
	}

	.ppq-upgrade-footer-mascot-wrap {
		width: 120px;
		height: 120px;
	}

	.ppq-upgrade-footer-cta p {
		margin-left: auto;
		margin-right: auto;
	}

	.ppq-upgrade-sticky-bar-inner {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		padding: 12px 16px;
	}

	.ppq-upgrade-sticky-bar-text {
		text-align: center;
	}

	.ppq-upgrade-sticky-bar-cta.button.button-primary {
		width: 100%;
	}
}

/* =============================================================
   Reduced motion — strip transitions, transforms, and the
   featured-card lift for users who prefer reduced motion.
   ============================================================= */

@media (prefers-reduced-motion: reduce) {
	.ppq-upgrade-tier-card,
	.ppq-upgrade-tier-card.is-featured,
	.ppq-upgrade-tier-card.is-featured:hover,
	.ppq-upgrade-tier-card:hover {
		transform: none;
		transition: none;
	}
}
