/*
 * Every Install PRO Members — visual design.
 *
 * Modelled on the reference directory (member grid + pill filters + a
 * two-column member page), rebuilt with the Every Trade Pro brand colour
 * (trade blue) standing in for the reference site's red accent, which is
 * used the same way the reference uses its accent: sparingly, on the one
 * or two things that should draw the eye (the active filter pill, a name
 * on hover, the "view profile" cue). Everything else stays black/white/grey,
 * same as the reference.
 *
 * All the brand colours are CSS custom properties right here at the top —
 * if the real Every Trade Pro brand colour differs from the trade-500 blue
 * used elsewhere on this account's sites, this is the only place to change.
 */

.eip-members-wrap,
.eip-member-single-wrap {
	--eip-accent: #1b92d1;       /* trade-500 */
	--eip-accent-dark: #0f74ae;  /* trade-600, used for hover/pressed states */
	--eip-ink: #0f172a;          /* dark-900 — headings, primary text */
	--eip-muted: #55606e;        /* secondary text (subtitles, meta, body copy) */
	--eip-line: #0f172a;         /* pill borders — matches the reference's black outline */
	--eip-panel: #f1f5f9;        /* light grey caption / meta panels */
	--eip-radius-pill: 999px;

	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--eip-ink);
}

/* Scoped "force our styling" rule: only applies inside the plugin's own
   markup, so it can't fight with the rest of the page the way a global
   body,body* rule would — it just makes sure the host theme can't quietly
   swap fonts on the parts of the page this plugin actually renders. */
