/* Shared components. */

/* Cards */
.gpp-card { background: #fff; border: 1px solid var(--gpp-border); border-radius: var(--gpp-r-card); box-shadow: var(--gpp-shadow-sm); }

/* Forms */
.gpp-field { display: flex; flex-direction: column; gap: 6px; }
.gpp-field__label { font-size: 14px; font-weight: 600; color: var(--gpp-ink-2); }
.gpp-field__hint { font-size: 12px; color: var(--gpp-muted); }
.gpp-fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gpp-fieldset legend { padding: 0; margin-bottom: 6px; }
.gpp-input {
	width: 100%; min-height: 44px; padding: 0 12px;
	border: 1px solid var(--gpp-border-strong); border-radius: var(--gpp-r-input);
	background: #fff; color: var(--gpp-ink);
	font: 400 15px/1.4 var(--gpp-font);
	transition: border-color .15s, box-shadow .15s;
}
textarea.gpp-input { padding: 10px 12px; min-height: 120px; resize: vertical; }
select.gpp-input {
	appearance: none; -webkit-appearance: none; padding-right: 36px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235B6785' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 12px center;
}
.gpp-input:focus { outline: none; border-color: var(--gpp-primary); box-shadow: var(--gpp-focus); }
.gpp-input::placeholder { color: #8A94AD; }
.gpp-input:user-invalid { border-color: #DC2626; }
.gpp-check { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 15px; cursor: pointer; }
.gpp-check--top { align-items: flex-start; }
.gpp-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--gpp-primary); flex: none; }
.gpp-check--top input { margin-top: 3px; }
.gpp-range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; color: var(--gpp-muted); }
.gpp-password { position: relative; display: block; }
.gpp-password .gpp-input { padding-right: 72px; }
.gpp-password__toggle {
	position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
	min-height: 32px; padding: 0 10px; border: 0; border-radius: 6px; background: var(--gpp-bg-muted);
	font: 600 13px var(--gpp-font); color: var(--gpp-ink-2); cursor: pointer;
}
.gpp-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Chips & badges */
.gpp-chip {
	display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
	background: var(--gpp-primary-50); color: var(--gpp-primary-600);
	font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.5;
}
a.gpp-chip:hover { text-decoration: none; background: #DCE5FF; }
.gpp-chip--gray { background: var(--gpp-gray-bg); color: var(--gpp-gray); }
.gpp-chip--bad { background: var(--gpp-bad-bg); color: var(--gpp-bad); }
.gpp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gpp-chips a { display: inline-flex; padding: 3px 10px; border-radius: 999px; background: var(--gpp-gray-bg); color: var(--gpp-gray); font-size: 13px; }

.gpp-badge {
	display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
	font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.5;
}
.gpp-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.gpp-badge--ok { background: var(--gpp-ok-bg); color: var(--gpp-ok); }
.gpp-badge--warn { background: var(--gpp-warn-bg); color: var(--gpp-warn); }
.gpp-badge--info { background: var(--gpp-info-bg); color: var(--gpp-info); }
.gpp-badge--bad { background: var(--gpp-bad-bg); color: var(--gpp-bad); }
.gpp-badge--gray { background: var(--gpp-gray-bg); color: var(--gpp-gray); }
.gpp-badge--purple { background: var(--gpp-accent-50); color: #5B3FD6; }

/* Alerts */
.gpp-alert { padding: 12px 16px; border-radius: 12px; font-size: 15px; margin-bottom: 20px; }
.gpp-alert--info { background: var(--gpp-info-bg); color: var(--gpp-info); }
.gpp-alert--success { background: var(--gpp-ok-bg); color: var(--gpp-ok); }
.gpp-alert--error { background: var(--gpp-bad-bg); color: var(--gpp-bad); }
.gpp-alert--warn { background: var(--gpp-warn-bg); color: var(--gpp-warn); }

/* Icon tiles, avatars, thumbnails */
.gpp-ico {
	width: 44px; height: 44px; flex: none; border-radius: 12px;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--gpp-primary-50); color: var(--gpp-primary);
}
.gpp-ico--sm { width: 36px; height: 36px; border-radius: 10px; }
.gpp-avatar {
	width: 40px; height: 40px; flex: none; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: #DCE5FF; color: var(--gpp-primary-600); font-weight: 700; font-size: 14px;
}
.gpp-thumb {
	display: flex; align-items: center; justify-content: center; flex: none;
	background: #E9EEF8; color: var(--gpp-primary-600);
	font-weight: 800; letter-spacing: -0.02em; object-fit: cover;
}
.gpp-thumb--sm { width: 52px; height: 52px; border-radius: 12px; font-size: 18px; }
.gpp-thumb--round { width: 40px; height: 40px; border-radius: 50%; font-size: 14px; }
.gpp-thumb--row { width: 120px; height: 96px; border-radius: 10px; font-size: 26px; }
.gpp-thumb--lg { width: 150px; height: 120px; border-radius: 12px; font-size: 32px; }
.gpp-thumb--cover { width: 100%; height: 150px; font-size: 32px; border-radius: 0; }

/* Metrics */
.gpp-metrics { display: flex; flex-wrap: wrap; gap: 8px; }
.gpp-metrics > div { padding: 6px 12px; border: 1px solid var(--gpp-border); border-radius: 10px; background: #fff; min-width: 80px; }
.gpp-metrics dt { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--gpp-muted); }
.gpp-metrics dd { font-size: 17px; font-weight: 700; }
.gpp-metrics--3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gpp-metrics--3 > div { min-width: 0; padding: 6px 10px; }
.gpp-metrics--lg { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.gpp-metrics--lg > div { padding: 12px 16px; border-radius: 12px; }
.gpp-metrics--lg dd { font-size: 24px; letter-spacing: -0.02em; }
.gpp-metrics dd.gpp-metrics__note { font-size: 11px; font-weight: 500; color: var(--gpp-muted); letter-spacing: 0; }

.gpp-price { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }

/* Empty state */
.gpp-empty { padding: 56px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.gpp-empty__icon { width: 60px; height: 60px; border-radius: 50%; background: var(--gpp-primary-50); color: var(--gpp-primary); display: flex; align-items: center; justify-content: center; }

/* Pagination */
.gpp-pagination, .gpp-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 24px; }
.gpp-pagination a, .gpp-pagination span, .gpp-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px;
	border: 1px solid var(--gpp-border-strong); border-radius: 10px; background: #fff; color: var(--gpp-ink); font-weight: 600; font-size: 14px;
}
.gpp-pagination a:hover { border-color: var(--gpp-primary); color: var(--gpp-primary); text-decoration: none; }
.gpp-pagination .is-current, .gpp-pagination .current { background: var(--gpp-primary); border-color: var(--gpp-primary); color: #fff; }
.gpp-pagination .is-gap, .gpp-pagination .dots { border: 0; background: none; min-width: 20px; }
.gpp-pagination .screen-reader-text + .nav-links { margin-top: 0; }

/* Breadcrumbs */
.gpp-breadcrumbs ol { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--gpp-muted); }
.gpp-breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: #9AA4BC; }

/* Accordion (details) */
.gpp-accordion details, .wp-block-details { border-bottom: 1px solid var(--gpp-border); padding: 18px 0; }
.gpp-accordion summary, .wp-block-details summary {
	cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px;
	font-weight: 600; font-size: 17px; color: var(--gpp-ink);
}
.gpp-accordion summary::-webkit-details-marker, .wp-block-details summary::-webkit-details-marker { display: none; }
.gpp-accordion summary::after, .wp-block-details summary::after { content: "+"; color: var(--gpp-primary); font-size: 22px; line-height: 1; flex: none; }
.gpp-accordion details[open] summary::after, .wp-block-details[open] summary::after { content: "–"; }
.gpp-accordion details p, .wp-block-details p { margin-top: 10px; color: var(--gpp-muted); }

/* CTA band */
.gpp-cta {
	background: var(--gpp-navy-800); color: #fff; border-radius: var(--gpp-r-lg);
	padding: 44px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
}
.gpp-cta > div { flex: 1 1 420px; display: flex; flex-direction: column; gap: 10px; }
.gpp-cta h2 { color: #fff; }
.gpp-cta p { color: #C9D3EA; font-size: 17px; }
.gpp-cta--compact { padding: 24px 28px; margin-top: 40px; font-size: 18px; }
@media (max-width: 600px) { .gpp-cta { padding: 28px 22px; } }

/* Checklists */
.gpp-checklist, .gpp-plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gpp-checklist li { display: flex; gap: 10px; }
.gpp-checklist li::before { content: "✓"; color: #16A34A; font-weight: 700; }

/* Not found */
.gpp-notfound { padding: 56px var(--gpp-gutter) 80px; }
.gpp-notfound__card { padding: 64px 24px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.gpp-notfound__code { font-size: clamp(80px, 14vw, 128px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: #DCE5FF; }
.gpp-notfound__card > .gpp-muted { max-width: 460px; }
.gpp-notfound__search { display: flex; gap: 8px; width: 100%; max-width: 480px; }
.gpp-notfound__links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Tick list item */
.gpp-tick { display: inline-flex; align-items: center; gap: 6px; }
.gpp-tick::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #16A34A; flex: none; }

/* Flash toast printed by the marketplace plugin on public pages. */
.gpp-toast { position: fixed; z-index: 200; left: 50%; bottom: 24px; transform: translateX(-50%); width: min(calc(100% - 32px), 480px); display: flex; align-items: center; gap: 12px; box-shadow: var(--gpp-shadow-lg, 0 12px 32px rgba(15, 23, 42, .18)); }
.gpp-toast .gpp-alert { flex: 1; margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gpp-toast__close { background: none; border: 0; font: inherit; font-size: 20px; line-height: 1; color: inherit; cursor: pointer; padding: 0 4px; }

/* Trust badges (verified owner, Google data) */
.gpp-trust { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.gpp-trust .gpp-badge::before, .gpp-gtraffic__head .gpp-badge::before { display: none; }
.gpp-trust .gpp-badge svg, .gpp-gtraffic__head .gpp-badge svg { flex: none; }
.gpp-detail__headtext .gpp-trust { margin-top: -4px; }

/* "Traffic from Google" block */
.gpp-gtraffic__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gpp-gtraffic__groups { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.gpp-gtraffic__label { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--gpp-muted); }
.gpp-metrics--4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gpp-metrics--4 > div { min-width: 0; padding: 8px 12px; }

/* Organic traffic by source */
.gpp-sources__grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.gpp-sources__item { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--gpp-border); border-radius: 12px; background: #fff; min-width: 0; }
.gpp-sources__item.is-google { border-color: color-mix(in srgb, var(--gpp-primary) 35%, var(--gpp-border)); background: var(--gpp-primary-50, #EEF3FF); }
.gpp-sources__name { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--gpp-muted); }
.gpp-sources__value { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.gpp-sources__item.is-empty .gpp-sources__value { color: var(--gpp-muted); font-weight: 600; }
.gpp-sources__metric { font-size: 13px; color: var(--gpp-ink-2, var(--gpp-muted)); }
.gpp-sources__note { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--gpp-muted); }
.gpp-sources__item.is-google .gpp-sources__note { color: var(--gpp-ok); font-weight: 600; }
