/* Ask Affinity. Sizes in px: the theme drops the root font to 9px on phones. */
.affca {
	--affca-navy: #18325c;
	--affca-gold: #c9a54c;
	--affca-cream: #faf6ee;
	--affca-text: #2d3748;
	--affca-line: #e6dfcf;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--affca-line);
	border-radius: 16px;
	overflow: hidden;
	font-size: 15px;
	line-height: 1.45;
	color: var(--affca-text);
	text-align: left;
}
.affca-inline { height: 520px; max-width: 760px; margin: 0 auto 32px; }
.affca-head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	background: var(--affca-navy);
	color: #fff;
}
.affca-title { flex: 1; font-weight: 700; font-size: 16px; }
/* Style photos overlap like the event card faces, so more hosts fit; the chosen one sits on top. */
.affca-title,
.affca .affca-end { white-space: nowrap; }
/* Label sits above the photos without pushing them down, so the photos stay centred with the title. */
.affca-head { padding-top: 19px; padding-bottom: 19px; }
.affca-pick { position: relative; display: flex; align-items: center; }
.affca-pick-label { position: absolute; left: 0; bottom: 100%; margin-bottom: 5px; font-size: 10px; line-height: 1; color: rgba(255, 255, 255, .7); letter-spacing: .02em; white-space: nowrap; }
.affca-faces { display: flex; gap: 0; padding-left: 5px; min-width: 0; }
.affca .affca-face {
	position: relative; z-index: 1; flex: 0 0 auto;
	width: 34px; height: 34px; padding: 0 !important; margin: 0 0 0 -5px !important;
	border-radius: 50% !important; border: 2px solid var(--affca-gold) !important;
	background: var(--affca-navy) !important; overflow: hidden; cursor: pointer;
	transition: transform .15s; box-shadow: none !important;
}
.affca .affca-face img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0 !important; border-radius: 50%; opacity: .75; transition: opacity .15s; }
/* Left-hand photo on top, like the event cards (up to 8 styles). */
.affca .affca-face:nth-child(1) { z-index: 8; }
.affca .affca-face:nth-child(2) { z-index: 7; }
.affca .affca-face:nth-child(3) { z-index: 6; }
.affca .affca-face:nth-child(4) { z-index: 5; }
.affca .affca-face:nth-child(5) { z-index: 4; }
.affca .affca-face:nth-child(6) { z-index: 3; }
.affca .affca-face:nth-child(7) { z-index: 2; }
.affca .affca-face:hover { z-index: 10; transform: translateY(-2px); }
.affca .affca-face:hover img { opacity: 1; }
.affca .affca-face.is-on { z-index: 9; transform: scale(1.12); box-shadow: 0 0 0 2px var(--affca-navy) !important; }
.affca .affca-face.is-on img { opacity: 1; }
.affca-caption { font-size: 12px; color: #6b6f7b; padding: 6px 16px; background: #fff; border-bottom: 1px solid var(--affca-line); }
.affca .affca-end,
.affca .affca-close {
	background: transparent !important;
	border: 1px solid rgba(255, 255, 255, .4) !important;
	color: #fff !important;
	border-radius: 999px !important;
	padding: 4px 12px !important;
	font-size: 13px !important;
	margin: 0 !important;
	line-height: 1.4 !important;
	cursor: pointer;
	box-shadow: none !important;
}
.affca .affca-close { border: 0 !important; font-size: 24px !important; padding: 0 4px !important; }
.affca-log {
	position: relative;
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	background: var(--affca-cream);
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.affca-msg { display: flex; flex-direction: column; gap: 8px; max-width: 88%; }
.affca-me { align-self: flex-end; align-items: flex-end; }
.affca-bot { align-self: flex-start; }
.affca-bubble {
	padding: 10px 14px;
	border-radius: 16px;
	background: #fff;
	border: 1px solid var(--affca-line);
	word-wrap: break-word;
}
.affca-me .affca-bubble { background: var(--affca-gold); border-color: var(--affca-gold); color: #fff; border-bottom-right-radius: 4px; }
.affca-bot .affca-bubble { border-bottom-left-radius: 4px; }
/* Round photos beside messages and the time in each bubble, like Quick Messages (Terry, 20 Nov 2026). */
.affca-msg { position: relative; }
.affca-bot { padding-left: 37px; } /* 32px photo + 5px gap */
.affca-me { padding-right: 37px; }
.affca-av { position: absolute; top: 0; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; border: 2px solid var(--affca-gold); background: #18325c; color: #e9d29a; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.affca-bot .affca-av { left: 0; }
.affca-me .affca-av { right: 0; }
.affca .affca-av img { width: 100% !important; height: 100% !important; object-fit: cover !important; margin: 0 !important; max-width: none !important; aspect-ratio: 1 / 1; }
.affca-who { font-size: 12px; font-weight: 700; color: #6b6f7b; margin: 0 4px -4px; }
.affca-av { top: 21px; } /* level with the top of the bubble (name above is 12px + gap) */
.affca-log { padding-left: 10px; padding-right: 10px; }
.affca-bot > .affca-bubble { align-self: flex-start; max-width: 100%; } /* only as wide as the text, not the cards */
.affca-me > .affca-bubble { align-self: flex-end; }
.affca-log > .affca-msg { max-width: 85%; box-sizing: border-box; } /* like Quick Messages: a clear gap on the other side (Terry, 20 Nov 2026) */
.affca-time { display: block; text-align: right; font-size: 11px; margin-top: 4px; opacity: .6; }
.affca-me .affca-time { opacity: .8; }
.affca-typing .affca-time, .affca-photo .affca-time { display: none; }
.affca-card {
	display: flex;
	gap: 10px;
	align-items: center;
	padding: 8px;
	background: #fff;
	border: 1px solid var(--affca-line);
	border-left: 4px solid var(--affca-gold);
	border-radius: 12px;
	text-decoration: none !important;
	color: var(--affca-text) !important;
}
.affca-card:hover { border-color: var(--affca-gold); }
.affca-card img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; margin: 0 !important; }
.affca-card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.affca-card-title { font-weight: 700; color: var(--affca-navy); }
.affca-card-sub { font-size: 13px; color: #5b6475; }
.affca-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.affca-tag { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--affca-cream); border: 1px solid var(--affca-line); color: var(--affca-navy); }
.affca-links, .affca-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.affca a.affca-link {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--affca-navy);
	color: #fff !important;
	font-size: 14px;
	text-decoration: none !important;
}
.affca .affca-pill {
	background: #fff !important;
	color: var(--affca-navy) !important;
	border: 1px solid var(--affca-gold) !important;
	border-radius: 999px !important;
	padding: 6px 14px !important;
	font-size: 14px !important;
	line-height: 1.3 !important;
	margin: 0 !important;
	cursor: pointer;
	box-shadow: none !important;
	text-transform: none !important;
	font-weight: 400 !important;
}
.affca .affca-pill:hover { background: var(--affca-gold) !important; color: #fff !important; }
/* "Something else": same pill, quieter (dashed), so it reads as a way out rather than a topic. */
.affca .affca-pill.affca-pill-more { border-style: dashed !important; color: #6b6f7b !important; background: transparent !important; }
.affca .affca-pill.affca-pill-more:hover { background: var(--affca-gold) !important; color: #fff !important; border-style: solid !important; }
.affca-fb { font-size: 12px; color: #6b6f7b; display: flex; gap: 6px; align-items: center; }
.affca .affca-fb-btn {
	background: transparent !important;
	border: 1px solid var(--affca-line) !important;
	color: #6b6f7b !important;
	border-radius: 999px !important;
	padding: 1px 10px !important;
	font-size: 12px !important;
	margin: 0 !important;
	cursor: pointer;
}
.affca-typing { display: flex; gap: 4px; padding: 14px; }
.affca-typing i { width: 7px; height: 7px; border-radius: 50%; background: #b5ad9c; animation: affca-dot 1s infinite; }
.affca-typing i:nth-child(2) { animation-delay: .15s; }
.affca-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes affca-dot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.affca-form { display: block; padding: 10px 12px 12px; border-top: 1px solid var(--affca-line); background: #f4ede0; }
.affca-box { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--affca-line); border-radius: 999px; padding: 4px 4px 4px 6px; box-shadow: 0 1px 2px rgba(24, 50, 92, .05); }
.affca-box:focus-within { border-color: var(--affca-gold); box-shadow: 0 0 0 3px rgba(201, 165, 76, .2); }
.affca .affca-input {
	flex: 1;
	min-width: 0;
	border: 0 !important;
	border-radius: 999px !important;
	padding: 9px 12px !important;
	font-size: 16px !important; /* 16px stops iPhone zooming in */
	margin: 0 !important;
	height: auto !important;
	background: transparent !important;
	box-shadow: none !important;
	outline: none !important;
}
.affca .affca-send {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	display: flex !important;
	align-items: center;
	justify-content: center;
	background: var(--affca-gold) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 50% !important;
	padding: 0 !important;
	margin: 0 !important;
	cursor: pointer;
}
.affca .affca-send svg { display: block; margin-left: -2px; }
.affca-pop[hidden] { display: none; }
.affca-pop {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(24, 50, 92, .35);
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	padding: 20px;
}
.affca-panel { width: 460px; max-width: 100%; height: min(680px, 100%); box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
html.affca-open { overflow: hidden; }
@media (max-width: 767px) {
	.affca-pop { padding: 0; }
	.affca-panel { width: 100%; height: 100%; border-radius: 0; border: 0; }
	/* Header and typing box never scroll away; only the messages do (21 Nov 2026). */
	.affca-panel .affca-head, .affca-panel .affca-caption { flex: 0 0 auto; }
	.affca-panel .affca-log { flex: 1 1 auto; min-height: 0; overscroll-behavior: contain; }
	.affca-inline { height: 480px; }
	.affca-msg { max-width: 94%; }
}
@media (prefers-reduced-motion: reduce) { .affca-typing i { animation: none; } }

.affca-hide, .affca .affca-hide, .affca .affca-pill.affca-hide { display: none !important; } /* takes no space until it fades in, so there's no blank gap to scroll past */
.affca-fade { animation: affca-in .35s ease both; }
@keyframes affca-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .affca-fade { animation: none; } }

/* Curved arrow on link buttons (drawn as a mask so it takes the text colour). */
.affca a.affca-link { display: inline-flex; align-items: center; gap: 6px; }
.affca a.affca-link::after {
	content: '';
	width: 16px;
	height: 16px;
	flex: none;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 17c1.5-6.5 6.5-10 14-9.5'/%3E%3Cpath d='M14.5 4l4 3.5-4 3.5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 17c1.5-6.5 6.5-10 14-9.5'/%3E%3Cpath d='M14.5 4l4 3.5-4 3.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Round chat button bottom right. Club Activity's bubble moves to its left. */
.affca-launch {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99990;
	width: 76px;
	height: 76px;
	border-radius: 50% !important;
	border: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	background: #18325c !important;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .25) !important;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity .25s, scale .3s ease;
}
.affca-launch { animation: affca-float 6s ease-in-out infinite; }
/* Grows smoothly on hover: 'scale' works alongside the bobbing animation, which pauses where it is (no jump). */
.affca-launch:hover { animation-play-state: paused; scale: 1.1; }
/* Gentle bob with a small wobble every few seconds. */
@keyframes affca-float {
	0%, 100% { transform: translateY(0) rotate(0); }
	20% { transform: translateY(-4px) rotate(0); }
	40% { transform: translateY(0) rotate(0); }
	46% { transform: rotate(-7deg); }
	52% { transform: rotate(6deg); }
	58% { transform: rotate(-4deg); }
	64% { transform: rotate(0); }
	80% { transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) { .affca-launch { animation: none; } }
.affca-launch-face { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid #c9a54c; margin: 0 !important; }
.affca-launch-label {
	position: absolute;
	right: -4px;
	bottom: -4px;
	background: #c9a54c;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	padding: 4px 7px;
	border-radius: 999px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}
.affca-launch.is-bottom { opacity: 0; pointer-events: none; }
html.affca-open .affca-launch { display: none; }
html.affca-has-launch .affen-pop { right: 112px; max-width: calc(100vw - 132px); }
@media (max-width: 767px) {
	.affca-launch { right: 12px; bottom: 12px; width: 64px; height: 64px; }
	.affca-launch-face { width: 54px; height: 54px; }
	html.affca-has-launch .affen-pop { right: 88px; width: calc(100vw - 100px); max-width: none; }
}

/* "Which Claire?" pills with the connection's photo. */
.affca .affca-pill.affca-pill-person { display: inline-flex !important; align-items: center; gap: 8px; padding: 4px 14px 4px 4px !important; }
.affca .affca-pill-person img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; margin: 0 !important; }

.affca-badge { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; color: #b0423c; border: 1px solid #b0423c; border-radius: 999px; padding: 0 7px; vertical-align: middle; }

/* People in answers (Who's going?, Who's hosting?): small tiles in the pill style (white, gold outline), round photo
   on top and the name underneath so about four fit across. Connections first: gold photo ring + ✦. Each links to the profile. */
.affca-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; margin: 2px 0 4px; }
.affca .affca-person { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 4px 6px; background: #fff; border: 1px solid var(--affca-gold); border-radius: 14px; text-decoration: none !important; color: var(--affca-navy) !important; min-width: 0; transition: background .15s; }
.affca .affca-person img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; margin: 0 !important; border: 2px solid #eee5d3; }
.affca .affca-person.is-conn img { border-color: var(--affca-gold); }
.affca .affca-person span { font-size: 12px; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.affca .affca-person:hover { background: #faf6ee; }

/* The register (hosts marking people as attended). Tiles are buttons; marked ones go pale with a tick. */
.affca .affca-reg-person { font: inherit; cursor: pointer; appearance: none; margin: 0 !important; box-shadow: none !important; text-transform: none !important; }
.affca .affca-reg-person:disabled { cursor: default; }
.affca .affca-reg-person.is-done { opacity: .55; background: #f1f6ee; border-color: #b9dfc7; }
.affca .affca-reg-person.is-done .affca-reg-name::before { content: '✓ '; color: #1f6b3d; font-weight: 700; }
.affca .affca-reg-initial { width: 48px; height: 48px; border-radius: 50%; background: var(--affca-navy); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; }
.affca-reg-slot { margin: 10px 0 4px; min-height: 0; }
.affca-reg-ask { background: #fff; border: 1px solid var(--affca-gold); border-radius: 14px; padding: 10px 12px; }
.affca-reg-q { margin: 0 0 8px; color: var(--affca-navy); font-size: 15px; }
.affca .affca-pill.affca-reg-yes { background: var(--affca-gold) !important; color: #fff !important; }
.affca-reg-status { color: #1f6b3d; font-weight: 600; font-size: 14px; padding: 6px 2px; }
.affca-reg-foot { margin-top: 6px; }
.affca-fadeout { animation: affca-out .28s ease both; }
@keyframes affca-out { from { opacity: 1; } to { opacity: 0; transform: translateY(-4px); } }

/* Event update photo shown in the chat (Terry, 20 Nov 2026) */
.affca .affca-photo { padding: 4px; background: var(--affca-gold, #c9a54c); }
.affca .affca-photo img { display: block; max-width: 220px; max-height: 260px; border-radius: 12px; object-fit: cover; }

/* Square crop for the event update photo (Cropper.js), above the chat pop-up */
.affca-crop { position: fixed; inset: 0; z-index: 100002; background: rgba(15, 28, 52, .92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; }
.affca-crop-title { color: #fff; font-size: 15px; text-align: center; }
.affca-crop-stage { width: min(92vw, 520px); height: min(70vh, 520px); background: #000; border-radius: 12px; overflow: hidden; }
.affca-crop-stage img { display: block; max-width: 100%; }
.affca-crop-btns { display: flex; gap: 10px; }
.affca-crop .affca-pill { font-size: 15px; padding: 9px 18px; border-radius: 999px; border: 1px solid #c9a54c; background: #fff; color: #18325c; font-weight: 700; cursor: pointer; }
.affca-crop .affca-crop-use { background: #c9a54c; color: #fff; }
.affca-crop .affca-pill-more { background: transparent; color: #fff; border-style: dashed; }
.affca .affca-photo img { max-width: 200px; max-height: 200px; }

/* Button colours (Terry, 20 Nov 2026): host actions blue with a +, this page's own buttons light yellow */
.affca .affca-pill.affca-pill-host { background: #e6effb !important; border: 2px solid #8fb0dd !important; padding: 5px 13px !important; color: #18325c !important; font-weight: 600 !important; }
.affca .affca-pill.affca-pill-host:hover { background: #2f5ea8 !important; border-color: #2f5ea8 !important; color: #fff !important; }
.affca .affca-plus { display: inline-block; font-weight: 700; margin-right: 5px; color: #2f5ea8; }
.affca .affca-pill-host:hover .affca-plus { color: #fff; }
.affca .affca-pill.affca-pill-page { background: #fbf3d9 !important; border: 2px solid var(--affca-gold) !important; padding: 5px 13px !important; }
.affca .affca-pill.affca-pill-page:hover { background: var(--affca-gold) !important; color: #fff !important; }

.affca .affca-plus.affca-again { color: #a8842f; font-size: 15px; }

/* Round photos stay round whatever shape the member's photo is (Kirsty's is tall; the theme's img height:auto stretched it). */
.affca-launch .affca-launch-face { height: 64px !important; width: 64px !important; aspect-ratio: 1 / 1; object-fit: cover !important; max-width: none !important; }
@media (max-width: 767px) { .affca-launch .affca-launch-face { width: 54px !important; height: 54px !important; } }
.affca .affca-face img, .affca .affca-person img, .affca .affca-pill-person img, .affca .affca-reg-person img { aspect-ratio: 1 / 1; object-fit: cover !important; height: auto; max-width: none !important; }
