/**
 * Prudence Flag Explorer — styles
 * All rules scoped under .pms-flag-explorer or .pms-flag-checklist so this
 * never leaks into or fights Avada/Fusion Builder's own CSS.
 *
 * THEME NOTE — v1.0.4
 * Palette rebuilt from an actual screenshot of the live FSD page (PDF
 * export), not a guess:
 *   - Hero band and footer are a solid dark navy — confirmed #262943.
 *   - Body sections are white, headings a darker navy, body copy neutral
 *     grey.
 *   - The site's accent is a TEAL/CYAN blue (the logo mark, and the small
 *     vertical divider bars in the "Experienced Team / Tech-First
 *     Solutions / 24/7 Support / Reliable Service" stat row) — there is
 *     no amber/gold anywhere on the page. Earlier versions of this
 *     component used amber; that was a guess and it was wrong.
 *   - The primary CTA convention on the site (the header's "Let's Talk"
 *     button) is a solid navy pill with white text — not a colour-fill
 *     button. The explorer's CTA now follows that same pattern instead
 *     of a gold-fill button.
 *
 * The teal hex below is read off a compressed PDF render, so treat it as
 * a close estimate rather than a pixel-sampled value — if it's slightly
 * off next to the live site, Inspect → Computed → `color` on the logo
 * mark or a stat-row divider bar will give the exact value to drop in.
 */

.pms-flag-explorer,
.pms-flag-checklist {
	/* Confirmed from the live site (hero band / footer background) */
	--pms-card-navy: #262943;
	--pms-page-bg: #ffffff;

	/* Confirmed accent family — teal, not amber */
	--pms-teal: #2cafc9;
	--pms-teal-dark: #1f8fa6;

	/* Close matches from the screenshot */
	--pms-heading: #1b2440;      /* dark navy heading tone on white sections */
	--pms-body-text: #6b7280;    /* neutral grey body copy */
	--pms-border: #e5e7eb;       /* light hairline border on white sections */
	--pms-port: #d2453a;         /* semantic only — tanker / restricted flag, not from the site */

	--pms-radius: 20px;

	box-sizing: border-box;
	font-family: inherit;   /* inherit the page's actual body font instead of guessing one */
	color: var(--pms-body-text);
	max-width: 1200px;
	margin: 0 auto;
}

.pms-flag-explorer *,
.pms-flag-checklist * {
	box-sizing: border-box;
	font-family: inherit;
}

/* ---------- Controls ---------- */

.pms-fx-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
	background: var(--pms-page-bg);
	border: 1px solid var(--pms-border);
	border-radius: var(--pms-radius);
	padding: 16px 20px;
	margin-bottom: 20px;
	position: sticky;
	top: 12px;
	z-index: 10;
	box-shadow: 0 2px 10px rgba(20, 30, 60, 0.06);
}

.pms-fx-search {
	position: relative;
	flex: 1 1 260px;
	min-width: 220px;
	display: flex;
	align-items: center;
}

.pms-fx-search svg {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--pms-teal);
	pointer-events: none;
	z-index: 1;
}

.pms-fx-search input {
	width: 100%;
	background: #fff;
	border: 1px solid var(--pms-border);
	border-radius: 999px;
	color: var(--pms-heading);
	font-size: 0.95rem;
	line-height: 1.4;
	padding: 10px 14px 10px 40px !important;
	box-sizing: border-box !important;
	outline: none;
	transition: border-color 0.15s ease;
}

.pms-fx-search input::placeholder {
	color: #9aa3b2;
}

.pms-fx-search input:focus {
	border-color: var(--pms-teal);
	box-shadow: 0 0 0 2px rgba(44, 175, 201, 0.25);
}

.pms-fx-chips {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.pms-fx-chip {
	background: #f2f4f8;
	border: 1px solid var(--pms-border);
	color: var(--pms-heading);
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 7px 14px;
	border-radius: 999px;
	cursor: pointer;
	transition: all 0.15s ease;
}

.pms-fx-chip:hover {
	border-color: var(--pms-teal);
}

.pms-fx-chip:focus-visible {
	outline: 2px solid var(--pms-teal);
	outline-offset: 2px;
}

.pms-fx-chip.is-active {
	background: var(--pms-teal);
	border-color: var(--pms-teal);
	color: #fff;
	font-weight: 600;
}

.pms-fx-count {
	font-size: 0.8125rem;
	color: var(--pms-body-text);
	letter-spacing: 0.03em;
	margin-bottom: 14px;
	min-height: 1.2em;
}

/* ---------- Grid ---------- */

.pms-fx-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 14px;
}

