/**
 * Newly Startup shared frontend design system.
 * Scoped to plugin shells so Hello Elementor / theme styles do not leak in.
 */

:root {
	--ns-purple: #6846d8;
	--ns-purple-hover: #5232bd;
	--ns-ink: #20243b;
	--ns-muted: #626681;
	--ns-soft: #f5f2fd;
	--ns-border: #e1d9f7;
	--ns-radius: 10px;
	--ns-radius-sm: 8px;
	--ns-font: Inter, Arial, sans-serif;
	--ns-fs-page: clamp(1.75rem, 2.4vw, 2rem); /* 28–32px */
	--ns-fs-section: clamp(1.25rem, 1.8vw, 1.375rem); /* 20–22px */
	--ns-fs-card: clamp(1rem, 1.4vw, 1.125rem); /* 16–18px */
	--ns-fs-body: 0.9375rem; /* 15px */
	--ns-fs-label: 0.8125rem; /* 13px */
	--ns-fs-help: 0.75rem; /* 12px */
	--ns-fs-btn: 0.875rem; /* 14px */
	--ns-lh-body: 1.6;
	--ns-input-h: 46px;
	--ns-field-gap: 20px;
	--ns-section-gap: 30px;
}

/* Hide WP / Hello / Elementor page titles on founder + auth pages */
body.ns-founder-page .page-header,
body.ns-founder-page .entry-header,
body.ns-founder-page h1.entry-title,
body.ns-founder-page .entry-title,
body.ns-founder-page .page-title,
body.ns-founder-page .elementor-page-title,
body.ns-founder-page .elementor-heading-title.elementor-size-default:first-child,
body.ns-auth-page .page-header,
body.ns-auth-page .entry-header,
body.ns-auth-page h1.entry-title,
body.ns-auth-page .entry-title,
body.ns-auth-page .page-title,
body.ns-auth-page .elementor-page-title {
	display: none !important;
}

/* Shared token inheritance */
.ns-dash-shell,
.ns-auth-shell,
.ns-claim-shell,
.ns-edit,
.ns-header-account,
.ld-account-menu,
.ns-account-panel,
.ns-dash {
	--ns-purple: #6846d8;
	--ns-dark: #5232bd;
	--ns-purple-hover: #5232bd;
	--ns-ink: #20243b;
	--ns-muted: #626681;
	--ns-soft: #f5f2fd;
	--ns-border: #e1d9f7;
	font-family: Inter, Arial, sans-serif !important;
	color: var(--ns-ink);
	font-size: var(--ns-fs-body);
	font-weight: 400;
	line-height: var(--ns-lh-body);
	-webkit-font-smoothing: antialiased;
}

/* Typography scale */
.ns-dash-shell h1,
.ns-auth-shell h1,
.ns-claim-shell h1,
.ns-edit h1,
.ns-account-panel h1,
.ns-dash h1,
.ns-dash-hero h1 {
	font-family: Inter, Arial, sans-serif !important;
	font-size: var(--ns-fs-page) !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	color: var(--ns-ink) !important;
	letter-spacing: -0.02em;
}

.ns-dash-shell h2,
.ns-auth-shell h2,
.ns-claim-shell h2,
.ns-edit h2,
.ns-account-panel h2,
.ns-dash h2,
.ns-dash-section-head h2,
.ns-account-section h2,
.ns-edit-section h2 {
	font-family: Inter, Arial, sans-serif !important;
	font-size: var(--ns-fs-section) !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	color: var(--ns-ink) !important;
}

.ns-dash-shell h3,
.ns-account-panel h3,
.ns-dash h3,
.ns-pay-card h3,
.ns-dash-card-title,
.ns-claim-shell h3 {
	font-family: Inter, Arial, sans-serif !important;
	font-size: var(--ns-fs-card) !important;
	font-weight: 600 !important;
	line-height: 1.35 !important;
	color: var(--ns-ink) !important;
}

.ns-dash-shell p,
.ns-auth-shell p,
.ns-claim-shell p,
.ns-edit p,
.ns-account-panel p,
.ns-dash p,
.ns-dash-lead,
.ns-auth-lead {
	font-family: Inter, Arial, sans-serif !important;
	font-size: var(--ns-fs-body) !important;
	font-weight: 400 !important;
	line-height: var(--ns-lh-body) !important;
	color: var(--ns-muted);
}

