/* ===================================================================================

* Theme Name: Cirkle Child
* Theme URI:    https://radiustheme.com/demo/wordpress/cirkle
* Description: Mobile-first social community child theme — BuddyPress-ready, optimized for phones and touch devices.
* Version: 4.0
* Author: RadiusTheme
* Author URI: https://www.radiustheme.com/
* Template: cirkle
* License: GNU General Public License version 3.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
* Tags: one-column, custom-background, editor-style, featured-images, post-formats, sticky-post, threaded-comments, translation-ready, buddypress

====================================================================================== */

/* ==========================================================================
   MOBILE-FIRST base — all styles target phones by default.
   Desktop overrides live behind min-width media queries.
   ========================================================================== */

:root {
	--ck-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
	--ck-radius: 12px;
	--ck-accent: #6366f1;
	--ck-bg: #f0f2f5;
	--ck-surface: #ffffff;
	--ck-text: #0f172a;
	--ck-text-muted: #64748b;
	--ck-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--ck-tap-min: 44px; /* minimum touch target per Apple/WCAG */
	--ck-safe-bottom: env(safe-area-inset-bottom, 0px);
	--ck-safe-left: env(safe-area-inset-left, 0px);
	--ck-safe-right: env(safe-area-inset-right, 0px);
}

@media (prefers-color-scheme: dark) {
	:root {
		--ck-bg: #0c0f1a;
		--ck-surface: #1a1d2e;
		--ck-text: #f1f5f9;
		--ck-text-muted: #94a3b8;
	}

	body {
		background: var(--ck-bg);
		color: var(--ck-text);
	}

	.site-content,
	.content-area,
	.site-main,
	.entry-content,
	article,
	.widget {
		background: var(--ck-surface);
		color: var(--ck-text);
	}
}

/* ── Global mobile resets ─────────────────────────────────── */

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

body {
	font-family: var(--ck-font);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	background: var(--ck-bg);
	/* Prevent 300ms tap delay on older WebViews */
	touch-action: manipulation;
	/* Respect notch / Dynamic Island safe areas */
	padding-left: var(--ck-safe-left);
	padding-right: var(--ck-safe-right);
	padding-bottom: var(--ck-safe-bottom);
}

/* Prevent iOS zoom on input focus — keep font ≥16px */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="number"],
input[type="tel"],
textarea,
select {
	font-size: 16px !important;
}

/* Ensure BuddyPress buttons meet 44px minimum tap target */
#buddypress button,
#buddypress [role="button"],
#buddypress a.button,
#buddypress input[type="submit"],
#buddypress input[type="button"],
.generic-button a,
.generic-button button {
	min-height: var(--ck-tap-min);
	min-width: var(--ck-tap-min);
}

/* Touch feedback instead of hover */
@media (pointer: coarse) {
	a:active, button:active, [role="button"]:active {
		opacity: 0.7;
		transition: opacity 0.1s;
	}
}

/* Smooth link transitions */
a {
	transition: color 0.15s var(--ck-ease), opacity 0.15s var(--ck-ease);
}

/* Selection */
::selection {
	background: rgba(99, 102, 241, 0.2);
	color: inherit;
}

/* Hide scrollbars on horizontal scroll containers (pill tabs etc) */
.ck-hscroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.ck-hscroll::-webkit-scrollbar { display: none; }

/* ── Profile display name — mobile sizes first ───────────── */

#buddypress .bp-displayed-user-name {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.2;
	margin: 0 0 2px;
	color: var(--ck-text);
}

#buddypress #item-header-cover-image .bp-displayed-user-name {
	color: #fff;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

/* Scale up display name on larger screens */
@media (min-width: 768px) {
	#buddypress .bp-displayed-user-name {
		font-size: 28px;
	}
}

