/**
 * RemoteMixing Connect styles.
 *
 * All colour comes from the active theme's preset custom properties
 * (--wp--preset--color--*), so the plugin inherits remotemixing.com's palette
 * (jadro: coral primary, warm tertiary) instead of hardcoding it. Fallbacks
 * mirror the live site's values.
 */

.rmc {
	--rmc-primary: var(--wp--preset--color--primary, #ff8552);
	--rmc-secondary: var(--wp--preset--color--secondary, #4a4a4a);
	--rmc-base: var(--wp--preset--color--base, #434343);
	--rmc-bg: var(--wp--preset--color--background, #ffffff);
	--rmc-tint: var(--wp--preset--color--tertiary, #fff8f5);
	--rmc-line: var(--wp--preset--color--quaternary, #e7e7e7);

	/* Semantic colours for fit/status; not in the theme palette. */
	--rmc-good: #2e7d4f;
	--rmc-good-bg: #eaf6ef;
	--rmc-warn: #9a6b00;
	--rmc-warn-bg: #fdf5e2;
	--rmc-bad: #b3372c;
	--rmc-bad-bg: #fdecea;

	color: var(--rmc-base);
}

.rmc h2, .rmc h3, .rmc h4 { color: var(--rmc-secondary); }
.rmc h3 { margin-top: 0; }

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */

.rmc-btn {
	display: inline-block;
	background: var(--rmc-primary);
	color: #fff !important;
	border: 1px solid var(--rmc-primary);
	border-radius: 5px;
	padding: 12px 24px;
	text-decoration: none !important;
	font-size: 0.95em;
	line-height: 1.2;
	cursor: pointer;
	transition: opacity 0.15s ease;
}
.rmc-btn:hover { opacity: 0.85; }
.rmc-btn--ghost {
	background: transparent;
	color: var(--rmc-primary) !important;
}
.rmc-btn--small { padding: 8px 16px; font-size: 0.85em; }

.rmc-clear { margin-left: 0.75em; font-size: 0.9em; }

/* ------------------------------------------------------------------ */
/* Layout primitives                                                   */
/* ------------------------------------------------------------------ */

.rmc-split {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 24px;
	margin: 2em 0;
}

.rmc-card {
	border: 1px solid var(--rmc-line);
	border-radius: 10px;
	padding: 24px;
	background: var(--rmc-bg);
	position: relative;
}
.rmc-card--accent { background: var(--rmc-tint); border-color: var(--rmc-primary); }

.rmc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
	margin-top: 1.5em;
}

.rmc-hero { margin-bottom: 1em; }
.rmc-lede { font-size: 1.15em; max-width: 46em; }
.rmc-proof { font-weight: 600; color: var(--rmc-primary); }
.rmc-center { text-align: center; }

.rmc-steps li { margin-bottom: 0.6em; }

.rmc-benefits { list-style: none; padding: 0; }
.rmc-benefits li {
	padding: 14px 18px;
	border-left: 3px solid var(--rmc-primary);
	background: var(--rmc-tint);
	border-radius: 0 8px 8px 0;
	margin-bottom: 12px;
}

/* ------------------------------------------------------------------ */
/* Notes & flashes                                                     */
/* ------------------------------------------------------------------ */

.rmc-note {
	padding: 12px 16px;
	border-radius: 8px;
	background: var(--rmc-tint);
	border: 1px solid var(--rmc-line);
	margin: 1em 0;
	font-size: 0.95em;
}
.rmc-note--info { border-color: var(--rmc-primary); }
.rmc-note--widened { background: var(--rmc-warn-bg); border-color: var(--rmc-warn); }
.rmc-note--demo { background: var(--rmc-warn-bg); border-color: var(--rmc-warn); }
.rmc-note--fit { background: var(--rmc-good-bg); border-color: var(--rmc-good); }

.rmc-flash {
	padding: 12px 16px;
	border-radius: 8px;
	margin: 1em 0;
	font-weight: 500;
}
.rmc-flash--success { background: var(--rmc-good-bg); color: var(--rmc-good); }
.rmc-flash--error { background: var(--rmc-bad-bg); color: var(--rmc-bad); }

.rmc-hint {
	display: block;
	font-size: 0.85em;
	opacity: 0.75;
	font-weight: 400;
}

/* ------------------------------------------------------------------ */
/* Directory cards                                                     */
/* ------------------------------------------------------------------ */

.rmc-provider-card { display: flex; flex-direction: column; }
.rmc-provider-name { margin: 0 0 2px; font-size: 1.15em; }
.rmc-provider-name a { text-decoration: none; }
.rmc-headline { margin: 0 0 6px; font-size: 0.95em; }
.rmc-headline--large { font-size: 1.2em; margin-top: -0.5em; }
.rmc-meta { font-size: 0.85em; opacity: 0.8; margin: 0 0 10px; }

.rmc-demo-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	font-size: 0.7em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	background: var(--rmc-warn-bg);
	color: var(--rmc-warn);
	padding: 2px 8px;
	border-radius: 10px;
}

.rmc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.rmc-chip {
	font-size: 0.78em;
	padding: 3px 10px;
	border-radius: 12px;
	background: var(--rmc-tint);
	border: 1px solid var(--rmc-line);
	white-space: nowrap;
}
.rmc-chip--expert { border-color: var(--rmc-primary); font-weight: 600; }
.rmc-chip--more { opacity: 0.6; }

.rmc-daw-line { font-size: 0.82em; opacity: 0.8; margin: -4px 0 10px; }

/* ------------------------------------------------------------------ */
/* Avatars, badges, tiers, reviews                                     */
/* ------------------------------------------------------------------ */

.rmc-avatar {
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	display: inline-block;
}
.rmc-avatar--initials {
	background: var(--rmc-tint);
	border: 1px solid var(--rmc-line);
	color: var(--rmc-primary);
	font-weight: 700;
	text-align: center;
	font-size: 0.95em;
}

.rmc-card-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.rmc-card-head .rmc-provider-name { margin: 0; }
.rmc-card-head .rmc-meta { margin: 2px 0 0; }

.rmc-profile-head { display: flex; gap: 18px; align-items: center; margin: 0 0 10px; }
.rmc-profile-head .rmc-headline--large { margin: 4px 0; }
.rmc-profile-head .rmc-avatar { width: 96px; height: 96px; }
.rmc-profile-head .rmc-avatar--initials { line-height: 96px !important; font-size: 1.6em; }

.rmc-cert-row { margin: 0 0 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rmc-cert-badge {
	display: inline-block;
	background: var(--rmc-good-bg);
	color: var(--rmc-good);
	border: 1px solid var(--rmc-good);
	font-size: 0.8em;
	font-weight: 600;
	padding: 3px 12px;
	border-radius: 14px;
	white-space: nowrap;
}
.rmc-featured-tag {
	font-size: 0.72em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.65;
}

.rmc-status--tier-certified { background: var(--rmc-good-bg); color: var(--rmc-good); }
.rmc-status--tier-verified { background: var(--rmc-tint); color: var(--rmc-primary); }
.rmc-status--pending { background: var(--rmc-warn-bg); color: var(--rmc-warn); }

.rmc-trust-line { font-size: 0.9em; margin: 0 0 10px; }
.rmc-stars-glyphs { color: var(--rmc-warn); letter-spacing: 0.05em; }
.rmc-stars-count { opacity: 0.7; }

.rmc-msa-tag {
	display: inline-block;
	font-size: 0.72em;
	font-weight: 600;
	background: var(--rmc-tint);
	color: var(--rmc-primary);
	border: 1px solid var(--rmc-primary);
	border-radius: 10px;
	padding: 1px 8px;
	margin-left: 6px;
	vertical-align: middle;
	white-space: nowrap;
}
.rmc-msa-tag--partial { opacity: 0.7; border-style: dashed; }

.rmc-chip--workflow { background: var(--rmc-bg); border-color: var(--rmc-quinary, #ccc); }
.rmc-chips--workflow { margin-bottom: 8px; }

.rmc-review { border-top: 1px solid var(--rmc-line); padding: 12px 0; }
.rmc-review:first-of-type { border-top: none; }
.rmc-review-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.rmc-review-stars { color: var(--rmc-warn); }
.rmc-review-body { font-size: 0.95em; margin: 4px 0; }
.rmc-review-body p:last-child { margin-bottom: 0; }
.rmc-review-byline { font-size: 0.82em; opacity: 0.7; }

.rmc-review-form { margin-top: 14px; }
.rmc-review-form summary { cursor: pointer; font-weight: 600; color: var(--rmc-primary); }
.rmc-rating-input { display: flex; gap: 14px; flex-wrap: wrap; margin: 6px 0; }
.rmc-rating-option { font-weight: 400 !important; color: var(--rmc-warn); white-space: nowrap; }
.rmc-rating-option input { width: auto !important; margin-right: 4px; }

.rmc-photo-block { display: flex; gap: 18px; align-items: flex-start; margin: 12px 0 4px; }
.rmc-photo-block .rmc-avatar { width: 96px; height: 96px; }
.rmc-photo-block .rmc-avatar--initials { line-height: 96px !important; font-size: 1.6em; }
.rmc-photo-form { flex: 1; }
.rmc-photo-form input[type="file"] { border: none; padding-left: 0; }
.rmc-photo-buttons { display: inline-flex; gap: 8px; margin-top: 6px; }

.rmc-tier-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin: 1em 0;
}
.rmc-tier-card {
	border: 1px solid var(--rmc-line);
	border-radius: 10px;
	padding: 16px 18px;
}
.rmc-tier-card h4 { margin: 0 0 8px; }
.rmc-tier-card ul { list-style: none; padding: 0; margin: 0; font-size: 0.9em; }
.rmc-tier-card li { padding: 4px 0; border-bottom: 1px solid var(--rmc-line); }
.rmc-tier-card li:last-child { border-bottom: none; }
.rmc-tier-card--verified { background: var(--rmc-tint); border-color: var(--rmc-primary); }
.rmc-tier-card--certified { background: var(--rmc-good-bg); border-color: var(--rmc-good); }

.rmc-services { list-style: none; padding: 0; margin: 0 0 10px; font-size: 0.9em; }
.rmc-services li { padding: 2px 0; }
.rmc-rate { opacity: 0.75; font-size: 0.92em; }

.rmc-card-actions { margin-top: auto; padding-top: 8px; }

/* ------------------------------------------------------------------ */
/* Fit panel                                                           */
/* ------------------------------------------------------------------ */

.rmc-fit {
	border-radius: 8px;
	padding: 12px 14px;
	margin: 8px 0 10px;
	border: 1px solid var(--rmc-line);
	background: var(--rmc-tint);
}
.rmc-fit--strong { background: var(--rmc-good-bg); border-color: var(--rmc-good); }
.rmc-fit--fair { background: var(--rmc-warn-bg); border-color: var(--rmc-warn); }
.rmc-fit--weak, .rmc-fit--poor { background: var(--rmc-bad-bg); border-color: var(--rmc-bad); }

.rmc-fit-score { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.rmc-fit-number { font-size: 1.6em; font-weight: 700; line-height: 1; }
.rmc-fit--strong .rmc-fit-number { color: var(--rmc-good); }
.rmc-fit--fair .rmc-fit-number { color: var(--rmc-warn); }
.rmc-fit--weak .rmc-fit-number, .rmc-fit--poor .rmc-fit-number { color: var(--rmc-bad); }
.rmc-fit-label { font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.7; }
.rmc-fit-blockers { font-size: 0.8em; color: var(--rmc-bad); font-weight: 600; margin-left: auto; }

.rmc-reasons { list-style: none; padding: 0; margin: 0; font-size: 0.85em; }
.rmc-reason { padding: 2px 0 2px 1.5em; position: relative; }
.rmc-reason::before { position: absolute; left: 0; }
.rmc-reason--good::before { content: "✅"; }
.rmc-reason--warn::before { content: "⚠️"; }
.rmc-reason--block::before { content: "❌"; }
.rmc-reason--info::before { content: "ℹ️"; }

.rmc-fit--panel { max-width: 42em; }

/* ------------------------------------------------------------------ */
/* Filters                                                             */
/* ------------------------------------------------------------------ */

.rmc-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: flex-end;
	padding: 16px;
	background: var(--rmc-tint);
	border: 1px solid var(--rmc-line);
	border-radius: 10px;
}
.rmc-filter { display: flex; flex-direction: column; gap: 4px; }
.rmc-filter label { font-size: 0.8em; font-weight: 600; }
.rmc-filter select, .rmc-filter input { min-width: 130px; }
.rmc-filter--submit { flex-direction: row; align-items: center; }

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

.rmc-profile-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 20px;
	margin: 1.5em 0;
}
.rmc-panel {
	border: 1px solid var(--rmc-line);
	border-radius: 10px;
	padding: 18px 20px;
}
.rmc-panel--wide { margin-bottom: 1.2em; }
.rmc-panel h3 { margin: 0 0 10px; font-size: 1.05em; }

.rmc-fact-list { list-style: none; padding: 0; margin: 0; }
.rmc-fact-list li {
	padding: 6px 0;
	border-bottom: 1px solid var(--rmc-line);
	display: flex;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}
.rmc-fact-list li:last-child { border-bottom: none; }

.rmc-prof { font-size: 0.8em; padding: 2px 8px; border-radius: 10px; background: var(--rmc-tint); }
.rmc-prof--expert { background: var(--rmc-good-bg); color: var(--rmc-good); font-weight: 600; }
.rmc-prof--willing_to_learn { background: var(--rmc-warn-bg); color: var(--rmc-warn); }

.rmc-portfolio { list-style: none; padding: 0; }
.rmc-portfolio li { margin-bottom: 10px; }
.rmc-portfolio blockquote { margin: 6px 0 0 1em; font-style: italic; opacity: 0.85; }
.rmc-verified { color: var(--rmc-good); font-size: 0.85em; font-weight: 600; }
.rmc-capacity { font-size: 0.9em; font-weight: 600; color: var(--rmc-primary); }

.rmc-contact-block {
	margin-top: 2em;
	padding: 24px;
	background: var(--rmc-tint);
	border: 1px solid var(--rmc-primary);
	border-radius: 10px;
	max-width: 44em;
}

/* ------------------------------------------------------------------ */
/* Forms                                                               */
/* ------------------------------------------------------------------ */

.rmc form label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: 0.92em; }
.rmc form input[type="text"],
.rmc form input[type="email"],
.rmc form input[type="password"],
.rmc form input[type="number"],
.rmc form input[type="time"],
.rmc form select,
.rmc form textarea {
	width: 100%;
	max-width: 100%;
	padding: 9px 12px;
	border: 1px solid var(--rmc-line);
	border-radius: 6px;
	font: inherit;
	background: var(--rmc-bg);
	color: var(--rmc-base);
	box-sizing: border-box;
}
.rmc form input:focus, .rmc form select:focus, .rmc form textarea:focus {
	outline: 2px solid var(--rmc-primary);
	outline-offset: 0;
	border-color: var(--rmc-primary);
}
.rmc form button { margin-top: 14px; }

.rmc-form-narrow { max-width: 420px; }
.rmc-form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 4px 20px;
}

.rmc-check { display: block; margin: 8px 0; font-weight: 400 !important; }
.rmc-check input { width: auto !important; margin-right: 6px; }
.rmc-check .rmc-hint { margin-left: 1.6em; }

/* Console proficiency grid */
.rmc-console-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 14px;
	margin: 10px 0;
}
.rmc-console-grid fieldset {
	border: 1px solid var(--rmc-line);
	border-radius: 8px;
	padding: 10px 14px;
	margin: 0;
}
.rmc-console-grid legend { font-weight: 700; font-size: 0.9em; padding: 0 6px; }
.rmc-console-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	padding: 3px 0;
}
.rmc-console-name { font-size: 0.9em; }
.rmc-console-row select { width: auto !important; }

.rmc-service-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 14px;
	flex-wrap: wrap;
	border-bottom: 1px solid var(--rmc-line);
	padding: 8px 0;
}
.rmc-service-row .rmc-check { flex: 1; min-width: 260px; }
.rmc-rate-inputs { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.rmc-rate-inputs input { width: 90px !important; }
.rmc-rate-inputs select { width: auto !important; }

.rmc-access-row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	align-items: flex-start;
	border-bottom: 1px solid var(--rmc-line);
	padding: 10px 0;
	flex-wrap: wrap;
}
.rmc-access-label { flex: 1; min-width: 260px; }
.rmc-access-row select { width: auto !important; }

