/*
 * Intimacy and Commitment Profile. Loaded after TPX's tpx-wizard.css, which
 * already styles the card, header, progress, Likert circles, pills, image
 * picker and buttons. This file only adds what the profile needs, using the
 * same --tpx-wiz-* tokens, plus Step 3's Drive (blue) and Language (teal)
 * ramps so Best Match reads like Step 3. Light only, as every TPX page.
 */

.icp-app {
	--icp-drive: #2a78d6;
	--icp-lang: #009362;
	--icp-commit: #6b0f3f;
	--icp-track: #f3e7ed;
}

.icp-profile-app,
.is-layout-constrained > .icp-profile-app {
	max-width: 1040px;
	width: auto;
}

.icp-wa:empty {
	display: none;
}

.icp-loading {
	min-height: 240px;
}

.icp-missing > label {
	color: var(--tpx-wiz-primary);
}

.icp-missing .tpx-choice-group,
.icp-missing input,
.icp-missing textarea {
	outline: 2px solid var(--tpx-wiz-accent);
	outline-offset: 4px;
	border-radius: 12px;
}

.icp-consent {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	font-weight: 600;
	font-size: 0.95rem;
}

.icp-consent input {
	width: 20px;
	height: 20px;
	margin-top: 2px;
	flex: none;
	accent-color: var(--tpx-wiz-primary);
}

.icp-image-caption {
	display: block;
	font-size: 0.78rem;
	font-weight: 600;
	text-align: center;
	color: var(--tpx-wiz-text-muted);
	margin-top: 0.3rem;
}

.icp-tie-group {
	flex-wrap: wrap;
	gap: 0.5rem;
}

.icp-tie-count {
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--tpx-wiz-primary-dark);
	margin: 0.9rem 0 0;
}

.icp-button,
a.tpx-wizard-next {
	display: inline-block;
	text-decoration: none !important;
	color: #fff !important;
}

.icp-done-actions {
	margin: 1rem 0 1.6rem;
}

.icp-wa {
	border-top: 1px solid var(--tpx-wiz-border);
	padding-top: 1.1rem;
	margin-top: 1.4rem;
}

.icp-wa-title {
	font-weight: 700;
	margin: 0 0 0.6rem;
}

.icp-wa-button {
	display: inline-block;
	background: #1fa855;
	color: #fff !important;
	font-weight: 700;
	border-radius: 999px;
	padding: 0.7rem 1.4rem;
	text-decoration: none !important;
}

/* --- Profile ---------------------------------------------------------- */

.icp-title {
	font-size: clamp(1.5rem, 3vw, 2rem);
	line-height: 1.15;
	margin-bottom: 1.2rem;
}

.icp-test-badge {
	display: inline-block;
	background: #c62828;
	color: #fff;
	font-weight: 700;
	font-size: 0.8rem;
	border-radius: 999px;
	padding: 0.2rem 0.8rem;
	margin: 0 0 1rem;
}

.icp-grid2 {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 1.2rem;
	align-items: start;
}

.icp-grid2 > * {
	min-width: 0;
}

.icp-card {
	border: 1px solid var(--tpx-wiz-border);
	border-radius: var(--tpx-wiz-radius);
	padding: clamp(1rem, 2.4vw, 1.6rem);
	background: var(--tpx-wiz-surface);
	margin-bottom: 1.2rem;
}

.icp-grid2 > .icp-card {
	margin-bottom: 0;
	height: 100%;
}

.icp-grid2 + .icp-card {
	margin-top: 1.2rem;
}

.icp-inner {
	gap: 1.6rem;
}

.icp-card-title {
	font-size: 1.12rem;
	margin: 0 0 0.3rem;
	color: var(--tpx-wiz-primary-dark);
}

.icp-card-sub,
.icp-note {
	font-size: 0.86rem;
	color: var(--tpx-wiz-text-muted);
	margin: 0 0 0.9rem;
	max-width: 70ch;
}

.icp-sub {
	font-size: 0.98rem;
	margin: 1.1rem 0 0.5rem;
}

.icp-inner > div > .icp-sub:first-child {
	margin-top: 0;
}

.icp-dial {
	display: block;
	width: 100%;
	max-width: 260px;
	margin: 0 auto 0.3rem;
}

.icp-dial-arc {
	fill: none;
	stroke-width: 22;
}

