/* ================== Base Styles ================== */
body {
	font-family: Arial, sans-serif;
	background-color: #fff;
	margin: 0;
	padding: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	box-sizing: border-box;
}

/* Header */
.top-header {
	height: 90px;
	background-color: #fff;
	border-bottom: 1px solid #eee;
	display: flex;
	align-items: center;
	padding: 0 15px;
	box-sizing: border-box;
	position: fixed;
	top: 0;
	width: 100%;
	z-index: 10;
}

/* Remember me */
.remember-me {
    margin-top: 5px;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
}

/* Checkbox clickable */
.remember-label input {
    cursor: pointer;
}

/* Text NOT clickable */
.remember-label span {
    pointer-events: none;
}

/* Styling for the password input and toggle button */
.password-container {
	position: relative;
	display: flex;
	align-items: center;
}

/* ================================
   PASSWORD CONTAINER
================================ */
.password-container {
	position: relative;
	width: 100%;
	/* Ensure it takes the full width of the parent */
}

/* Password input style */
#password {
	width: 100%;
	padding: 10px 40px 10px 15px;
	/* Added padding to the right (40px) to make room for the button */
	font-size: 14px;
	border-radius: 5px;
	border: 1px solid #ccc;
	background-color: #fff;
	box-sizing: border-box;
}

/* Toggle password visibility button */
#togglePassword {
	position: absolute;
	right: 12px;
	/* 10px from the right edge of the container */
	top: 50%;
	transform: translateY(-50%);
	/* Vertically center the button */
	background: none;
	border: none;
	cursor: pointer;
	font-size: 13px;
	color: #555;
}

#togglePassword:hover {
	color: #0693e3;
	/* Change color on hover */
}

#togglePassword:focus {
	outline: none;
	/* Remove focus outline */
}

/* Logo */
.logo img {
	width: 60px;
	height: 60px;
	object-fit: contain;
}

/* Main container */
.main-container {
	flex: 1;
	/* Allow main container to take available space */
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding-top: 100px;
	/* Space for the fixed header */
	padding-bottom: 60px;
	/* Space for the fixed footer */
	overflow-y: auto;
	/* Enable vertical scrolling */
	box-sizing: border-box;
}

/* Login container */
.login-container {
	width: 95%;
	max-width: 600px;
	padding: 20px;
	background-color: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	box-sizing: border-box;
}

/* Heading */
h1 {
	font-size: 26px;
	margin-bottom: 20px;
	text-align: center;
}

/* Helper text */
.helper-text {
	font-size: 14px;
	color: #555;
	margin-bottom: 20px;
}

/* Form group */
.form-group {
	margin-bottom: 15px;
	display: flex;
	flex-direction: column;
}

.form-group label {
	margin-bottom: 5px;
	color: #333;
}

.form-group input {
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 14px;
	box-sizing: border-box;
	outline: none;
}

.form-group input:focus {
	border-color: #0693e3;
}

/* Password row */
.label-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 5px;
}

/* Lost password link style */
#forgotPassword {
	font-size: 14px;
	/* Match the font size of the label */
	color: #333;
	/* Match the color of the label text */
	margin-bottom: 5px;
	/* Give some space at the bottom similar to labels */
	cursor: pointer;
}

#forgotPassword:hover {
	color: #0693e3;
	/* Change color on hover to make it stand out like a button */
}

/* Messages */
.error-msg {
	color: red;
	margin-top: 5px;
	display: none;
}

.success-msg {
	color: #6da300;
	margin-top: 5px;
	display: none;
}

.closed-msg {
	color: #cc8800;
	margin-top: 5px;
	display: none;
}

/* Buttons */
.button-group {
	margin-top: 20px;
	display: flex;
	gap: 10px;
}

.login-btn,
.register-btn {
	background-color: #000;
	color: #fff;
	padding: 10px 20px;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	flex: 1;
}

.login-btn:hover,
.register-btn:hover {
	background-color: #222;
}

/* ================================
   FOOTER / BOTTOM BAR
================================ */
.bottom-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	background-color: #fff;
	border-top: 1px solid #eee;
	z-index: 30;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	padding: 0 14px;
	height: 60px;
	box-sizing: border-box;
}

.footer-text {
	font-size: 14px;
	color: #666;
	white-space: nowrap;
}

.language-container select {
	padding: 6px;
	font-size: 14px;
}

/* ================================
   TABLETS
================================ */
@media (max-width: 768px) {
	.login-container {
		width: 90%;
		margin-top: 100px;
	}

	.bottom-bar {
		padding: 0 12px;
	}

	.language-container {
        width: auto;
        display: flex;
        justify-content: center;
    }

    .language-container select {
        width: auto;
        max-width: 90%;
        padding: 6px;
        font-size: 14px;
        text-align: left;
    }
}

/* ================================
   MOBILE
================================ */
html,
body {
	height: 100%;
	overflow: auto;
}

@media (max-width: 480px) {
	body {
		display: flex;
		flex-direction: column;
		align-items: center;
		padding: 10px 0;
	}

	.top-header {
		height: 70px;
		padding: 10px 15px;
	}

	.logo img {
		width: 50px;
		height: 50px;
	}

	/* Adjusting the main container to allow scrolling on mobile */
	.main-container {
		overflow-y: auto;
		flex: 1;
		/* Allow this to take the remaining space */
		padding-top: 80px;
		/* Adjust padding to avoid overlap with header */
		padding-bottom: 60px;
		/* Keep space for footer */
	}

	.login-container {
		width: 98%;
		padding: 15px;
		margin-top: 0;
		/* Remove the previous margin-top */
	}

	.button-group {
		flex-direction: column;
	}

	.login-btn,
	.register-btn {
		width: 100%;
	}

	/* ✅ FIXED MOBILE FOOTER */
	.bottom-bar {
        height: auto;
        padding: 10px 12px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        text-align: center;
    }

	.footer-text {
		font-size: 12px;
		white-space: normal;
	}

	.language-container {
        width: auto;
        display: flex;
        justify-content: center;
    }

    .language-container select {
        width: auto;
        max-width: 90%;
        padding: 6px;
        font-size: 14px;
        text-align: left;
    }
}

/* ================================
   MOBILE LANDSCAPE
================================ */
@media (min-width: 481px) and (max-width: 768px) {

	html,
	body {
		height: 100%;
		overflow: auto;
		/* Ensure scrolling is enabled */
	}

	.main-container {
		overflow-y: auto;
		/* Allow vertical scrolling on mobile landscape */
		padding-top: 80px;
		/* Ensure the same top gap as in mobile portrait */
		padding-bottom: 60px;
		/* Keep space for footer */
		flex: 1;
	}

	.login-container {
		width: 90%;
		padding: 15px;
		margin-top: 0;
		/* No additional margin-top */
	}

	.bottom-bar {
		height: auto;
		padding: 10px 12px;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 6px;
		text-align: center;
	}

	.footer-text {
		font-size: 12px;
		white-space: normal;
	}

	.language-container {
		width: auto;
		display: flex;
		justify-content: center;
	}

	.language-container select {
		width: auto;
		/* Adjust the dropdown width based on content */
		max-width: 90%;
		/* Ensure it doesn't exceed 90% of the parent container */
		padding: 6px;
		font-size: 14px;
		text-align: left;
		/* Optionally, align the text inside the select element */
	}
}