.rmc-window-row {
	display: flex;
	gap: 8px;
	align-items: center;
	margin: 6px 0;
	flex-wrap: wrap;
}
.rmc-window-row select, .rmc-window-row input { width: auto !important; }
.rmc-window-row input[type="text"] { flex: 1; min-width: 160px; }

/* ------------------------------------------------------------------ */
/* Dashboard                                                           */
/* ------------------------------------------------------------------ */

.rmc-status-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	padding: 14px 18px;
	background: var(--rmc-tint);
	border: 1px solid var(--rmc-line);
	border-radius: 10px;
	margin-bottom: 1.2em;
}

.rmc-status {
	display: inline-block;
	font-size: 0.8em;
	padding: 2px 10px;
	border-radius: 10px;
	background: var(--rmc-line);
	text-transform: capitalize;
}
.rmc-status--published, .rmc-status--accepted { background: var(--rmc-good-bg); color: var(--rmc-good); }
.rmc-status--draft, .rmc-status--sent { background: var(--rmc-warn-bg); color: var(--rmc-warn); }
.rmc-status--suspended, .rmc-status--declined { background: var(--rmc-bad-bg); color: var(--rmc-bad); }
.rmc-status--viewed { background: var(--rmc-tint); color: var(--rmc-secondary); }

.rmc-completeness { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rmc-progress {
	width: 140px;
	height: 8px;
	border-radius: 4px;
	background: var(--rmc-line);
	overflow: hidden;
}
.rmc-progress-fill { height: 100%; background: var(--rmc-primary); }

.rmc-section {
	border: 1px solid var(--rmc-line);
	border-radius: 10px;
	padding: 18px 22px;
	margin-bottom: 16px;
	background: var(--rmc-bg);
}
.rmc-section summary { cursor: pointer; list-style: none; }
.rmc-section summary::-webkit-details-marker { display: none; }
.rmc-section summary h3 { display: inline-block; margin: 0; }
.rmc-section summary::after { content: " ▾"; opacity: 0.5; }
.rmc-section[open] summary::after { content: " ▴"; }
.rmc-section summary:hover h3 { color: var(--rmc-primary); }

.rmc-publish { background: var(--rmc-tint); }

/* ------------------------------------------------------------------ */
/* Inquiries                                                           */
/* ------------------------------------------------------------------ */

.rmc-thread {
	border: 1px solid var(--rmc-line);
	border-radius: 10px;
	padding: 14px 18px;
	margin-bottom: 12px;
}
.rmc-thread summary {
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	list-style: none;
}
.rmc-thread summary::-webkit-details-marker { display: none; }
.rmc-thread-who { font-weight: 600; }
.rmc-thread-meta { display: flex; gap: 10px; align-items: center; font-size: 0.85em; }

.rmc-org-summary {
	background: var(--rmc-tint);
	border-radius: 8px;
	padding: 12px 16px;
	margin: 12px 0;
	font-size: 0.9em;
}
.rmc-org-summary h4 { margin: 0 0 6px; }
.rmc-org-summary ul { list-style: none; padding: 0; margin: 0; }
.rmc-org-summary li { padding: 2px 0; }

.rmc-messages { margin: 12px 0; }
.rmc-message {
	border-radius: 10px;
	padding: 10px 14px;
	margin-bottom: 8px;
	max-width: 85%;
	background: var(--rmc-tint);
}
.rmc-message--provider { margin-left: auto; background: var(--rmc-good-bg); }
.rmc-message-head {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 0.8em;
	font-weight: 600;
	margin-bottom: 4px;
	opacity: 0.8;
}
.rmc-message-body p:last-child { margin-bottom: 0; }

.rmc-reply textarea { margin-bottom: 4px; }
.rmc-decline { margin-top: 8px; display: flex; gap: 8px; align-items: center; }
.rmc-decline select { width: auto !important; }

/* Honeypot: present for bots, imperceptible to humans (screen readers skip
   it via aria-hidden; keyboards skip it via tabindex=-1). */
.rmc-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 600px) {
	.rmc-filters { flex-direction: column; align-items: stretch; }
	.rmc-fit-blockers { margin-left: 0; }
	.rmc-message { max-width: 100%; }
}