.ns-edit-label,
.ns-auth-form label,
.ns-claim-form label,
.ns-claim-option label,
.ns-account-form label.ns-edit-label {
	display: block;
	margin: 0 0 8px;
	font-family: Inter, Arial, sans-serif !important;
	font-size: var(--ns-fs-label) !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	color: var(--ns-ink) !important;
}

.ns-edit-note,
.ns-auth-hint,
.ns-auth-legal,
.ns-dash-empty p,
.ns-account-help {
	font-size: var(--ns-fs-help) !important;
	line-height: 1.5 !important;
	color: var(--ns-muted) !important;
}

/* Shared form controls */
.ns-dash-shell input[type="text"],
.ns-dash-shell input[type="email"],
.ns-dash-shell input[type="url"],
.ns-dash-shell input[type="search"],
.ns-dash-shell input[type="password"],
.ns-dash-shell select,
.ns-dash-shell textarea,
.ns-auth-shell input[type="email"],
.ns-auth-shell input[type="text"],
.ns-claim-shell input[type="text"],
.ns-claim-shell input[type="email"],
.ns-claim-shell input[type="url"],
.ns-claim-shell textarea,
.ns-edit input[type="text"],
.ns-edit input[type="url"],
.ns-edit input[type="email"],
.ns-edit select,
.ns-edit textarea,
.ns-account-panel input[type="text"],
.ns-account-panel input[type="email"],
.ns-account-panel input[type="url"],
.ns-account-panel select,
.ns-account-panel textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: var(--ns-input-h);
	padding: 12px 14px !important;
	border: 1px solid #e1d9f7 !important;
	border-radius: 10px !important;
	background: #fff !important;
	color: var(--ns-ink) !important;
	font-family: Inter, Arial, sans-serif !important;
	font-size: 15px !important;
	font-weight: 400 !important;
	line-height: 1.4 !important;
	box-shadow: none !important;
	outline: none !important;
	appearance: none;
	-webkit-appearance: none;
}

.ns-dash-shell textarea,
.ns-claim-shell textarea,
.ns-edit textarea,
.ns-account-panel textarea {
	min-height: 120px;
	resize: vertical;
}

.ns-dash-shell input:focus,
.ns-dash-shell select:focus,
.ns-dash-shell textarea:focus,
.ns-auth-shell input:focus,
.ns-claim-shell input:focus,
.ns-claim-shell textarea:focus,
.ns-edit input:focus,
.ns-edit select:focus,
.ns-edit textarea:focus,
.ns-account-panel input:focus,
.ns-account-panel select:focus,
.ns-account-panel textarea:focus {
	border-color: #6846d8 !important;
	box-shadow: 0 0 0 3px rgba(104, 70, 216, 0.18) !important;
	outline: none !important;
}

.ns-dash-shell input[readonly],
.ns-dash-shell input:disabled,
.ns-edit input[readonly],
.ns-edit input:disabled,
.ns-edit textarea:disabled,
.ns-edit select:disabled {
	background: var(--ns-soft) !important;
	color: var(--ns-muted) !important;
}

/* Form field rhythm */
.ns-account-form .ns-field,
.ns-edit-form .ns-field,
.ns-auth-form > *,
.ns-claim-form > * {
	margin: 0;
}

.ns-account-form .ns-field + .ns-field,
.ns-edit-section .ns-edit-label {
	margin-top: 0;
}

.ns-account-form,
.ns-edit-form {
	display: grid;
	gap: var(--ns-field-gap);
}

.ns-account-form .ns-edit-actions,
.ns-edit-actions,
.ns-auth-form .ns-auth-button,
.ns-claim-form .ns-claim-button {
	margin-top: 4px;
}

.ns-edit-actions,
.ns-account-form .ns-edit-actions {
	margin-top: 16px !important;
	padding-top: 4px;
}

.ns-account-section,
.ns-edit-section,
.ns-dash-section {
	margin-top: var(--ns-section-gap);
}

