/**
 * Creet Public Registration Page Styles
 * Hero section, registration form card, responsive mobile-first layout
 * Design System: Dark gradients, lime green accents (#C3FD73), RTL support
 */

:root {
	--creet-primary: #C3FD73;
	--creet-primary-dark: #a3e635;
	--creet-surface: #000000;
	--creet-surface-alt-1: #1a1a2e;
	--creet-surface-alt-2: #16213e;
	--creet-slate-900: #0f172a;
	--creet-slate-100: #f1f5f9;
	--creet-slate-200: #e2e8f0;
	--creet-slate-50: #f8fafc;
	--creet-text-primary: #0f172a;
	--creet-text-secondary: #334155;
	--creet-text-muted: #64748b;
	--creet-text-faint: #94a3b8;
	--creet-success: #16a34a;
	--creet-success-bg: #ecfdf5;
	--creet-danger: #dc2626;
	--creet-danger-bg: #fee2e2;
	--creet-warning: #f59e0b;
	--creet-info: #3b82f6;
}

/* =========================================================================
   GLOBAL STYLES
   ========================================================================= */

* {
	box-sizing: border-box;
}

html[dir="rtl"],
body[dir="rtl"] {
	direction: rtl;
	text-align: right;
}

.creet-registration-container {
	min-height: 100vh;
	background: linear-gradient(135deg, #000 0%, #0f172a 50%, #16213e 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* =========================================================================
   HERO & WRAPPER
   ========================================================================= */

.creet-registration-wrapper {
	display: grid;
	grid-template-columns: 1fr;
	gap: 40px;
	max-width: 1000px;
	width: 100%;
	align-items: center;
}

.creet-registration-hero {
	color: white;
	text-align: center;
}

.creet-registration-hero-content {
	margin: 0 auto;
}

.creet-registration-title {
	font-size: 48px;
	font-weight: 800;
	color: var(--creet-primary);
	margin: 0 0 16px 0;
	line-height: 1.2;
	letter-spacing: -0.5px;
}

.creet-registration-subtitle {
	font-size: 18px;
	color: rgba(255, 255, 255, 0.85);
	margin: 0;
	line-height: 1.5;
	max-width: 500px;
	margin-left: auto;
	margin-right: auto;
}

/* =========================================================================
   REGISTRATION CARD
   ========================================================================= */

.creet-registration-card {
	background: white;
	border-radius: 16px;
	padding: 40px 36px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(195, 253, 115, 0.1);
	max-width: 420px;
	width: 100%;
	margin: 0 auto;
}

/* =========================================================================
   FORM STYLES
   ========================================================================= */

.creet-registration-form {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.creet-form-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.creet-form-label {
	font-size: 14px;
	font-weight: 600;
	color: var(--creet-text-secondary);
	display: flex;
	align-items: center;
	gap: 4px;
	text-align: right;
}

.creet-required {
	color: var(--creet-danger);
	font-weight: 700;
}

.creet-form-input {
	padding: 12px 16px;
	border: 2px solid var(--creet-slate-200);
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	background: var(--creet-slate-50);
	color: var(--creet-text-primary);
	transition: all 0.2s ease;
	min-height: 40px;
	text-align: right;
}

.creet-form-input::placeholder {
	color: var(--creet-text-faint);
}

.creet-form-input:focus {
	outline: none;
	border-color: var(--creet-primary);
	background: white;
	box-shadow: 0 0 0 3px rgba(195, 253, 115, 0.15);
}

.creet-form-input:disabled {
	background: var(--creet-slate-100);
	color: var(--creet-text-muted);
	cursor: not-allowed;
}

.creet-form-input.is-error {
	border-color: var(--creet-danger);
	background: rgba(220, 38, 38, 0.05);
}

.creet-form-input.is-success {
	border-color: var(--creet-success);
	background: rgba(22, 163, 74, 0.05);
}

/* =========================================================================
   HELPER TEXT & FEEDBACK
   ========================================================================= */

.creet-form-helper {
	font-size: 12px;
	color: var(--creet-text-muted);
	text-align: right;
	line-height: 1.4;
}

.creet-slug-display {
	display: block;
	margin-top: 6px;
	padding: 8px 12px;
	background: var(--creet-slate-50);
	border-radius: 6px;
	border: 1px solid var(--creet-slate-200);
	word-break: break-all;
}

.creet-slug-prefix {
	color: var(--creet-text-faint);
	font-weight: 500;
}

.creet-slug-value {
	color: var(--creet-primary);
	font-weight: 600;
	font-family: monospace;
}

.creet-form-feedback {
	font-size: 12px;
	padding: 6px 12px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	gap: 6px;
	text-align: right;
	font-weight: 500;
}

.creet-form-feedback.creet-hidden {
	display: none;
}

.creet-form-feedback.is-success {
	background: var(--creet-success-bg);
	color: var(--creet-success);
	border: 1px solid #a7f3d0;
}

.creet-form-feedback.is-error {
	background: var(--creet-danger-bg);
	color: var(--creet-danger);
	border: 1px solid #fca5a5;
}

.creet-form-feedback.is-info {
	background: #eff6ff;
	color: #1e40af;
	border: 1px solid #93c5fd;
}

.creet-form-feedback::before {
	font-weight: 700;
	font-size: 14px;
}

.creet-form-feedback.is-success::before {
	content: '✓';
}

.creet-form-feedback.is-error::before {
	content: '✕';
}

.creet-form-feedback.is-info::before {
	content: 'ℹ';
}

/* =========================================================================
   PASSWORD STRENGTH INDICATOR
   ========================================================================= */

.creet-password-strength {
	margin-top: 8px;
}

.creet-strength-bar {
	height: 4px;
	background: var(--creet-slate-200);
	border-radius: 2px;
	overflow: hidden;
	margin-bottom: 6px;
}

.creet-strength-indicator {
	height: 100%;
	width: 0%;
	transition: width 0.3s ease, background-color 0.3s ease;
	background: transparent;
}

.creet-strength-indicator.weak {
	width: 33%;
	background: var(--creet-danger);
}

.creet-strength-indicator.fair {
	width: 66%;
	background: var(--creet-warning);
}

.creet-strength-indicator.strong {
	width: 100%;
	background: var(--creet-success);
}

.creet-strength-text {
	font-size: 12px;
	color: var(--creet-text-faint);
	margin: 0;
	text-align: right;
}

.creet-strength-text.weak {
	color: var(--creet-danger);
}

.creet-strength-text.fair {
	color: var(--creet-warning);
}

.creet-strength-text.strong {
	color: var(--creet-success);
}

/* =========================================================================
   HONEYPOT (SPAM PREVENTION)
   ========================================================================= */

.creet-honeypot {
	display: none !important;
	visibility: hidden !important;
	position: absolute !important;
	left: -9999px !important;
	height: 0 !important;
	width: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	pointer-events: none !important;
}

/* =========================================================================
   FORM ERRORS
   ========================================================================= */

.creet-form-errors {
	background: var(--creet-danger-bg);
	border: 2px solid var(--creet-danger);
	border-radius: 8px;
	padding: 16px;
	color: var(--creet-danger);
	font-size: 13px;
	text-align: right;
}

.creet-form-errors.creet-hidden {
	display: none;
}

.creet-form-errors ul {
	margin: 0;
	padding-right: 20px;
}

.creet-form-errors li {
	margin-bottom: 6px;
}

.creet-form-errors li:last-child {
	margin-bottom: 0;
}

/* =========================================================================
   BUTTONS
   ========================================================================= */

.creet-button {
	padding: 12px 24px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: inherit;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	text-decoration: none;
}

.creet-button:focus {
	outline: 2px solid var(--creet-primary);
	outline-offset: 2px;
}

.creet-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	pointer-events: none;
}

.creet-button-primary {
	background: var(--creet-primary);
	color: var(--creet-surface);
	width: 100%;
}

.creet-button-primary:hover:not(:disabled) {
	background: var(--creet-primary-dark);
	transform: translateY(-2px);
	box-shadow: 0 8px 16px rgba(195, 253, 115, 0.3);
}

.creet-button-primary.is-loading::after {
	content: '';
	width: 14px;
	height: 14px;
	border: 2px solid rgba(0, 0, 0, 0.3);
	border-top-color: var(--creet-surface);
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.creet-button-register.is-loading {
	pointer-events: none;
}

/* =========================================================================
   FORM FOOTER
   ========================================================================= */

.creet-registration-terms {
	font-size: 11px;
	color: var(--creet-text-faint);
	text-align: center;
	margin: 12px 0 0 0;
	line-height: 1.4;
}

.creet-registration-terms a {
	color: var(--creet-primary);
	text-decoration: none;
	font-weight: 500;
	border-bottom: 1px solid var(--creet-primary);
}

.creet-registration-terms a:hover {
	color: var(--creet-primary-dark);
	border-bottom-color: var(--creet-primary-dark);
}

.creet-registration-login {
	font-size: 13px;
	color: var(--creet-text-secondary);
	text-align: center;
	margin: 8px 0 0 0;
}

.creet-registration-login a {
	color: var(--creet-primary);
	text-decoration: none;
	font-weight: 600;
	border-bottom: 1px solid var(--creet-primary);
}

.creet-registration-login a:hover {
	color: var(--creet-primary-dark);
	border-bottom-color: var(--creet-primary-dark);
}

/* =========================================================================
   SUCCESS STATE (after registration)
   ========================================================================= */

.creet-registration-success {
	text-align: center;
	padding: 20px;
}

.creet-registration-success-icon {
	font-size: 48px;
	margin-bottom: 16px;
	color: var(--creet-success);
}

.creet-registration-success h2 {
	font-size: 24px;
	color: var(--creet-text-primary);
	margin: 0 0 8px 0;
}

.creet-registration-success p {
	color: var(--creet-text-secondary);
	margin: 0 0 20px 0;
	line-height: 1.5;
}

.creet-registration-success a {
	color: var(--creet-primary);
	text-decoration: none;
	font-weight: 600;
}

.creet-registration-success a:hover {
	color: var(--creet-primary-dark);
}

/* =========================================================================
   RESPONSIVE DESIGN (Mobile-First)
   ========================================================================= */

@media (max-width: 768px) {
	.creet-registration-wrapper {
		grid-template-columns: 1fr;
		gap: 30px;
		padding: 0 15px;
	}

	.creet-registration-title {
		font-size: 32px;
	}

	.creet-registration-subtitle {
		font-size: 16px;
	}

	.creet-registration-card {
		padding: 28px 24px;
		border-radius: 12px;
	}

	.creet-form-group {
		gap: 6px;
	}

	.creet-form-label {
		font-size: 13px;
	}

	.creet-form-input {
		font-size: 16px; /* Prevent zoom on iOS */
		padding: 10px 14px;
		min-height: 44px;
	}

	.creet-form-helper {
		font-size: 11px;
	}

	.creet-slug-display {
		padding: 6px 10px;
		font-size: 12px;
	}

	.creet-button {
		min-height: 40px;
		padding: 10px 20px;
		font-size: 13px;
	}

	.creet-registration-terms {
		font-size: 10px;
	}

	.creet-registration-login {
		font-size: 12px;
	}
}

@media (min-width: 768px) {
	.creet-registration-wrapper {
		grid-template-columns: 1fr 1fr;
		gap: 60px;
	}

	.creet-registration-card {
		padding: 40px 36px;
	}

	.creet-registration-form {
		gap: 24px;
	}
}

/* =========================================================================
   DARK MODE / LIGHT MODE SUPPORT
   ========================================================================= */

@media (prefers-color-scheme: dark) {
	.creet-registration-card {
		background: #1a1a2e;
		color: white;
	}

	.creet-form-label {
		color: #cbd5e1;
	}

	.creet-form-input {
		background: #0f172a;
		color: white;
		border-color: #334155;
	}

	.creet-form-input:focus {
		background: #1a1a2e;
		box-shadow: 0 0 0 3px rgba(195, 253, 115, 0.2);
	}

	.creet-form-helper {
		color: #94a3b8;
	}

	.creet-slug-display {
		background: #0f172a;
		border-color: #334155;
		color: #cbd5e1;
	}

	.creet-strength-bar {
		background: #334155;
	}

	.creet-registration-terms,
	.creet-registration-login {
		color: #cbd5e1;
	}
}

/* =========================================================================
   ACCESSIBILITY
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
	.creet-form-input,
	.creet-button,
	.creet-strength-indicator {
		transition: none;
	}

	.creet-button-primary:hover:not(:disabled) {
		transform: none;
	}

	@keyframes spin {
		to {
			transform: none;
		}
	}
}

/* Focus visible for keyboard navigation */
.creet-form-input:focus-visible,
.creet-button:focus-visible {
	outline: 2px solid var(--creet-primary);
	outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: more) {
	.creet-form-input {
		border-width: 3px;
	}

	.creet-button {
		border-width: 2px;
	}
}