.eip-members-wrap,
.eip-members-wrap *,
.eip-member-single-wrap,
.eip-member-single-wrap * {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.eip-members-wrap h1,
.eip-members-wrap h2,
.eip-members-wrap h3,
.eip-member-single-wrap h1,
.eip-member-single-wrap h2,
.eip-member-single-wrap h3 {
	margin-top: 0 !important;
	letter-spacing: -0.02em !important;
	font-weight: 800 !important;
	color: var(--eip-ink) !important;
}

/* ---------- Filter bar ---------- */

.eip-members-filters {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0 0 32px;
}

.eip-filter-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.eip-filter-pill {
	appearance: none;
	cursor: pointer;
	background: #fff;
	color: var(--eip-ink);
	border: 1px solid var(--eip-line);
	border-radius: var(--eip-radius-pill);
	padding: 8px 20px;
	font-size: 0.95rem;
	line-height: 1.2;
	font-weight: 500;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.eip-filter-pill:hover {
	border-color: var(--eip-accent);
	color: var(--eip-accent-dark);
}

.eip-filter-pill.is-active {
	background: var(--eip-accent);
	border-color: var(--eip-accent);
	color: #fff;
}

.eip-filter-pill--all {
	border-color: transparent;
	background: transparent;
	padding-left: 4px;
	padding-right: 4px;
	font-weight: 600;
}

.eip-filter-pill--all:hover {
	border-color: transparent;
	background: transparent;
	text-decoration: underline;
}

.eip-filter-pill--all.is-active {
	background: transparent;
	color: var(--eip-ink);
	text-decoration: underline;
	text-decoration-color: var(--eip-accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

/* ---------- Member grid ---------- */

.eip-members-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 40px 32px;
	margin: 0;
}

.eip-member-card {
	/* Required: the stretched-link ::after below covers whichever ancestor
	   is the nearest positioned element — this card. */
	position: relative;
}

/* Modern rounded, "floating" photo treatment (matches the reference grid's
   rounded-corner + soft-shadow team photos) instead of a flat square. The
   media box itself carries the radius/shadow/clip so the <img> can zoom on
   hover without spilling outside the rounded corners. */
.eip-member-card__media {
	position: relative;
	overflow: hidden;
	border-radius: 20px;
	background: #eee;
	box-shadow: 0 18px 40px -20px rgba(15, 23, 42, 0.5);
}

.eip-member-card__media img,
.eip-member-card__placeholder {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	transition: transform 0.45s ease;
}

/* Subtle brand-colour tint on hover, in place of the reference site's
   coloured "image-overlay" layer. */
.eip-member-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--eip-accent);
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.eip-member-card:hover .eip-member-card__media img {
	transform: scale(1.07);
}

.eip-member-card:hover .eip-member-card__media::after {
	opacity: 0.16;
}

.eip-member-card__body {
	padding: 18px 4px 0;
}

.eip-member-card__name {
	margin: 0 0 2px;
	font-size: 1.15rem;
	font-weight: 700 !important;
	letter-spacing: -0.01em;
}

.eip-member-card__name a {
	color: var(--eip-ink);
	text-decoration: none;
}

.eip-member-card:hover .eip-member-card__name a {
	color: var(--eip-accent-dark);
}

.eip-member-card__subtitle {
	margin: 0;
	color: var(--eip-accent-dark);
	font-size: 0.85rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/*
 * "Extended link" mechanism: only the member's name is a visible link, but
 * its ::after pseudo-element is stretched to fill the whole parent card,
 * so clicking anywhere on the tile opens the member's page.
 * If your site already defines .stretched-link with the same rule, this is
 * redundant and harmless — whichever stylesheet loads last simply wins.
 * If your existing mechanism uses a different class name, swap
 * "stretched-link" for it in includes/class-shortcode.php.
 */
.stretched-link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.eip-members-empty {
	margin: 32px 0;
	color: var(--eip-muted);
}

/* ---------- Single member page ---------- */

.eip-member-single-wrap {
	max-width: 1100px;
	margin: 0 auto;
	padding: 48px 24px 80px;
}

.eip-member-single {
	display: grid;
	grid-template-columns: minmax(240px, 380px) 1fr;
	gap: 56px;
	align-items: start;
}

@media (max-width: 720px) {
	.eip-member-single {
		grid-template-columns: 1fr;
		gap: 32px;
	}
}

.eip-member-single__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: 26px;
	box-shadow: 0 28px 64px -26px rgba(15, 23, 42, 0.55);
}

.eip-member-single__name {
	font-size: clamp(2.25rem, 4vw, 3rem);
	margin: 0 0 8px;
}

.eip-member-single__subtitle {
	margin: 0 0 20px;
	color: var(--eip-muted);
	font-size: 1.15rem;
	font-weight: 400 !important;
}

.eip-member-single__meta {
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.eip-member-single__meta li {
	font-size: 0.98rem;
	color: var(--eip-muted);
}

.eip-member-single__meta li strong {
	color: var(--eip-ink);
	font-weight: 700 !important;
	margin-right: 4px;
}

.eip-member-single__meta a {
	color: var(--eip-accent-dark);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.eip-member-single__description {
	font-size: 1.05rem;
	line-height: 1.7;
	color: var(--eip-ink);
	max-width: 65ch;
}

.eip-member-single__description p {
	margin: 0 0 20px;
}

.eip-member-single__description p:last-child {
	margin-bottom: 0;
}

/* ---------- Social icons (single member page) ---------- */

.eip-member-single__socials {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	list-style: none;
	margin: 0 0 22px;
	padding: 0;
}

.eip-social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 999px;
	background: var(--eip-ink);
	color: #fff;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.eip-social-icon:hover {
	background: var(--eip-accent);
	transform: translateY(-2px);
}

.eip-social-icon svg {
	width: 18px;
	height: 18px;
	display: block;
}

/* ---------- Front-end "submit your profile" form ---------- */

/* The whole form sits inside a floating white card, so it reads as a clear,
   modern panel regardless of what background colour the host page/theme
   uses around it. margin uses !important because Uncode's own text-column
   styles reset child margins, which otherwise silently breaks the centering
   (the card was observed sitting flush-left with all the empty space
   dumped on the right instead of split evenly either side). */
.eip-member-submit-wrap {
	max-width: 760px;
	margin: 24px auto !important;
	padding: clamp(28px, 5vw, 52px);
	background: #fff;
	border-radius: 24px;
	box-shadow: 0 24px 60px -30px rgba(15, 23, 42, 0.35);
	box-sizing: border-box;
}

.eip-member-submit-form {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

/* Name/Subtitle and Location/Website pair up on wide screens instead of
   stacking as one long, narrow column with dead space either side. */
.eip-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px 24px;
}

@media (max-width: 640px) {
	.eip-form-grid {
		grid-template-columns: 1fr;
	}
}

.eip-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	min-width: 0;
}

.eip-field label,
.eip-field legend {
	font-weight: 600 !important;
	font-size: 0.92rem;
	color: var(--eip-ink);
}

.eip-field input[type="text"],
.eip-field input[type="url"],
.eip-field input[type="tel"],
.eip-field textarea,
.eip-field select {
	width: 100%;
	box-sizing: border-box;
	font-family: inherit;
	font-size: 0.98rem;
	color: var(--eip-ink);
	background: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	padding: 10px 14px;
}

.eip-field select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2355606e'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 18px;
	padding-right: 38px;
}

.eip-field input:focus,
.eip-field textarea:focus,
.eip-field select:focus {
	outline: none;
	border-color: var(--eip-accent);
	box-shadow: 0 0 0 3px rgba(27, 146, 209, 0.15);
}

.eip-field textarea {
	resize: vertical;
}

fieldset.eip-field {
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	padding: 18px 20px;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 20px;
	margin: 0;
}

fieldset.eip-field legend {
	padding: 0 6px;
}

.eip-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 400 !important;
	font-size: 0.92rem;
}

