/* =============================================================
   Owambe Connect — Phase 2 styles (Week 1–2 surfaces)
   Profile section nav · reviews + layered stars · review form ·
   save-to-favourites hearts · Google sign-in · client dashboard.
   Loads alongside marketplace.css / vendor-profile.css /
   vendor-dashboard.css — uses the same tokens with hex fallbacks
   so each surface renders correctly even if another sheet is
   dequeued on a given page.
   ============================================================= */

/* ---------- Phase 2 utility: .visually-hidden ----------
   (phase2) Screen-reader-only clip pattern. Used by the review-form
   star radio inputs (input.visually-hidden + label glyphs); safe to
   reuse on any Phase 2 markup. Content stays focusable/announceable
   but renders nothing. */
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ---------- 1. Profile section nav (.oc-vp-nav) ----------
   Sticky pill row under the site header (header is sticky z-100;
   ~64px tall on mobile, ~72px from tablet up). Deliberately NOT
   .oc-nav — that class is display:none on mobile in style.css. */
.oc-vp-nav {
	position: sticky;
	/* Flush to the top when pinned. The site header isn't sticky on the profile
	   page (it scrolls away), so any positive offset just leaves a visible gap. */
	top: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	gap: 6px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none; /* Firefox — no scrollbar chrome */
	background: rgba(255, 255, 255, .88);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--oc-border, #E4DDD2);
	padding: 10px 16px;
}
.oc-vp-nav::-webkit-scrollbar { display: none; } /* WebKit — no scrollbar chrome */

