/* Finclix Client Portal — front end. Every rule is scoped to .fcp-* classes. */

.fcp-portal {
	--fcp-accent: var(--theme-color1, #2f6f4f);
	--fcp-border: rgba(0, 0, 0, 0.1);
	--fcp-muted: #6b7280;
	--fcp-radius: 8px;
	max-width: 960px;
}
/* Centre the request page within the theme's full-width content column. */
.fcp-portal.fcp-request {
	margin-left: auto;
	margin-right: auto;
}

/* Service header */
.fcp-portal .fcp-service {
	display: flex;
	gap: 24px;
	align-items: center;
	padding: 24px;
	margin-bottom: 28px;
	border: 1px solid var(--fcp-border);
	border-radius: var(--fcp-radius);
	background: rgba(0, 0, 0, 0.02);
}
.fcp-portal .fcp-service__media {
	flex: 0 0 140px;
}
.fcp-portal .fcp-service__image {
	display: block;
	width: 140px;
	height: 140px;
	object-fit: cover;
	border-radius: var(--fcp-radius);
}
.fcp-portal .fcp-service__eyebrow {
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fcp-accent);
}
.fcp-portal .fcp-service__title {
	margin: 0 0 8px;
}
.fcp-portal .fcp-service__desc p:last-child,
.fcp-portal .fcp-service__intro p:last-child {
	margin-bottom: 0;
}

/* Form */
.fcp-portal .fcp-fieldset {
	margin: 0 0 28px;
	padding: 0;
	border: 0;
	min-width: 0;
}
.fcp-portal .fcp-fieldset legend {
	width: 100%;
	margin-bottom: 14px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--fcp-border);
	font-size: 1.15em;
	font-weight: 600;
}
.fcp-portal .fcp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 0 20px;
}
.fcp-portal .fcp-grid .fcp-field--wide {
	grid-column: 1 / -1;
}
.fcp-portal .fcp-field {
	width: 100%;
	float: none;
	margin: 0 0 16px;
	padding: 0;
}
.fcp-portal .fcp-field label,
.fcp-portal .fcp-doc__label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
}
.fcp-portal .fcp-field input.input-text,
.fcp-portal .fcp-field select,
.fcp-portal .fcp-field textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}
.fcp-portal .required {
	color: #b42318;
	text-decoration: none;
	border: 0;
}
.fcp-portal .fcp-optional,
.fcp-portal .fcp-muted {
	font-weight: 400;
	color: var(--fcp-muted);
}
.fcp-portal .fcp-help,
.fcp-portal .fcp-doc__help {
	display: block;
	margin: 0 0 12px;
	font-size: 0.9em;
	color: var(--fcp-muted);
}

/* Document uploads */
.fcp-portal .fcp-docs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 14px;
}
.fcp-portal .fcp-doc {
	padding: 16px;
	border: 1px dashed rgba(0, 0, 0, 0.2);
	border-radius: var(--fcp-radius);
	background: #fff;
}
.fcp-portal .fcp-doc input[type="file"] {
	display: block;
	width: 100%;
	max-width: 100%;
	font-size: 0.92em;
}
.fcp-portal .fcp-doc .fcp-doc__help {
	margin-bottom: 8px;
}
.fcp-portal .fcp-actions {
	margin-top: 8px;
}
.fcp-portal .fcp-submit.is-busy {
	opacity: 0.7;
	pointer-events: none;
}

