/**
 * LitAmb Frontend Auth Styles
 */

/* Container */
.litamb-auth-container {
	max-width: 420px;
	margin: 0 auto;
	padding: 32px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.litamb-auth-title {
	font-size: 24px;
	font-weight: 600;
	margin: 0 0 8px;
	text-align: center;
	color: #1a1a1a;
}

.litamb-auth-description {
	font-size: 14px;
	color: #666;
	text-align: center;
	margin: 0 0 24px;
}

/* Messages */
.litamb-auth-messages {
	margin-bottom: 16px;
}

.litamb-auth-messages:empty {
	display: none;
}

.litamb-auth-message {
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	margin-bottom: 12px;
}

.litamb-auth-message.success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.litamb-auth-message.error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

.litamb-auth-error {
	color: #dc3545;
	text-align: center;
}

.litamb-auth-notice {
	text-align: center;
	color: #666;
}

/* Form */
.litamb-auth-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.litamb-form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.litamb-form-group label {
	font-size: 14px;
	font-weight: 500;
	color: #333;
}

.litamb-form-group label .required {
	color: #dc3545;
}

.litamb-form-group input[type="text"],
.litamb-form-group input[type="email"],
.litamb-form-group input[type="password"] {
	width: 100%;
	padding: 12px 14px;
	font-size: 15px;
	border: 1px solid #ddd;
	border-radius: 8px;
	transition: border-color 0.2s, box-shadow 0.2s;
	background: #fff;
}

.litamb-form-group input:focus {
	outline: none;
	border-color: #17a2b8;
	box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.15);
}

.litamb-form-group input.is-valid {
	border-color: #28a745;
}

.litamb-form-group input.is-invalid {
	border-color: #dc3545;
}

.litamb-field-hint {
	font-size: 12px;
	color: #888;
	margin: 0;
}

/* Form Row (for side-by-side fields) */
.litamb-form-row {
	display: flex;
	gap: 16px;
}

.litamb-form-half {
	flex: 1;
}

@media (max-width: 480px) {
	.litamb-form-row {
		flex-direction: column;
		gap: 16px;
	}
}

/* Password Wrapper */
.litamb-password-wrapper {
	position: relative;
	display: flex;
	align-items: center;
}

.litamb-password-wrapper input {
	padding-right: 44px;
}

.litamb-toggle-password {
	position: absolute;
	right: 8px;
	background: none;
	border: none;
	padding: 8px;
	cursor: pointer;
	color: #888;
	display: flex;
	align-items: center;
	justify-content: center;
}

.litamb-toggle-password:hover {
	color: #333;
}

/* Password Strength */
.litamb-password-strength {
	height: 4px;
	border-radius: 2px;
	background: #eee;
	overflow: hidden;
	transition: all 0.3s;
}

.litamb-password-strength::after {
	content: '';
	display: block;
	height: 100%;
	width: 0;
	transition: all 0.3s;
}

.litamb-password-strength.weak::after {
	width: 25%;
	background: #dc3545;
}

.litamb-password-strength.fair::after {
	width: 50%;
	background: #ffc107;
}

.litamb-password-strength.good::after {
	width: 75%;
	background: #28a745;
}

.litamb-password-strength.strong::after {
	width: 100%;
	background: #17a2b8;
}

/* Invitation Status */
.litamb-invitation-status {
	font-size: 13px;
	min-height: 20px;
}

.litamb-invitation-status.validating {
	color: #888;
}

.litamb-invitation-status.valid {
	color: #28a745;
}

.litamb-invitation-status.invalid {
	color: #dc3545;
}

.litamb-invitation-input {
	text-transform: uppercase;
	letter-spacing: 2px;
}

/* Checkbox Group */
.litamb-checkbox-group {
	flex-direction: row !important;
}

.litamb-checkbox-group label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 400;
	cursor: pointer;
}

.litamb-checkbox-group input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	cursor: pointer;
}

/* Buttons */
.litamb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 500;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s;
}

.litamb-btn-primary {
	background: #17a2b8;
	color: #fff;
}

.litamb-btn-primary:hover {
	background: #138496;
}

.litamb-btn-primary:disabled {
	background: #99d5e0;
	cursor: not-allowed;
}

.litamb-btn-block {
	width: 100%;
}

.litamb-btn .litamb-spinner {
	width: 18px;
	height: 18px;
	border: 2px solid transparent;
	border-top-color: #fff;
	border-radius: 50%;
	animation: litamb-spin 0.8s linear infinite;
}

@keyframes litamb-spin {
	to { transform: rotate(360deg); }
}

/* Form Links */
.litamb-form-links {
	text-align: center;
	font-size: 14px;
}

.litamb-form-links a {
	color: #17a2b8;
	text-decoration: none;
}

.litamb-form-links a:hover {
	text-decoration: underline;
}

/* Divider */
.litamb-auth-divider {
	display: flex;
	align-items: center;
	text-align: center;
	margin: 20px 0;
	color: #888;
	font-size: 13px;
}

.litamb-auth-divider::before,
.litamb-auth-divider::after {
	content: '';
	flex: 1;
	border-bottom: 1px solid #ddd;
}

.litamb-auth-divider span {
	padding: 0 12px;
}

/* Google Button */
.litamb-google-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	padding: 12px 24px;
	background: #fff;
	border: 2px solid #ddd;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
	color: #333;
}

.litamb-google-btn:hover {
	background: #f8f9fa;
	border-color: #ccc;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.litamb-google-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.litamb-google-btn svg {
	flex-shrink: 0;
}

/* Footer */
.litamb-auth-footer {
	margin-top: 24px;
	text-align: center;
	font-size: 14px;
	color: #666;
	padding-top: 16px;
	border-top: 1px solid #eee;
}

.litamb-auth-footer a {
	color: #17a2b8;
	text-decoration: none;
	font-weight: 500;
}

.litamb-auth-footer a:hover {
	text-decoration: underline;
}

/* Plans Selector */
.litamb-plans-group {
	margin-top: 8px;
}

.litamb-plans-selector {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.litamb-plan-option {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border: 2px solid #ddd;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s;
	position: relative;
}

.litamb-plan-option:hover {
	border-color: #17a2b8;
}

.litamb-plan-option.selected {
	border-color: #17a2b8;
	background: rgba(23, 162, 184, 0.05);
}

.litamb-plan-option.featured {
	border-color: #ffc107;
}

.litamb-plan-option.featured.selected {
	border-color: #17a2b8;
}

.litamb-plan-option input[type="radio"] {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: #17a2b8;
}

.litamb-plan-name {
	flex: 1;
	font-weight: 500;
	color: #333;
}

.litamb-plan-price {
	font-weight: 600;
	color: #17a2b8;
}

.litamb-plan-badge {
	position: absolute;
	top: -8px;
	right: 12px;
	background: #ffc107;
	color: #333;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 4px;
	text-transform: uppercase;
}

/* Responsive */
@media (max-width: 480px) {
	.litamb-auth-container {
		padding: 24px 20px;
		margin: 0 16px;
	}

	.litamb-auth-title {
		font-size: 20px;
	}

	.litamb-form-group input[type="text"],
	.litamb-form-group input[type="email"],
	.litamb-form-group input[type="password"] {
		padding: 10px 12px;
		font-size: 16px; /* Prevent zoom on iOS */
	}
}