.oc-vp-nav__link {
	flex: 0 0 auto;
	display: inline-block;
	padding: .45em 1em;
	border-radius: 999px;
	color: var(--oc-burgundy, #6E0F2C);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	white-space: nowrap;
	transition: background .15s ease, color .15s ease;
}
.oc-vp-nav__link:hover { background: #f7f2ee; }
.oc-vp-nav__link.is-active { background: var(--oc-burgundy, #6E0F2C); color: #fff; }
.oc-vp-nav__link:focus-visible { outline: 2px solid var(--oc-gold, #C9A961); outline-offset: 2px; }

/* Anchor targets land clear of header + sticky pill row. */
.oc-vp__section { scroll-margin-top: 96px; }

/* ---------- 2. Layered stars (.oc-stars) ----------
   Base row of 5 glyphs in muted grey; .oc-stars__fill is an absolute
   gold overlay clipped to a width (inline style width:NN% from
   OC_Reviews::stars_html()) for fractional averages. */
.oc-stars {
	position: relative;
	display: inline-block;
	color: #d8d2c8;
	letter-spacing: 2px;
	line-height: 1;
	white-space: nowrap;
}
.oc-stars__fill {
	position: absolute;
	left: 0;
	top: 0;
	overflow: hidden;
	white-space: nowrap;
	color: var(--oc-gold, #C9A961);
}
.oc-stars__count {
	color: #777;
	font-size: .85em;
	margin-left: 6px;
	letter-spacing: normal; /* reset in case it sits inside .oc-stars */
}

/* ---------- 3. Reviews list (.oc-reviews / .oc-review) ---------- */
.oc-reviews { margin-top: 10px; }
.oc-review {
	background: #fff;
	border-radius: 14px;
	padding: 18px 20px;
	box-shadow: var(--oc-shadow, 0 6px 20px rgba(31, 27, 26, .08));
	margin-bottom: 14px;
}
.oc-review:last-child { margin-bottom: 0; }
.oc-review__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 8px; }
.oc-review__head strong { color: var(--oc-ink, #1F1B1A); font-size: 15px; line-height: 1.3; }
.oc-review__meta { color: #777; font-size: 12.5px; margin-left: auto; white-space: nowrap; }
.oc-review__text { margin: 0; line-height: 1.65; color: #444; font-size: 14.5px; }
.oc-review__text p { margin: 0 0 10px; }
.oc-review__text p:last-child { margin-bottom: 0; }

/* ---------- 4. Review submission form (.oc-review-form) ----------
   Field conventions mirror .oc-contact__form (style.css) with the
   Phase 2 twist: 1px #ddd border, 10px radius, gold focus ring. */
.oc-review-form { margin-top: 18px; }
.oc-review-form .oc-field { margin-bottom: 14px; }
.oc-review-form .oc-field label { display: block; font-weight: 600; color: #2A2522; margin-bottom: 6px; font-size: .92rem; }
.oc-review-form input[type="text"],
.oc-review-form input[type="email"],
.oc-review-form textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid #ddd;
	border-radius: 10px;
	font-size: 15px;
	font-family: inherit;
	background: #fff;
	color: var(--oc-ink, #1F1B1A);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.oc-review-form textarea { min-height: 120px; resize: vertical; }
.oc-review-form input:focus,
.oc-review-form textarea:focus {
	outline: none;
	border-color: var(--oc-gold, #C9A961);
	box-shadow: 0 0 0 3px rgba(201, 169, 97, .22);
}

/* Star radio group — borderless fieldset; inputs are .visually-hidden;
   labels render as star glyphs. Markup order is 5→1 and the flex row
   is reversed, so `label:hover ~ label` / `input:checked ~ label`
   paint every star up to (visually left of) the hovered/checked one. */
.oc-review-form fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.oc-review-form fieldset legend { font-weight: 600; color: #2A2522; font-size: .92rem; padding: 0; margin-bottom: 6px; }
.oc-review-form__stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; }
.oc-review-form__stars label {
	font-size: 1.8rem;
	line-height: 1;
	padding: 0 2px;
	color: #d8d2c8;
	cursor: pointer;
	transition: color .12s ease, transform .12s ease;
}
.oc-review-form__stars label:hover,
.oc-review-form__stars label:hover ~ label,
.oc-review-form__stars input:checked ~ label { color: var(--oc-gold, #C9A961); }
.oc-review-form__stars label:hover { transform: scale(1.08); }
.oc-review-form__stars input:focus-visible + label {
	outline: 2px solid var(--oc-gold, #C9A961);
	outline-offset: 2px;
	border-radius: 4px;
}
/* Submit button = existing .oc-btn / .oc-btn--primary — no restyle here. */
.oc-review-form .oc-form__actions { margin-top: 4px; }

/* ---------- 5. Save-to-favourites heart (.oc-save-btn) ----------
   40px circular button. On listing cards it must sit ABOVE the
   .oc-card--clickable stretched-link ::after (z-index 1), hence
   position:relative + z-index 2 on the base rule. */
.oc-save-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 50%;
	background: #fff;
	border: 1px solid #eee;
	box-shadow: 0 2px 8px rgba(31, 27, 26, .12);
	cursor: pointer;
	position: relative;
	z-index: 2;
	font-family: inherit;
	line-height: 0;
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.oc-save-btn:hover { border-color: var(--oc-burgundy, #6E0F2C); box-shadow: var(--oc-shadow, 0 6px 20px rgba(31, 27, 26, .08)); }
.oc-save-btn:focus-visible { outline: 2px solid var(--oc-gold, #C9A961); outline-offset: 2px; }
.oc-save-btn svg {
	width: 20px;
	height: 20px;
	display: block;
	stroke: var(--oc-burgundy, #6E0F2C);
	fill: transparent;
	transition: fill .15s ease, stroke .15s ease;
}
.oc-save-btn.is-saved svg { fill: var(--oc-burgundy, #6E0F2C); stroke: var(--oc-burgundy, #6E0F2C); }
/* Brief pop each time the saved state toggles on. */
.oc-save-btn.is-saved { animation: ocSavePop .25s ease; }
@keyframes ocSavePop {
	0%   { transform: scale(1); }
	50%  { transform: scale(1.25); }
	100% { transform: scale(1); }
}
/* On listing cards: pin to the top-right corner of the card media. */
.oc-card .oc-save-btn { position: absolute; top: 10px; right: 10px; }

/* ---------- 6. Card rating line (.oc-card__rating) ---------- */
.oc-card__rating {
	margin-top: 4px;
	font-size: .85rem;
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--oc-stone, #6B6361);
}

/* ---------- 7. Google sign-in block (.oc-google-signin) ----------
   Wraps OC_Google_Auth::button_html() on the login pages. */
.oc-google-signin {
	margin: 18px auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}
.oc-google-signin .oc-note { color: #777; font-size: 12.5px; text-align: center; margin: 0; line-height: 1.5; }

/* ---------- 8. Client dashboard (.oc-cd) ----------
   Root class on the client dashboard; the shell reuses the vendor
   dashboard .oc-vd__* layout classes, so only client-specific
   pieces live here. */
.oc-cd .oc-vd__grid,
.oc-cd__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 18px;
}
/* Empty state — dashed drop-zone look with room for a CTA button. */
.oc-cd__empty {
	border: 2px dashed #ddd;
	border-radius: 14px;
	padding: 40px 24px;
	text-align: center;
	color: var(--oc-stone, #6B6361);
	font-size: 14.5px;
}
.oc-cd__empty p { margin: 0 0 14px; }
.oc-cd__empty .oc-btn { margin-top: 4px; }

/* Recently-contacted rows. */
.oc-cd__contact-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 12px 4px;
	border-bottom: 1px solid #eee;
}
.oc-cd__contact-row:last-child { border-bottom: 0; }
.oc-cd__contact-row a { color: var(--oc-ink, #1F1B1A); font-weight: 600; text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-cd__contact-row a:hover { color: var(--oc-burgundy, #6E0F2C); }
.oc-cd__contact-row small { color: var(--oc-stone, #6B6361); font-size: 12px; white-space: nowrap; }
/* Channel pill — small caps on a gold tint. */
.oc-cd__channel {
	display: inline-block;
	flex: 0 0 auto;
	padding: 2px 10px;
	border-radius: 999px;
	background: #f6efdf;
	color: var(--oc-burgundy, #6E0F2C);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	line-height: 1.6;
}

/* ---------- 9. Hero aggregate rating (.oc-vp__rating) ----------
   Sits over the dark hero banner — white-alpha base stars so the
   gold fill reads against the photo/gradient. */
.oc-vp__rating { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.oc-vp__rating .oc-stars { color: rgba(255, 255, 255, .35); }
.oc-vp__rating .oc-stars__fill { color: var(--oc-gold, #C9A961); }
.oc-vp__rating .oc-stars__count { color: rgba(255, 255, 255, .8); }

/* ---------- 10. Review-form sign-in prompt ----------
   Shown to logged-out visitors in place of the form. */
.oc-review-form__signin { color: #777; font-size: 14px; margin: 10px 0 0; line-height: 1.6; }
.oc-review-form__signin a {
	color: var(--oc-burgundy, #6E0F2C);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--oc-gold, #C9A961);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
.oc-review-form__signin a:hover { text-decoration-color: var(--oc-burgundy, #6E0F2C); }

/* ---------- Desktop refinements ---------- */
@media (min-width: 768px) {
	.oc-vp-nav { top: 0; padding: 12px 22px; gap: 8px; }
	.oc-vp__section { scroll-margin-top: 112px; }

	.oc-review { padding: 20px 24px; }
	.oc-review-form { max-width: 640px; }
	.oc-cd__contact-row { padding: 14px 6px; }
}

@media (min-width: 1024px) {
	.oc-vp-nav__link { font-size: 14.5px; }
	.oc-cd .oc-vd__grid,
	.oc-cd__grid { gap: 20px; }
	.oc-google-signin { margin: 22px auto; }
}

/* ── Integrator additions ─────────────────────────────────────────── */

/* "or" divider on auth cards (client-login + vendor-login Google block) */
.oc-auth__divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: #9a938f; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.oc-auth__divider::before,
.oc-auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--oc-border, #E4DDD2); }

/* Vendor-dashboard analytics mini bar chart (no JS library needed) */
.oc-an-mini { display: flex; align-items: flex-end; gap: 2px; height: 140px; padding: 6px 0 0; }
.oc-an-mini__col { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 1px; height: 100%; min-width: 4px; }
.oc-an-mini__bar { display: block; width: 45%; min-height: 2px; border-radius: 2px 2px 0 0; }
.oc-an-mini__bar--views { background: var(--oc-burgundy, #6E0F2C); }
.oc-an-mini__bar--clicks { background: var(--oc-gold, #C9A961); }
.oc-an-mini__key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; }
.oc-an-mini__key--views { background: var(--oc-burgundy, #6E0F2C); }
.oc-an-mini__key--clicks { background: var(--oc-gold, #C9A961); }

/* Vendor-dashboard analytics: time-range pills */
.oc-an-range { display: flex; gap: 6px; margin: 0 0 18px; }
.oc-an-range__btn { padding: 7px 16px; background: #FAF7F2; border: 1px solid var(--oc-border, #E4DDD2); border-radius: 999px; color: #6B6361; text-decoration: none; font-weight: 500; font-size: 13px; transition: all .15s ease; }
.oc-an-range__btn:hover { border-color: var(--oc-burgundy, #6E0F2C); color: var(--oc-burgundy, #6E0F2C); }
.oc-an-range__btn.is-active { background: var(--oc-burgundy, #6E0F2C); color: #fff; border-color: var(--oc-burgundy, #6E0F2C); }

/* Vendor-dashboard analytics: clicks-by-channel bars */
.oc-an-channels { display: flex; flex-direction: column; gap: 10px; }
.oc-an-channels__row { display: flex; align-items: center; gap: 10px; }
.oc-an-channels__label { flex: 0 0 90px; font-size: 13px; color: #1F1B1A; }
.oc-an-channels__track { flex: 1; height: 8px; background: #F1ECE3; border-radius: 999px; overflow: hidden; }
.oc-an-channels__fill { display: block; height: 100%; background: linear-gradient(90deg, var(--oc-burgundy, #6E0F2C), var(--oc-gold, #C9A961)); border-radius: 999px; min-width: 2px; }
.oc-an-channels__val { flex: 0 0 44px; text-align: right; font-weight: 600; color: var(--oc-burgundy, #6E0F2C); font-size: 14px; }