.pms-fx-card {
	background: #262943 !important;
	border: 1px solid var(--pms-card-navy);
	border-radius: 20px !important;
	padding: 16px 18px;
	text-align: left;
	cursor: pointer;
	color: #dfe3ee;
	font-family: inherit;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pms-fx-card:hover,
.pms-fx-card:focus-visible {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(20, 25, 50, 0.25);
}

.pms-fx-card:focus-visible {
	outline: 2px solid var(--pms-teal);
	outline-offset: 2px;
}

.pms-fx-card-name {
	font-size: 0.98rem;
	font-weight: 600;
	color: #fff;
	margin: 0 0 8px;
}

.pms-fx-card-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.pms-fx-tag {
	font-size: 0.6875rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 3px 9px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #cfd5e6;
}

.pms-fx-tag-tanker {
	border-color: var(--pms-port);
	color: #ff8a80;
}

.pms-fx-section-tag {
	display: inline-block;
	font-size: 0.6875rem;
	letter-spacing: 0.06em;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 3px;
	background: var(--pms-teal);
	color: #fff;
	margin-right: 10px;
	vertical-align: middle;
}

/* "Show all N flags" — appears only in the untouched default view once
   the flag count exceeds the initial cap; search or filtering bypasses
   it entirely. Styled as a quiet text link, not a competing button, so
   it doesn't outrank the card grid or the search field. */
.pms-fx-showmore {
	display: block;
	margin: 4px auto 0;
	background: transparent;
	border: none;
	color: var(--pms-teal-dark);
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	padding: 10px 16px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.pms-fx-showmore:hover,
.pms-fx-showmore:focus-visible {
	color: var(--pms-card-navy);
	outline: none;
}

.pms-fx-noresults {
	background: #f7f8fb;
	border: 1px dashed var(--pms-border);
	border-radius: var(--pms-radius);
	padding: 24px;
	text-align: center;
	color: var(--pms-body-text);
}

.pms-fx-noresults a {
	color: var(--pms-teal-dark);
	font-weight: 600;
}

.pms-fx-empty {
	color: var(--pms-port);
}

/* ---------- Detail panel ---------- */

.pms-fx-overlay {
	position: fixed;
	inset: 0;
	background: rgba(20, 25, 45, 0.55);
	z-index: 999;
}

.pms-fx-panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(560px, 100%);
	background: #ffffff;
	border-left: 1px solid var(--pms-border);
	z-index: 1000;
	overflow-y: auto;
	padding: 32px 28px 40px;
	box-shadow: -12px 0 30px rgba(20, 25, 50, 0.15);
}

.pms-fx-panel-close {
	position: absolute;
	top: 18px;
	right: 20px;
	background: #f2f4f8;
	border: 1px solid var(--pms-border);
	color: var(--pms-heading);
	width: 34px;
	height: 34px;
	border-radius: 50%;
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
}

.pms-fx-panel-close:hover,
.pms-fx-panel-close:focus-visible {
	border-color: var(--pms-teal);
	color: var(--pms-teal-dark);
	outline: none;
}

/* ---------- Flag detail content (shared: panel + inline shortcode) ---------- */

.pms-fx-flag-name {
	font-size: 1.6rem;
	color: var(--pms-heading);
	margin: 0 0 6px;
	padding-right: 40px;
}

.pms-fx-notes {
	background: #f7f8fb;
	border-left: 3px solid var(--pms-teal);
	border-radius: 0 12px 12px 0;
	padding: 14px 16px;
	margin: 16px 0;
}

.pms-fx-notes p {
	font-size: 0.9rem;
	line-height: 1.6;
	margin: 0 0 10px;
	color: var(--pms-body-text);
}

.pms-fx-notes p:last-child {
	margin-bottom: 0;
}

.pms-fx-section {
	margin: 22px 0;
	padding-top: 18px;
	border-top: 1px solid var(--pms-border);
}

.pms-fx-section:first-of-type {
	border-top: none;
	padding-top: 4px;
}

h3.pms-fx-section-label {
	color: #fff !important;
	background: var(--pms-card-navy);
	font-size: 0.95rem;
	font-weight: 600;
	margin: 0 0 10px;
	padding: 10px 14px;
	border-radius: 10px;
	display: flex;
	align-items: center;
}

.pms-fx-doclist {
	list-style: none;
	margin: 0;
	padding: 0;
}

.pms-fx-doclist li {
	font-size: 0.9rem;
	line-height: 1.5;
	padding: 7px 0 7px 22px;
	position: relative;
	color: var(--pms-body-text);
	border-bottom: 1px solid var(--pms-border);
}

.pms-fx-doclist li:last-child {
	border-bottom: none;
}

.pms-fx-doclist li::before {
	content: '';
	position: absolute;
	left: 2px;
	top: 15px;
	width: 6px;
	height: 6px;
	background: var(--pms-teal);
	border-radius: 1px;
	transform: rotate(45deg);
}

.pms-fx-panel-cta {
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--pms-border);
}

.pms-fx-panel-cta p {
	font-size: 0.85rem;
	color: var(--pms-body-text);
	margin: 0 0 14px;
}

/* CTA styled to match the site's own "Let's Talk" header button —
   solid navy pill, white text, rather than the earlier gold fill. */
a.pms-fx-cta-btn {
	display: table !important;
	margin-top: 40px !important;
	background: var(--pms-card-navy);
	color: #ffffff;
	font-weight: 700;
	font-size: 0.9rem;
	padding: 12px 26px;
	border-radius: 999px;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

a.pms-fx-cta-btn:hover,
a.pms-fx-cta-btn:focus-visible {
	background: var(--pms-teal-dark);
	transform: translateY(-1px);
	box-shadow: 0 8px 18px rgba(38, 41, 67, 0.3);
	color: #ffffff;
}

/* Inline single-flag shortcode variant — sits directly in page content */
.pms-flag-checklist {
	background: #ffffff;
	border: 1px solid var(--pms-border);
	border-radius: var(--pms-radius);
	padding: 28px 30px;
	box-shadow: 0 2px 10px rgba(20, 30, 60, 0.06);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
	.pms-fx-card,
	a.pms-fx-cta-btn {
		transition: none !important;
	}
}

/* ---------- Responsive ---------- */

@media (max-width: 767px) {
	.pms-fx-controls {
		position: static;
		flex-direction: column;
		align-items: stretch;
	}

	.pms-fx-panel {
		width: 100%;
	}

	.pms-flag-checklist {
		padding: 20px;
	}
}
