/* OTP Login Page Styles - CETRAD Brand */

.cetrad-otp-login-container {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #073D4A 0%, #1FBDE3 100%);
	padding: 20px;
	font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
	position: relative;
	overflow: hidden;
}

.cetrad-otp-login-container::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: radial-gradient(circle at 20% 50%, rgba(31, 189, 227, 0.1) 0%, transparent 50%),
	            radial-gradient(circle at 80% 80%, rgba(7, 61, 74, 0.1) 0%, transparent 50%);
	pointer-events: none;
}

.otp-login-box {
	background: white;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	width: 100%;
	max-width: 420px;
	padding: 40px;
	animation: slideUp 0.4s ease-out;
	position: relative;
	z-index: 1;
	border-top: 4px solid #1FBDE3;
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.otp-logo {
	text-align: center;
	margin-bottom: 30px;
}

.otp-logo img {
	max-height: 50px;
	width: auto;
}

.otp-header {
	text-align: center;
	margin-bottom: 30px;
}

.otp-header h1 {
	font-size: 28px;
	font-weight: 700;
	background: linear-gradient(135deg, #073D4A 0%, #1FBDE3 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	margin: 0 0 10px 0;
	line-height: 1.2;
}

.otp-header p {
	font-size: 14px;
	color: #1FBDE3;
	margin: 0;
	font-weight: 500;
}

/* Form Steps */
.otp-step {
	display: block;
	opacity: 1;
	transition: opacity 0.3s ease-out;
}

.otp-step.active {
	display: block;
	animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Form Groups */
.otp-form-group {
	margin-bottom: 20px;
}

.otp-form-group label {
	display: block;
	font-size: 14px;
	font-weight: 500;
	color: #1a1a1a;
	margin-bottom: 8px;
}

.otp-form-group input {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	font-size: 16px;
	transition: border-color 0.3s, box-shadow 0.3s;
	box-sizing: border-box;
}

.otp-form-group input:focus {
	outline: none;
	border-color: #1FBDE3;
	box-shadow: 0 0 0 3px rgba(31, 189, 227, 0.1);
}

.otp-form-group input::placeholder {
	color: #999;
}

/* OTP Input Special Styling */
#otp-code {
	font-size: 24px;
	letter-spacing: 8px;
	text-align: center;
	font-weight: 600;
	font-family: 'Courier New', monospace;
}

/* Buttons */
.otp-button {
	width: 100%;
	padding: 12px 20px;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.otp-button-primary {
	background: linear-gradient(135deg, #1FBDE3 0%, #0E6F87 100%);
	color: white;
	margin-bottom: 12px;
	font-weight: 600;
}

.otp-button-primary:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 10px 20px rgba(31, 189, 227, 0.3);
}

.otp-button-primary:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.otp-button-secondary {
	background: #f5f5f5;
	color: #1a1a1a;
	border: 1px solid #e0e0e0;
}

.otp-button-secondary:hover:not(:disabled) {
	background: #eeeeee;
	border-color: #d0d0d0;
}

.otp-button-secondary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Messages */
.otp-error-message,
.otp-success-message {
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	margin-bottom: 20px;
	display: none;
	animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.otp-error-message {
	background: #fee;
	color: #c33;
	border-left: 4px solid #c33;
}

.otp-success-message {
	background: #efe;
	color: #3c3;
	border-left: 4px solid #3c3;
}

/* Countdown */
.otp-countdown {
	font-size: 13px;
	color: #999;
	text-align: center;
	margin-top: 15px;
	font-weight: 500;
}

/* Footer */
.otp-footer {
	text-align: center;
	margin-top: 25px;
	padding-top: 20px;
	border-top: 1px solid #f0f0f0;
	font-size: 13px;
	color: #999;
}

.otp-footer a {
	color: #1FBDE3;
	text-decoration: none;
	transition: color 0.3s;
	font-weight: 600;
}

.otp-footer a:hover {
	color: #0E6F87;
	text-decoration: underline;
}

/* Spinner */
.spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	border-top-color: white;
	animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 480px) {
	.otp-login-box {
		padding: 30px 20px;
	}

	.otp-header h1 {
		font-size: 24px;
	}

	.otp-form-group input {
		font-size: 16px;
		padding: 10px 14px;
	}

	#otp-code {
		font-size: 20px;
		letter-spacing: 6px;
	}

	.otp-button {
		padding: 11px 16px;
		font-size: 14px;
	}
}

/* Logged out message */
.otp-logged-out {
	background: #efe;
	color: #2a5c2a;
	padding: 12px 16px;
	border-radius: 8px;
	margin-bottom: 20px;
	border-left: 4px solid #2a5c2a;
	font-size: 14px;
}

/* Accessibility */
.otp-button:focus {
	outline: 2px solid #1FBDE3;
	outline-offset: 2px;
}

.otp-form-group input:focus-visible {
	outline: 2px solid #1FBDE3;
	outline-offset: 0;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
	.otp-login-box {
		background: #1a1a1a;
		box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
	}

	.otp-header h1 {
		color: #fff;
	}

	.otp-header p {
		color: #999;
	}

	.otp-form-group label {
		color: #fff;
	}

	.otp-form-group input {
		background: #2a2a2a;
		border-color: #444;
		color: #fff;
	}

	.otp-form-group input:focus {
		border-color: #1FBDE3;
		box-shadow: 0 0 0 3px rgba(31, 189, 227, 0.2);
	}

	.otp-form-group input::placeholder {
		color: #666;
	}

	.otp-button-secondary {
		background: #2a2a2a;
		color: #fff;
		border-color: #444;
	}

	.otp-button-secondary:hover:not(:disabled) {
		background: #333;
		border-color: #555;
	}

	.otp-footer {
		border-top-color: #333;
		color: #666;
	}

	.otp-countdown {
		color: #666;
	}
}