/* Purple checkboxes */
.ns-dash-check,
.ns-account-panel .ns-dash-check,
.ns-edit-topics label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 14px;
	line-height: 1.45;
	color: var(--ns-muted);
	cursor: pointer;
}

.ns-dash-check input[type="checkbox"],
.ns-edit-topics input[type="checkbox"],
.ns-account-panel input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 18px !important;
	height: 18px !important;
	min-height: 18px !important;
	margin: 2px 0 0 !important;
	padding: 0 !important;
	flex: 0 0 18px;
	border: 2px solid #e1d9f7 !important;
	border-radius: 4px !important;
	background: #fff !important;
	box-shadow: none !important;
	cursor: pointer;
	position: relative;
}

.ns-dash-check input[type="checkbox"]:checked,
.ns-edit-topics input[type="checkbox"]:checked,
.ns-account-panel input[type="checkbox"]:checked {
	background: #6846d8 !important;
	border-color: #6846d8 !important;
}

.ns-dash-check input[type="checkbox"]:checked::after,
.ns-edit-topics input[type="checkbox"]:checked::after,
.ns-account-panel input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 4px;
	top: 1px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.ns-dash-check input[type="checkbox"]:focus-visible,
.ns-account-panel input[type="checkbox"]:focus-visible {
	outline: 2px solid #6846d8;
	outline-offset: 2px;
}

/* Kill theme red/pink buttons and underlines inside plugin UI */
.ns-dash-shell a,
.ns-auth-shell a,
.ns-claim-shell a,
.ns-edit a,
.ns-header-account a,
.ns-account-nav-link,
.ns-header-account-menu a,
.ns-dash-btn,
.ns-auth-button,
.ns-claim-button,
.ld-account-menu a {
	text-decoration: none !important;
	box-shadow: none;
}

.ns-dash-shell a:hover,
.ns-auth-shell a:hover,
.ns-claim-shell a:hover,
.ns-edit a:hover,
.ns-header-account a:hover,
.ns-account-nav-link:hover,
.ns-header-account-menu a:hover,
.ld-account-menu a:hover {
	text-decoration: none !important;
}

.ns-dash-shell a:focus-visible,
.ns-auth-shell a:focus-visible,
.ns-claim-shell a:focus-visible,
.ns-edit a:focus-visible,
.ns-header-account a:focus-visible,
.ns-account-nav-link:focus-visible,
.ns-dash-btn:focus-visible,
.ns-auth-button:focus-visible,
.ns-header-account-btn:focus-visible,
.ns-auth-google:focus-visible {
	outline: 2px solid #6846d8;
	outline-offset: 2px;
}

.ns-dash-shell button,
.ns-auth-shell button,
.ns-claim-shell button,
.ns-edit button,
.ns-header-account button,
.ns-dash-shell .button,
.ns-auth-shell .button,
.ns-claim-shell .button {
	font-family: Inter, Arial, sans-serif !important;
	text-decoration: none !important;
	box-shadow: none !important;
}

/* Icon-based buttons — centred icon + label */
.ns-dash-btn,
.ns-auth-button,
.ns-auth-google,
.ns-claim-button,
.ns-account-upload-btn,
.ns-header-account-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	font-family: Inter, Arial, sans-serif !important;
	font-size: var(--ns-fs-btn) !important;
	font-weight: 600 !important;
	line-height: 1 !important;
}

/* Sidebar nav links/buttons stay left-aligned icon + label rows */
.ns-dash-shell .ns-account-nav-link,
.ns-dash-shell button.ns-account-nav-logout {
	display: flex !important;
	align-items: center !important;
	justify-content: flex-start !important;
	gap: 10px !important;
	width: 100% !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
}

.ns-dash-btn svg,
.ns-auth-button svg,
.ns-auth-google svg,
.ns-claim-button svg,
.ns-account-upload-btn svg,
.ns-auth-btn-icon,
.ns-account-nav-link .ns-nav-icon {
	display: block !important;
	width: 18px !important;
	height: 18px !important;
	flex: 0 0 18px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	overflow: visible;
	align-self: center;
	position: relative;
	top: 0;
}

