/**
 * Kiosk Login Style
 *
 * Full-screen, distraction-free styling for check-in kiosk login interface.
 *
 * @package Kingdom_Connect
 */

/* Reset and Base Styles */
html,
body.kc-kiosk-login {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: #1a1a1a;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body.kc-kiosk-login * {
	box-sizing: border-box;
}

/* Hide all WordPress elements */
body.kc-kiosk-login #wpadminbar,
body.kc-kiosk-login header,
body.kc-kiosk-login footer,
body.kc-kiosk-login .site-header,
body.kc-kiosk-login .site-footer,
body.kc-kiosk-login nav,
body.kc-kiosk-login .main-navigation,
body.kc-kiosk-login .site-navigation {
	display: none !important;
	visibility: hidden !important;
	height: 0 !important;
	overflow: hidden !important;
}

/* Main Container */
.kc-kiosk-login-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 999999;
}

.kc-kiosk-login-content {
	background: #ffffff;
	border-radius: 20px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	padding: 60px 40px;
	max-width: 600px;
	width: 100%;
	text-align: center;
	animation: fadeInUp 0.5s ease-out;
}

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

/* Logo/Branding */
.kc-kiosk-logo {
	margin-bottom: 40px;
}

.kc-kiosk-logo h1 {
	margin: 0 0 10px 0;
	font-size: 36px;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.2;
}

.kc-kiosk-subtitle {
	margin: 0;
	font-size: 18px;
	color: #666;
	font-weight: 400;
}

/* Login Form */
.kc-login-form {
	position: relative;
}

.kc-login-method {
	display: none;
}

.kc-login-method.kc-active {
	display: block;
}

.kc-login-method h2 {
	margin: 0 0 10px 0;
	font-size: 28px;
	font-weight: 600;
	color: #1a1a1a;
}

.kc-instructions {
	margin: 0 0 30px 0;
	font-size: 16px;
	color: #666;
}

/* Phone Input Display */
.kc-phone-input-container {
	margin: 30px 0;
}

.kc-phone-display {
	display: flex;
	justify-content: center;
	gap: 15px;
	margin-bottom: 30px;
}

.kc-phone-digit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 70px;
	height: 90px;
	font-size: 48px;
	font-weight: 700;
	color: #1a1a1a;
	background: #f5f5f5;
	border: 3px solid #e0e0e0;
	border-radius: 12px;
	transition: all 0.3s ease;
}

.kc-phone-digit:not(:empty) {
	background: #667eea;
	color: #ffffff;
	border-color: #667eea;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Keypad */
.kc-keypad {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 15px;
	max-width: 400px;
	margin: 0 auto;
}

.kc-keypad-btn {
	padding: 25px 20px;
	font-size: 28px;
	font-weight: 600;
	color: #1a1a1a;
	background: #ffffff;
	border: 2px solid #e0e0e0;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.2s ease;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.kc-keypad-btn:hover {
	background: #f5f5f5;
	border-color: #667eea;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.kc-keypad-btn:active {
	transform: translateY(0);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.kc-keypad-clear {
	background: #ff6b6b;
	color: #ffffff;
	border-color: #ff6b6b;
	font-size: 18px;
}

.kc-keypad-clear:hover {
	background: #ff5252;
	border-color: #ff5252;
}

.kc-keypad-search {
	background: #667eea;
	color: #ffffff;
	border-color: #667eea;
	font-size: 18px;
	grid-column: span 2;
}

.kc-keypad-search:hover:not(:disabled) {
	background: #5568d3;
	border-color: #5568d3;
}

.kc-keypad-search:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

/* QR Code Scanner */
.kc-qr-scanner-container {
	position: relative;
	width: 100%;
	max-width: 400px;
	margin: 0 auto 20px;
	border-radius: 12px;
	overflow: hidden;
	background: #000;
}

.kc-qr-scanner {
	width: 100%;
	height: 300px;
	position: relative;
}

.kc-qr-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	display: flex;
	align-items: center;
	justify-content: center;
}

.kc-qr-frame {
	width: 200px;
	height: 200px;
	border: 3px solid #667eea;
	border-radius: 12px;
	box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

/* Method Toggle */
.kc-method-toggle {
	display: flex;
	gap: 10px;
	margin-top: 30px;
	justify-content: center;
}

.kc-toggle-btn {
	padding: 12px 30px;
	font-size: 16px;
	font-weight: 600;
	color: #666;
	background: #f5f5f5;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.kc-toggle-btn:hover {
	background: #e8e8e8;
}

.kc-toggle-btn.kc-active {
	background: #667eea;
	color: #ffffff;
	border-color: #667eea;
}

/* Buttons */
.kc-button {
	padding: 15px 30px;
	font-size: 18px;
	font-weight: 600;
	color: #ffffff;
	background: #667eea;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
	margin-top: 20px;
}

.kc-button:hover {
	background: #5568d3;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.kc-button:active {
	transform: translateY(0);
}

.kc-button-secondary {
	background: #6c757d;
}

.kc-button-secondary:hover {
	background: #5a6268;
}

/* Error Message */
.kc-error-message {
	margin-top: 20px;
	padding: 15px 20px;
	background: #fee;
	color: #c33;
	border: 2px solid #fcc;
	border-radius: 8px;
	font-size: 16px;
	animation: shake 0.5s ease;
}

@keyframes shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-10px); }
	75% { transform: translateX(10px); }
}

