/*
Theme Name: Cambio Native Shell
Theme URI: https://example.invalid/
Author: Rafita
Description: Shell PWA minimalista para Casa de Cambio SaaS. Mantiene el Core en el plugin y elimina el chrome visual de WordPress en páginas con los shortcodes de la app.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.2
Text Domain: cambio-native-shell
*/

:root {
	--cc-shell-bg: #0f1115;
	--cc-shell-text: #f8fafc;
	--cc-shell-muted: #94a3b8;
	--cc-shell-border: rgba(255, 255, 255, 0.08);
}

html {
	box-sizing: border-box;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

*,
*::before,
*::after {
	box-sizing: inherit;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	background: #f8fafc;
	color: #0f172a;
}

a {
	color: inherit;
}

.cc-site-shell {
	width: min(1120px, calc(100% - 32px));
	margin: 0 auto;
	padding: 32px 0;
}

.cc-site-header,
.cc-site-footer {
	width: min(1120px, calc(100% - 32px));
	margin: 0 auto;
	padding: 18px 0;
}

.cc-site-header {
	font-weight: 800;
}

.cc-site-footer {
	color: #64748b;
	font-size: 14px;
}

/* App shell: sin header/footer del theme, sin márgenes y preparado para notch/home indicator. */
body.cc-native-app {
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	background: var(--cc-shell-bg);
	color: var(--cc-shell-text);
	overscroll-behavior: none;
}

body.cc-native-app #wpadminbar {
	display: none !important;
}

.cc-native-stage {
	width: 100%;
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0;
	padding: 0;
}

.cc-native-stage > article,
.cc-native-stage > article > .entry-content {
	width: 100%;
	min-height: inherit;
	margin: 0;
	padding: 0;
}

.cc-native-stage .entry-content > :first-child {
	margin-top: 0;
}

.cc-native-stage .entry-content > :last-child {
	margin-bottom: 0;
}

/* Evita zoom involuntario de Safari iOS en controles que no sean propios del plugin. */
body.cc-native-app input,
body.cc-native-app select,
body.cc-native-app textarea,
body.cc-native-app button {
	font-size: 16px;
}

body.cc-native-app button,
body.cc-native-app a,
body.cc-native-app input,
body.cc-native-app select,
body.cc-native-app textarea {
	touch-action: manipulation;
}

@media (display-mode: standalone) {
	body.cc-native-app {
		-webkit-user-select: none;
		user-select: none;
	}

	body.cc-native-app input,
	body.cc-native-app textarea {
		-webkit-user-select: text;
		user-select: text;
	}
}

body.cc-native-public {
	background: #f8fafc;
	color: #0f172a;
	overflow: auto;
}

body.cc-native-public .cc-native-stage {
	display: grid;
	place-items: start center;
	padding-top: max(12px, env(safe-area-inset-top, 0px));
	padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}

body.cc-native-admin {
	background: #0f1115;
	overflow: hidden;
}
