/**
 * Material Design Login-Seite Styles
 * 
 * @package Passwortschutz
 */

/* ========================================
   Reset & Base Styles
   ======================================== */

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body.passwortschutz-login-page {
	font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Container & Card
   ======================================== */

.passwortschutz-container {
	width: 100%;
	max-width: 420px;
	animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.passwortschutz-card {
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
	            0 2px 8px rgba(0, 0, 0, 0.08);
	padding: 2.5rem 2rem;
	position: relative;
	overflow: hidden;
}

/* ========================================
   Header & Branding
   ======================================== */

.passwortschutz-header {
	text-align: center;
	margin-bottom: 2rem;
}

.passwortschutz-logo {
	margin-bottom: 1rem;
}

.passwortschutz-logo img {
	max-height: 64px;
	width: auto;
}

.passwortschutz-title {
	font-size: 1.75rem;
	font-weight: 500;
	color: #212121;
	margin-bottom: 0.5rem;
	letter-spacing: -0.02em;
}

.passwortschutz-subtitle {
	font-size: 0.9375rem;
	color: #757575;
	font-weight: 400;
	line-height: 1.5;
}

/* ========================================
   Error Message
   ======================================== */

.passwortschutz-error {
	background: #ffebee;
	color: #c62828;
	padding: 0.875rem 1rem;
	border-radius: 8px;
	margin-bottom: 1.5rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.875rem;
	border-left: 4px solid #c62828;
	animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.passwortschutz-error-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

/* ========================================
   Form Styles
   ======================================== */

.passwortschutz-form {
	margin-bottom: 1.5rem;
}

/* ========================================
   Input Group (Floating Label)
   ======================================== */

.passwortschutz-input-group {
	position: relative;
	margin-bottom: 2rem;
}

.passwortschutz-input {
	width: 100%;
	font-size: 1rem;
	padding: 0.875rem 0 0.75rem;
	border: none;
	border-bottom: 2px solid #e0e0e0;
	background: transparent;
	outline: none;
	transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	font-family: 'Roboto', sans-serif;
	color: #212121;
}

.passwortschutz-input:focus {
	border-bottom-color: transparent;
}

.passwortschutz-label {
	position: absolute;
	left: 0;
	top: 0.875rem;
	color: #9e9e9e;
	font-size: 1rem;
	font-weight: 400;
	pointer-events: none;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	transform-origin: left top;
}

/* Floating Label Animation */
.passwortschutz-input:focus + .passwortschutz-label,
.passwortschutz-input:not(:placeholder-shown) + .passwortschutz-label,
.passwortschutz-input:valid + .passwortschutz-label {
	top: -1.25rem;
	font-size: 0.75rem;
	color: #1976d2;
	font-weight: 500;
}

/* Animated Underline */
.passwortschutz-input-underline {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background: linear-gradient(90deg, #1976d2 0%, #2196f3 100%);
	transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.passwortschutz-input:focus ~ .passwortschutz-input-underline {
	width: 100%;
}

/* ========================================
   Button (Material Design)
   ======================================== */

.passwortschutz-button {
	width: 100%;
	padding: 0.875rem 1.5rem;
	font-size: 0.9375rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.0892857143em;
	color: #ffffff;
	background: linear-gradient(90deg, #1976d2 0%, #2196f3 100%);
	border: none;
	border-radius: 8px;
	cursor: pointer;
	position: relative;
	overflow: hidden;
	box-shadow: 0 3px 6px rgba(25, 118, 210, 0.3),
	            0 2px 4px rgba(25, 118, 210, 0.2);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	font-family: 'Roboto', sans-serif;
}

.passwortschutz-button:hover {
	background: linear-gradient(90deg, #1565c0 0%, #1976d2 100%);
	box-shadow: 0 6px 12px rgba(25, 118, 210, 0.4),
	            0 3px 6px rgba(25, 118, 210, 0.3);
	transform: translateY(-2px);
}

.passwortschutz-button:active {
	transform: translateY(0);
	box-shadow: 0 2px 4px rgba(25, 118, 210, 0.3);
}

.passwortschutz-button:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.2),
	            0 3px 6px rgba(25, 118, 210, 0.3);
}

.passwortschutz-button-text {
	position: relative;
	z-index: 1;
}

.passwortschutz-button-icon {
	width: 18px;
	height: 18px;
	position: relative;
	z-index: 1;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.passwortschutz-button:hover .passwortschutz-button-icon {
	transform: translateX(4px);
}

/* Ripple Effect Container */
.passwortschutz-button::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.4);
	transform: translate(-50%, -50%);
	transition: width 0.6s, height 0.6s;
}

.passwortschutz-button.ripple::before {
	width: 300px;
	height: 300px;
}

/* ========================================
   Footer
   ======================================== */

.passwortschutz-footer {
	text-align: center;
	padding-top: 1rem;
	border-top: 1px solid #f5f5f5;
}

.passwortschutz-footer p {
	font-size: 0.8125rem;
	color: #9e9e9e;
	line-height: 1.5;
}

.passwortschutz-footer strong {
	color: #616161;
	font-weight: 500;
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes shake {
	0%, 100% {
		transform: translateX(0);
	}
	10%, 30%, 50%, 70%, 90% {
		transform: translateX(-8px);
	}
	20%, 40%, 60%, 80% {
		transform: translateX(8px);
	}
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 480px) {
	.passwortschutz-card {
		padding: 2rem 1.5rem;
	}

	.passwortschutz-title {
		font-size: 1.5rem;
	}

	.passwortschutz-subtitle {
		font-size: 0.875rem;
	}

	.passwortschutz-button {
		font-size: 0.875rem;
		padding: 0.75rem 1.25rem;
	}
}

@media (max-width: 360px) {
	body.passwortschutz-login-page {
		padding: 0.5rem;
	}

	.passwortschutz-card {
		padding: 1.5rem 1rem;
	}
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
	body.passwortschutz-login-page {
		background: white;
	}

	.passwortschutz-card {
		box-shadow: none;
		border: 1px solid #e0e0e0;
	}
}

/* ========================================
   Dark Mode Support (optional)
   ======================================== */

@media (prefers-color-scheme: dark) {
	/* Kann später für Dark Mode erweitert werden */
}

/* ========================================
   Accessibility Improvements
   ======================================== */

.passwortschutz-input:focus,
.passwortschutz-button:focus {
	outline: 2px solid transparent;
	outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
	.passwortschutz-input {
		border-bottom-width: 3px;
	}

	.passwortschutz-button {
		border: 2px solid transparent;
	}
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