/* Loading Indicator */
.kc-loading-indicator {
	margin-top: 30px;
}

.kc-spinner {
	width: 50px;
	height: 50px;
	margin: 0 auto 15px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #667eea;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.kc-loading-indicator p {
	margin: 0;
	font-size: 16px;
	color: #666;
}

/* Modal */
.kc-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000000;
	animation: fadeIn 0.3s ease;
}

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

.kc-modal-content {
	background: #ffffff;
	border-radius: 20px;
	padding: 40px;
	max-width: 600px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	animation: slideUp 0.3s ease;
}

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

.kc-modal-content h2 {
	margin: 0 0 30px 0;
	font-size: 28px;
	font-weight: 600;
	color: #1a1a1a;
}

/* Families List */
.kc-families-list {
	display: flex;
	flex-direction: column;
	gap: 15px;
	margin-bottom: 30px;
}

.kc-family-item {
	padding: 20px;
	background: #f5f5f5;
	border: 2px solid #e0e0e0;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.2s ease;
	text-align: left;
}

.kc-family-item:hover {
	background: #e8e8e8;
	border-color: #667eea;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.kc-family-item.kc-selected {
	background: #667eea;
	border-color: #667eea;
	color: #ffffff;
}

.kc-family-name {
	font-size: 20px;
	font-weight: 600;
	margin: 0 0 5px 0;
}

.kc-family-phone {
	font-size: 16px;
	color: #666;
	margin: 0;
}

.kc-family-item.kc-selected .kc-family-phone {
	color: rgba(255, 255, 255, 0.8);
}

.kc-family-kids {
	font-size: 14px;
	color: #999;
	margin: 10px 0 0 0;
}

.kc-family-item.kc-selected .kc-family-kids {
	color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
	.kc-kiosk-login-content {
		padding: 40px 20px;
		border-radius: 0;
		max-width: 100%;
		height: 100vh;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}

	.kc-kiosk-logo h1 {
		font-size: 28px;
	}

	.kc-phone-digit {
		width: 60px;
		height: 75px;
		font-size: 40px;
	}

	.kc-keypad {
		gap: 10px;
	}

	.kc-keypad-btn {
		padding: 20px 15px;
		font-size: 24px;
	}

	.kc-qr-scanner {
		height: 250px;
	}

	.kc-qr-frame {
		width: 180px;
		height: 180px;
	}
}

@media (max-width: 480px) {
	.kc-phone-digit {
		width: 50px;
		height: 65px;
		font-size: 32px;
		gap: 10px;
	}

	.kc-keypad-btn {
		padding: 18px 12px;
		font-size: 20px;
	}
}

/* Print Styles */
@media print {
	.kc-kiosk-login-container {
		display: none;
	}
}