/* Social links: a compact 2-up grid instead of the checkbox row's inline
   wrap — same specificity as fieldset.eip-field (fieldset + one class each),
   so being declared after it is what lets this win. */
fieldset.eip-field--socials {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 18px 24px;
}

.eip-field--socials .eip-field {
	gap: 6px;
}

/* Small icon sitting inside each social input, so the field itself shows
   which network it's for at a glance. */
.eip-input-icon-wrap {
	position: relative;
	display: block;
}

.eip-input-icon {
	position: absolute;
	top: 50%;
	left: 13px;
	transform: translateY(-50%);
	display: flex;
	color: var(--eip-accent-dark);
	pointer-events: none;
}

.eip-field input.eip-input-has-icon {
	padding-left: 42px;
}

/* ---------- Photo "dropzone" ---------- */

.eip-photo-drop {
	position: relative;
	border: 2px dashed #cbd5e1;
	border-radius: 16px;
	background: var(--eip-panel);
	padding: 30px 20px;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.eip-photo-drop:hover,
.eip-photo-drop:focus-within {
	border-color: var(--eip-accent);
	background: #fff;
}

.eip-photo-drop input[type="file"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.eip-photo-drop__visual {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-align: center;
	pointer-events: none;
}

.eip-photo-drop__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 999px;
	background: #fff;
	color: var(--eip-accent);
	box-shadow: 0 6px 16px -6px rgba(15, 23, 42, 0.3);
	transition: background-color 0.2s ease, color 0.2s ease;
}

.eip-photo-drop.has-file .eip-photo-drop__icon {
	background: var(--eip-accent);
	color: #fff;
}

.eip-photo-drop__text {
	font-weight: 600 !important;
	font-size: 0.95rem;
	color: var(--eip-ink);
}

.eip-photo-drop__filename {
	font-size: 0.85rem;
	color: var(--eip-accent-dark);
	font-weight: 600 !important;
	word-break: break-all;
}

/* Honeypot: hidden from real visitors with CSS (not display:none, which
   some spam bots skip when filling forms), never shown, never tabbable. */
.eip-hp-wrap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.eip-submit-button {
	align-self: flex-start;
	border: none;
	cursor: pointer;
	font-family: inherit;
	background: var(--eip-accent);
	color: #fff;
	padding: 12px 30px;
	border-radius: 999px;
	font-size: 1rem;
	font-weight: 600;
	transition: background-color 0.15s ease;
}

.eip-submit-button:hover {
	background: var(--eip-accent-dark);
}

.eip-submit-notice {
	border-radius: 10px;
	padding: 14px 18px;
	margin: 0 0 24px;
	font-size: 0.98rem;
}

.eip-submit-notice--success {
	background: #ecfdf5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}

.eip-submit-notice--error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}
