/* ==========================================================================
   Classified Listing – Account Custom Fields (front-end)
   ========================================================================== */

/* --- Account form: readable input text vs. dim placeholder --------------- */
/* Global fix for the whole Edit Account page (all fields, not just the
   form-builder ones): real typed values are dark, placeholders are dimmed
   so the two are clearly distinguishable. */
#rtcl-user-account input,
#rtcl-user-account textarea,
#rtcl-user-account select {
	color: #212121;
}

#rtcl-user-account input::placeholder,
#rtcl-user-account textarea::placeholder {
	color: #9aa0a6;
	opacity: 1; /* Firefox dims placeholders by default; keep our color exact. */
}

/* --- Account edit form section ------------------------------------------ */
.rtcl-acf-account-wrap {
	margin-top: 10px;
}

.rtcl-acf-section-title.rtcl-acf-section-title {
	margin: 24px 0 16px;
	padding-top: 20px;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	font-size: 18px;
	font-weight: 600;
}

.rtcl-acf-field .rtcl-acf-checkbox-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 400;
	cursor: pointer;
}

/* --- Author page display ------------------------------------------------- */
.rtcl-acf-author-fields {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 32px;
}

.rtcl-acf-author-item {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.rtcl-acf-author-label {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--rtcl-acf-muted, #8a8f98);
	line-height: 1.4;
}

.rtcl-acf-author-value {
	font-size: 15px;
	font-weight: 500;
	color: var(--rtcl-acf-text, #2b2f36);
	word-break: break-word;
	line-height: 1.5;
}

.rtcl-acf-author-value a {
	color: inherit;
	text-decoration: none;
	transition: color 0.15s ease;
}

.rtcl-acf-author-value a:hover {
	color: var(--rtcl-primary-color, #e74c3c);
	text-decoration: underline;
}

.rtcl-acf-author-textarea .rtcl-acf-author-value {
	font-weight: 400;
}

@media (max-width: 575px) {
	.rtcl-acf-author-fields {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}
}

/* ==========================================================================
   Radio / checkbox groups & file upload (account form)
   ========================================================================== */
.rtcl-acf-radio-group,
.rtcl-acf-checkbox-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 4px;
}

.rtcl-acf-radio,
.rtcl-acf-checkbox,
.rtcl-acf-checkbox-label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	line-height: 1.4;
}

.rtcl-acf-radio input,
.rtcl-acf-checkbox input,
.rtcl-acf-checkbox-label input {
	margin: 0;
	flex: none;
}

.rtcl-acf-file {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.rtcl-acf-file-current {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.rtcl-acf-file-thumb {
	border-radius: 6px;
	object-fit: cover;
}

.rtcl-acf-file-remove {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	cursor: pointer;
}

/* When "Remove" is ticked: show the current file as struck-through/dimmed and
   flag the action, so the click has visible effect before the form is saved. */
.rtcl-acf-file.is-removing .rtcl-acf-file-thumb,
.rtcl-acf-file.is-removing .rtcl-acf-file-current > a {
	opacity: 0.4;
	text-decoration: line-through;
}

.rtcl-acf-file.is-removing .rtcl-acf-file-remove {
	color: #b32d2e;
	font-weight: 600;
}

.rtcl-acf-file.is-removing .rtcl-acf-file-remove::after {
	content: " — will be removed on save";
	font-weight: 400;
	font-style: italic;
	opacity: 0.85;
}

.rtcl-acf-file-error {
	margin: 6px 0 0;
	color: #b32d2e;
	font-size: 13px;
	font-weight: 500;
}

/* Live character counter for text / textarea length limits. */
.rtcl-acf-charcount {
	margin: 4px 0 0;
	font-size: 12px;
	line-height: 1.3;
	color: #6b7280;
	text-align: right;
}

.rtcl-acf-charcount.is-min {
	color: #b45309;
	text-align: left;
}

.rtcl-acf-charcount.is-max {
	color: #b32d2e;
	font-weight: 500;
}

/* --- Switch toggle ------------------------------------------------------- */
.rtcl-acf-switch-field {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	line-height: 1.4;
}

.rtcl-acf-switch-input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	border: 0;
	opacity: 0;
	clip: rect(0 0 0 0);
	overflow: hidden;
}

.rtcl-acf-switch-track {
	position: relative;
	flex: none;
	display: inline-block;
	width: 42px;
	height: 24px;
	border-radius: 999px;
	background: #c7ccd3;
	transition: background 0.2s ease;
}

.rtcl-acf-switch-thumb {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s ease;
}

.rtcl-acf-switch-input:checked + .rtcl-acf-switch-track {
	background: var(--rtcl-primary-color, #0066bf);
}

.rtcl-acf-switch-input:checked + .rtcl-acf-switch-track .rtcl-acf-switch-thumb {
	transform: translateX(18px);
}

.rtcl-acf-switch-input:focus-visible + .rtcl-acf-switch-track {
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.18);
}