.icp-dial-arc.z0 { stroke: #f2cfe0; }
.icp-dial-arc.z1 { stroke: #d679a8; }
.icp-dial-arc.z2 { stroke: var(--tpx-wiz-primary); }

.icp-dial-needle {
	stroke: var(--tpx-wiz-text);
	stroke-width: 5;
	stroke-linecap: round;
}

.icp-dial-hub {
	fill: var(--tpx-wiz-text);
}

.icp-big-wrap {
	text-align: center;
	margin-bottom: 0.8rem;
}

.icp-big {
	display: block;
	font-size: clamp(2.6rem, 6vw, 3.6rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
}

.icp-tag {
	display: inline-block;
	margin-top: 0.4rem;
	background: var(--tpx-wiz-primary-light);
	color: var(--tpx-wiz-primary-dark);
	font-weight: 700;
	font-size: 0.82rem;
	border-radius: 999px;
	padding: 0.2rem 0.8rem;
}

.icp-na {
	display: block;
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--tpx-wiz-text-muted);
	padding: 2.2rem 0 1rem;
}

.icp-row {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(4rem, 6fr) 2.8rem;
	gap: 0.6rem;
	align-items: center;
	font-size: 0.88rem;
	padding: 0.18rem 0;
}

.icp-row-label {
	overflow-wrap: normal;
	word-break: normal;
	hyphens: manual;
}

.icp-row.is-top .icp-row-label {
	font-weight: 700;
}

.icp-row-value {
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.icp-track {
	height: 12px;
	border-radius: 6px;
	background: var(--icp-track);
	overflow: hidden;
}

.icp-fill {
	height: 100%;
	border-radius: 6px;
	background: var(--tpx-wiz-primary);
}

.icp-fill.is-c { background: var(--icp-commit); }
.icp-fill.is-drive { background: var(--icp-drive); }
.icp-fill.is-lang { background: var(--icp-lang); }
.icp-fill.is-pop { background: var(--tpx-wiz-primary-dark); }

.icp-lean-track {
	position: relative;
	height: 22px;
	border-radius: 11px;
	background: var(--icp-track);
	overflow: hidden;
	margin: 0.5rem 0 0.3rem;
}

.icp-lean-zone {
	position: absolute;
	top: 0;
	bottom: 0;
}

.icp-lean-zone.z0 { background: #e6dbe0; }
.icp-lean-zone.is-i.z1 { background: rgba(173, 26, 102, 0.06); }
.icp-lean-zone.is-i.z2 { background: rgba(173, 26, 102, 0.1); }
.icp-lean-zone.is-i.z3 { background: rgba(173, 26, 102, 0.16); }
.icp-lean-zone.is-i.z4 { background: rgba(173, 26, 102, 0.24); }
.icp-lean-zone.is-c.z1 { background: rgba(107, 15, 63, 0.06); }
.icp-lean-zone.is-c.z2 { background: rgba(107, 15, 63, 0.1); }
.icp-lean-zone.is-c.z3 { background: rgba(107, 15, 63, 0.16); }
.icp-lean-zone.is-c.z4 { background: rgba(107, 15, 63, 0.24); }

.icp-lean-tick {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 1px;
	background: rgba(36, 27, 32, 0.3);
	z-index: 1;
}

.icp-lean-tick.is-mid {
	width: 2px;
	background: var(--tpx-wiz-text);
	transform: translateX(-50%);
}

.icp-lean-fill {
	position: absolute;
	top: 0;
	bottom: 0;
	opacity: 0.9;
	background: var(--tpx-wiz-primary);
}

.icp-lean-fill.is-c {
	background: var(--icp-commit);
}

.icp-lean-ends {
	display: flex;
	justify-content: space-between;
	font-size: 0.8rem;
	color: var(--tpx-wiz-text-muted);
}

.icp-top {
	margin: 0;
	padding-left: 1.3rem;
}

.icp-top li {
	padding: 0.15rem 0;
}

.icp-muted {
	color: var(--tpx-wiz-text-muted);
}

.icp-match {
	border: 1px solid var(--tpx-wiz-border);
	border-left: 6px solid var(--icp-drive);
	border-radius: 14px;
	padding: 0.9rem 1rem;
}

.icp-match.is-language {
	border-left-color: var(--icp-lang);
}

.icp-match-title {
	margin: 0 0 0.4rem;
	font-size: 1rem;
}

.icp-match-line {
	font-size: 0.9rem;
	margin: 0 0 0.35rem;
}

.icp-match-note {
	font-size: 0.82rem;
	color: var(--tpx-wiz-text-muted);
	margin: 0.3rem 0 0;
}

.icp-shape {
	margin: 0;
	max-width: 180px;
}

.icp-shape img {
	width: 100%;
	height: auto;
	display: block;
}

.icp-shape figcaption {
	font-weight: 700;
	margin-top: 0.3rem;
}

.icp-list {
	margin: 0;
	padding-left: 1.2rem;
}

.icp-said {
	margin: 0 0 0.6rem;
	white-space: pre-line;
}

.icp-reveal-btn {
	margin-top: 0.2rem;
}

.icp-reveal-wait {
	font-weight: 600;
	color: var(--tpx-wiz-primary-dark);
}

@media (max-width: 760px) {
	.icp-grid2 {
		grid-template-columns: minmax(0, 1fr);
	}
	.icp-profile-app {
		padding: 1.6rem 1rem 1.4rem;
	}
}

@media (max-width: 480px) {
	.tpx-wizard.icp-app {
		padding: 1.6rem 1rem 1.4rem;
	}
}

/* --- BLD-017 (v0.1.1) ------------------------------------------------- */

/* Readable in every visitor setting: these cards are always light, so tell
   the browser not to draw dark form controls or dark scroll bars on them. */
.icp-app,
.icp-landing {
	color-scheme: light;
}

/* Pages 5-7: the 1-10 circles spread evenly across the full row. Phones:
   two rows of five, still evenly spread, at a tappable size. */
.icp-app .tpx-choice-group-likert {
	display: grid;
	grid-template-columns: repeat(10, minmax(0, 1fr));
	justify-items: center;
	gap: 0.4rem;
	width: 100%;
}

@media (max-width: 480px) {
	.icp-app .tpx-choice-group-likert {
		grid-template-columns: repeat(5, minmax(0, 1fr));
		row-gap: 0.55rem;
	}
	.icp-app .tpx-choice-option-likert {
		width: 2.75rem;
		height: 2.75rem;
	}
}

.icp-page-note {
	margin: -0.2rem 0 1.1rem;
	padding: 0.7rem 0.9rem;
	border-radius: var(--tpx-wiz-radius-sm);
	background: var(--tpx-wiz-primary-light);
	color: var(--tpx-wiz-primary-dark);
	font-weight: 600;
	font-size: 0.92rem;
}

.icp-add-more {
	align-self: flex-start;
	margin-top: 0.2rem;
	background: transparent;
	border: 2px dashed var(--tpx-wiz-primary);
	color: var(--tpx-wiz-primary-dark);
	border-radius: 999px;
	padding: 0.55rem 1.1rem;
	font: inherit;
	font-weight: 700;
	font-size: 0.92rem;
	cursor: pointer;
	min-height: 44px;
}

.icp-add-more:hover,
.icp-add-more:focus-visible {
	background: var(--tpx-wiz-primary-light);
	outline: none;
}

/* The password gate, messages and tie screens sit in the same centred
   card width as every other screen, even on the wide profile page. */
.icp-profile-app.icp-narrow,
.is-layout-constrained > .icp-profile-app.icp-narrow {
	max-width: 645px; /* the form card's own width */
}

/* "What you value": a clear gap and a thin line between the columns. */
.icp-split {
	column-gap: 44px;
	position: relative;
}

.icp-split > :nth-child(2) {
	position: relative;
}

.icp-split > :nth-child(2)::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: -22px;
	width: 1px;
	background: var(--tpx-wiz-border);
}

.icp-pt {
	border-top: 1px solid var(--tpx-wiz-border);
	margin-top: 1.6rem;
	padding-top: 1.4rem;
}

.icp-pt .icp-rows {
	columns: 2;
	column-gap: 44px;
}

.icp-pt .icp-row {
	break-inside: avoid;
}

.icp-list-label {
	margin: 0.2rem 0 0.35rem;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tpx-wiz-primary-dark);
}

.icp-list-label-all {
	margin-top: 1.3rem;
}

.icp-fill.is-pt {
	background: #8a5a00;
}

.icp-band {
	display: inline-block;
	background: var(--tpx-wiz-primary-light);
	color: var(--tpx-wiz-primary-dark);
	font-weight: 700;
	border-radius: 999px;
	padding: 0 0.6rem;
	font-size: 0.85rem;
}

@media (max-width: 760px) {
	.icp-split > :nth-child(2)::before {
		left: 0;
		right: 0;
		top: -0.9rem;
		bottom: auto;
		width: auto;
		height: 1px;
	}
	.icp-split > :nth-child(2) {
		padding-top: 0.4rem;
	}
	.icp-pt .icp-rows {
		columns: 1;
	}
}

/* DEC-079: on a phone each label sits on its own line above its bar, at full
   width, with the number at the bar's end. Words never break mid-word. */
@media (max-width: 600px) {
	.icp-row {
		grid-template-columns: minmax(0, 1fr) 2.6rem;
		grid-template-areas: "label label" "track value";
		row-gap: 0.25rem;
		column-gap: 0.6rem;
		padding: 0.3rem 0;
	}
	.icp-row-label { grid-area: label; }
	.icp-track { grid-area: track; }
	.icp-row-value { grid-area: value; }
}

/* Scroll bars inside the plugin's own containers: thin, plum on soft pink. */
.icp-app,
.icp-app *,
.icp-landing,
.icp-landing * {
	scrollbar-width: thin;
	scrollbar-color: var(--tpx-wiz-primary, #ad1a66) #fbeaf2;
}

.icp-app ::-webkit-scrollbar,
.icp-landing ::-webkit-scrollbar,
.icp-app::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

.icp-app ::-webkit-scrollbar-track,
.icp-landing ::-webkit-scrollbar-track,
.icp-app::-webkit-scrollbar-track {
	background: #fbeaf2;
	border-radius: 8px;
}

.icp-app ::-webkit-scrollbar-thumb,
.icp-landing ::-webkit-scrollbar-thumb,
.icp-app::-webkit-scrollbar-thumb {
	background: #ad1a66;
	border-radius: 8px;
}