/* Status badges */
.fcp-portal .fcp-status,
.fcp-status {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 0.82em;
	font-weight: 600;
	line-height: 1.6;
	white-space: nowrap;
	background: #eef2f6;
	color: #344054;
}
.fcp-status--under_review { background: #eff8ff; color: #175cd3; }
.fcp-status--info_required { background: #fffaeb; color: #b54708; }
.fcp-status--price_agreed { background: #f4f3ff; color: #5925dc; }
.fcp-status--awaiting_payment { background: #fef6ee; color: #c4320a; }
.fcp-status--paid,
.fcp-status--completed { background: #ecfdf3; color: #067647; }
.fcp-status--in_progress { background: #f0f9ff; color: #026aa2; }
.fcp-status--cancelled { background: #fef3f2; color: #b42318; }

/*
 * The theme paints WooCommerce buttons with a ::before layer that is scaled
 * to 0 until hover, leaving white text on a transparent background (the Pay
 * and View buttons in My Account are invisible). Give them a resting fill;
 * the theme's hover animation still runs on top.
 */
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-button.button,
.fcp-portal a.button,
.fcp-portal .button.fcp-pay {
	background-color: var(--theme-color1, #144443);
	color: #fff;
}

/* My Account */
.fcp-account .fcp-table {
	width: 100%;
}
.fcp-account .fcp-table td,
.fcp-account .fcp-table th {
	vertical-align: middle;
}
.fcp-account .fcp-table__actions {
	text-align: right;
}
.woocommerce .fcp-account .fcp-table .fcp-table__actions a.button.fcp-btn-sm {
	display: inline-block;
	margin: 3px 0 3px 4px;
	padding: 9px 16px;
	font-size: 12px;
	line-height: 1.4;
	white-space: nowrap;
}
.fcp-detail .fcp-back {
	text-decoration: none;
}
.fcp-detail .fcp-summary {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 16px;
	padding: 18px 20px;
	margin-bottom: 24px;
	border: 1px solid var(--fcp-border);
	border-radius: var(--fcp-radius);
}
.fcp-detail .fcp-summary__label {
	display: block;
	margin-bottom: 4px;
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--fcp-muted);
}
.fcp-detail .fcp-section {
	margin-bottom: 28px;
}
.fcp-detail .fcp-section h3 {
	margin-bottom: 12px;
	font-size: 1.2em;
}
.fcp-detail .fcp-dl {
	display: grid;
	grid-template-columns: minmax(140px, 220px) 1fr;
	margin: 0;
	border-top: 1px solid var(--fcp-border);
}
.fcp-detail .fcp-dl dt,
.fcp-detail .fcp-dl dd {
	margin: 0;
	padding: 10px 0;
	border-bottom: 1px solid var(--fcp-border);
}
.fcp-detail .fcp-dl dt {
	font-weight: 600;
	padding-right: 16px;
}
.fcp-portal .fcp-files {
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}
.fcp-portal .fcp-files li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--fcp-border);
}
.fcp-portal .fcp-files__type {
	flex: 0 0 44px;
	padding: 4px 0;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.06);
	font-size: 11px;
	font-weight: 700;
	text-align: center;
}
.fcp-portal .fcp-files__name {
	min-width: 0;
	overflow-wrap: anywhere;
}
.fcp-portal .fcp-files__name small {
	display: block;
	color: var(--fcp-muted);
}
.fcp-detail .fcp-add-docs {
	padding: 16px;
	border: 1px dashed rgba(0, 0, 0, 0.2);
	border-radius: var(--fcp-radius);
}
.fcp-detail .fcp-add-docs__row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}
.fcp-detail .fcp-add-docs__row input[type="file"] {
	flex: 1 1 220px;
	min-width: 0;
}

/* Shop / product */
.fcp-price-note {
	font-size: 0.9em;
	font-style: italic;
}
.fcp-single-cta {
	margin: 16px 0 24px;
}

@media (max-width: 640px) {
	.fcp-portal .fcp-service {
		flex-direction: column;
		align-items: flex-start;
		padding: 18px;
	}
	.fcp-portal .fcp-service__media,
	.fcp-portal .fcp-service__image {
		width: 100%;
		flex-basis: auto;
		height: 180px;
	}
	.fcp-detail .fcp-dl {
		grid-template-columns: 1fr;
	}
	.fcp-detail .fcp-dl dt {
		padding-bottom: 0;
		border-bottom: 0;
	}
	.fcp-account .fcp-table__actions {
		text-align: left;
	}
}

/* The theme replaces <select> with its "nice-select" widget: match the text inputs. */
.fcp-portal .fcp-field .nice-select {
	float: none;
	display: block;
	width: 100%;
	height: 61px;
	padding: 0 44px 0 20px;
	border: 1px solid rgba(241, 238, 246, 0.5);
	border-radius: 0;
	background-color: rgba(241, 238, 246, 0.5);
	box-shadow: none;
	font-size: 16px;
	line-height: 59px;
}
.fcp-portal .fcp-field .nice-select:hover,
.fcp-portal .fcp-field .nice-select.open,
.fcp-portal .fcp-field .nice-select:focus {
	border-color: var(--theme-color1, #144443);
}
.fcp-portal .fcp-field .nice-select::after {
	right: 20px;
}
.fcp-portal .fcp-field .nice-select .list {
	width: 100%;
	max-height: 260px;
	overflow-y: auto;
	border-radius: 0;
}

/* Encrypted fields */
.fcp-portal .fcp-secure-note,
.fcp-portal .fcp-secure-badge {
	display: inline-block;
	margin-top: 6px;
	font-size: 12px;
	color: #067647;
}
.fcp-portal .fcp-secure-note::before,
.fcp-portal .fcp-secure-badge::before {
	content: "\1F512\00a0";
}

/* Inline error for required dropdowns hidden behind the theme's nice-select. */
.fcp-portal .fcp-field .nice-select.fcp-invalid {
	border-color: #b42318;
}
.fcp-portal .fcp-field-error {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	color: #b42318;
}

/* Error summary after a rejected submission */
.fcp-portal .fcp-errors {
	display: block;
	margin: 0 0 28px;
	padding: 18px 22px;
	border: 1px solid #fda29b;
	border-radius: 8px;
	background: #fef3f2;
	color: #7a271a;
	list-style: none;
}
.fcp-portal .fcp-errors::before {
	display: none;
}
.fcp-portal .fcp-errors:focus {
	outline: 2px solid #b42318;
	outline-offset: 2px;
}
.fcp-portal .fcp-errors__title {
	display: block;
	margin-bottom: 8px;
	color: #b42318;
}
.fcp-portal .fcp-errors ul {
	margin: 0 0 0 18px;
	padding: 0;
	list-style: disc;
}
.fcp-portal .fcp-errors li {
	margin: 2px 0;
}
.fcp-portal .fcp-errors__files {
	margin: 10px 0 0;
	font-size: 14px;
}

/* ---------- Profile picture ---------- */
.fcp-avatar-img {
	border-radius: 50%;
	object-fit: cover;
	background: #eef2f6;
}
.fcp-profile-card {
	display: flex;
	gap: 14px;
	align-items: center;
	margin: 0 0 18px;
	padding: 14px 16px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 12px;
	background: #fff;
}
.fcp-profile-card .fcp-avatar-img {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
}
.fcp-profile-card__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.4;
}
.fcp-profile-card__body strong {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--headings-color, #0b3130);
}
.fcp-profile-card__body a {
	font-size: 13px;
}
.woocommerce-EditAccountForm .fcp-avatar-field {
	margin: 0 0 24px;
	padding: 0 0 20px;
	border: 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.woocommerce-EditAccountForm .fcp-avatar-field legend {
	margin-bottom: 12px;
	font-weight: 600;
}
.fcp-avatar-field__row {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: center;
}
.fcp-avatar-field__preview .fcp-avatar-img {
	display: block;
	width: 96px;
	height: 96px;
}
.fcp-avatar-field__controls {
	flex: 1 1 240px;
	min-width: 0;
}
.fcp-avatar-field__controls input[type="file"] {
	display: block;
	max-width: 100%;
	margin-bottom: 6px;
}
.fcp-avatar-field__controls .fcp-doc__help {
	display: block;
	font-size: 13px;
	color: #6b7280;
}
.fcp-avatar-field__remove {
	display: inline-block;
	margin-top: 8px;
	font-size: 14px;
}

/* ---------- CPACharge payment box ---------- */
.fcp-portal .fcp-cpacharge {
	margin: 16px 0 24px;
	padding: 22px 24px;
	border: 1px solid rgba(20, 68, 67, 0.18);
	border-radius: 12px;
	background: #f6faf9;
	color: var(--text-color, #444);
}
.fcp-portal .fcp-cpacharge__title {
	margin: 0 0 6px;
	font-size: 18px;
	font-weight: 600;
	color: var(--headings-color, #0b3130);
}
.fcp-portal .fcp-cpacharge__text {
	margin: 0 0 14px;
}
.fcp-portal .fcp-cpacharge__details {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
	margin: 0 0 18px;
}
.fcp-portal .fcp-cpacharge__details > div {
	padding: 10px 14px;
	border-radius: 8px;
	background: #fff;
}
.fcp-portal .fcp-cpacharge__details dt {
	font-size: 12px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #6b7280;
}
.fcp-portal .fcp-cpacharge__details dd {
	display: flex;
	gap: 10px;
	align-items: center;
	margin: 2px 0 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--headings-color, #0b3130);
}
.fcp-portal .fcp-copy {
	padding: 2px 10px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 999px;
	background: #fff;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.6;
	cursor: pointer;
}
.fcp-portal a.fcp-cpacharge__button {
	display: inline-block;
	padding: 14px 26px;
	border-radius: 8px;
	background: var(--theme-color1, #144443);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}
.fcp-portal a.fcp-cpacharge__button:hover,
.fcp-portal a.fcp-cpacharge__button:focus-visible {
	background: var(--theme-color2, #133b3a);
	color: #fff;
}
.fcp-portal .fcp-cpacharge__note {
	margin: 10px 0 0;
	font-size: 13px;
	color: #6b7280;
}

/* ---------- Registration ---------- */
.fcp-register-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 0 16px;
}
.fcp-register-fields .fcp-reg-field {
	flex: 1 1 100%;
	min-width: 0;
}
.fcp-register-fields .fcp-reg-field--half {
	flex: 1 1 calc(50% - 8px);
}
.fcp-register-fields .fcp-reg-field input,
.fcp-register-fields .fcp-reg-field select,
.fcp-register-fields .fcp-reg-field .nice-select {
	width: 100%;
}
.fcp-register-fields .fcp-secure-note {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: #067647;
}
@media (max-width: 480px) {
	.fcp-register-fields .fcp-reg-field--half {
		flex-basis: 100%;
	}
}

/* ---------- Documents ---------- */
.fcp-docs-page__intro {
	margin-bottom: 18px;
}
.fcp-docs-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
	margin-bottom: 18px;
}
.fcp-docs-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 22px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 12px;
	background: #fff;
}
.fcp-docs-card h3 {
	margin: 10px 0 6px;
	font-size: 18px;
}
.fcp-docs-card p {
	flex: 1 1 auto;
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.6;
}
.fcp-docs-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 12px;
	background: rgba(200, 241, 105, 0.35);
	color: var(--theme-color1, #144443);
}
.fcp-portal a.fcp-docs-card__button {
	display: inline-block;
	padding: 12px 20px;
	border-radius: 8px;
	background: var(--theme-color1, #144443);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}
.fcp-portal a.fcp-docs-card__button:hover {
	background: var(--theme-color2, #133b3a);
	color: #fff;
}
.fcp-docs-card__pending {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	background: #fffaeb;
	color: #b54708;
	font-size: 13px;
	font-weight: 600;
}
.fcp-docs-page__note {
	font-size: 14px;
	color: #6b7280;
}

/* ---------- Payments ---------- */
.fcp-payments__empty {
	padding: 14px 16px;
	border-radius: 8px;
	background: #f6faf9;
}
.fcp-pay-invoice {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
	padding: 20px 22px;
	border: 1px solid rgba(20, 68, 67, 0.18);
	border-radius: 12px;
	background: #f6faf9;
}
.fcp-pay-invoice h3 {
	margin: 0 0 4px;
}
.fcp-pay-invoice p {
	max-width: 520px;
	margin: 0;
}
.fcp-portal .fcp-pay-invoice a.fcp-cpacharge__button {
	display: inline-block;
	padding: 13px 22px;
	border-radius: 8px;
	background: var(--theme-color1, #144443);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

/* Responsive tables: no stray ":" label on the buttons cell; keep the key column bold. */
.woocommerce table.shop_table_responsive.fcp-table tr td.fcp-table__actions::before {
	display: none;
}
.fcp-table td.fcp-table__key {
	font-weight: 600;
}
.fcp-register-fields .fcp-reg-field select {
	display: block;
	height: 44px;
	padding: 8px 40px 8px 16px;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 14px center / 14px no-repeat;
	color: #212529;
	font-size: 15px;
	-webkit-appearance: none;
	appearance: none;
}

/* Theme draws the Log in / Register buttons with a hover-only fill (white text on pale grey). */
.woocommerce-account .woocommerce-form-login .woocommerce-form-login__submit,
.woocommerce-account .woocommerce-form-register .woocommerce-form-register__submit {
	background-color: var(--theme-color1, #144443);
	color: #fff;
	opacity: 1;
}