.ns-dash-btn span,
.ns-auth-button span,
.ns-auth-google span,
.ns-account-upload-btn span,
.ns-account-nav-link span {
	display: inline-flex !important;
	align-items: center !important;
	line-height: 1 !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Override Hello Elementor / theme button accents (red/pink) on founder chrome */
.ns-dash-shell .ns-account-nav-toggle,
.ns-dash-shell .ns-account-nav-link,
.ns-dash-shell .ns-dash-btn {
	color: inherit;
	background-image: none !important;
}

.ns-dash-shell .ns-account-nav-toggle {
	background: #f5f2fd !important;
	border: 1px solid #e1d9f7 !important;
	color: #20243b !important;
	border-radius: 10px !important;
}

.ns-dash-shell .ns-account-nav-toggle:hover,
.ns-dash-shell .ns-account-nav-toggle:focus {
	background: #ece6fc !important;
	border-color: #6846d8 !important;
	color: #6846d8 !important;
}

/* Neutralise Hello Elementor / theme danger colours on primary actions */
.ns-dash-shell .ns-dash-btn-primary,
.ns-auth-shell .ns-auth-button:not(.ns-auth-button-outline),
.ns-claim-shell .ns-claim-button:not(.ns-claim-button-outline),
.ns-edit .ns-dash-btn-primary,
.ns-account-panel .ns-dash-btn-primary {
	background: #6846d8 !important;
	border-color: #6846d8 !important;
	color: #fff !important;
}

.ns-dash-shell .ns-dash-btn-primary:hover,
.ns-dash-shell .ns-dash-btn-primary:focus,
.ns-auth-shell .ns-auth-button:not(.ns-auth-button-outline):hover,
.ns-auth-shell .ns-auth-button:not(.ns-auth-button-outline):focus,
.ns-claim-shell .ns-claim-button:not(.ns-claim-button-outline):hover,
.ns-claim-shell .ns-claim-button:not(.ns-claim-button-outline):focus,
.ns-account-panel .ns-dash-btn-primary:hover,
.ns-account-panel .ns-dash-btn-primary:focus {
	background: #5232bd !important;
	border-color: #5232bd !important;
	color: #fff !important;
}

.ns-dash-shell .ns-dash-btn-outline,
.ns-auth-shell .ns-auth-button-outline,
.ns-claim-shell .ns-claim-button-outline,
.ns-account-panel .ns-dash-btn-outline {
	background: #fff !important;
	border-color: #6846d8 !important;
	color: #6846d8 !important;
}

.ns-dash-shell .ns-dash-btn-outline:hover,
.ns-auth-shell .ns-auth-button-outline:hover,
.ns-claim-shell .ns-claim-button-outline:hover,
.ns-account-panel .ns-dash-btn-outline:hover {
	background: #f5f2fd !important;
	border-color: #5232bd !important;
	color: #5232bd !important;
}

/* Destructive actions only */
.ns-dash-btn-danger,
.ns-account-panel .ns-dash-btn-danger {
	background: #fff !important;
	border: 1px solid #d94848 !important;
	color: #b42318 !important;
}

.ns-dash-btn-danger:hover,
.ns-account-panel .ns-dash-btn-danger:hover {
	background: #fff5f5 !important;
	border-color: #b42318 !important;
	color: #912018 !important;
}

/* Auth notice / error colours only for real errors */
.ns-auth-shell .ns-auth-notice:not(.ns-auth-notice--ok) {
	background: #fff5f5 !important;
	color: #8a1f1f !important;
	border: 1px solid #f0c7c7;
}

.ns-auth-shell .ns-auth-notice--ok {
	background: #eefbf3 !important;
	color: #1f6b3c !important;
	border: 1px solid #c8e9d5;
}

/* Hide leftover duplicate kickers if any remain in markup */
.ns-dash-kicker {
	display: none !important;
}

@media (max-width: 720px) {
	:root {
		--ns-fs-page: 1.625rem; /* 26px */
		--ns-fs-section: 1.125rem; /* 18px */
		--ns-fs-card: 1rem;
		--ns-fs-body: 0.875rem; /* 14px */
	}
}
