﻿/* styles.css */
:root {
	--inputBorderColor: lightgray;
	--inputFocusBorderColor: #607BFF;
	--inputColor: #495057;
	--buttonSubmitBGColor: #007BFF;
	--buttonSubmitTextColor: white;
	--buttonSubmitDisabledColor: #ccc;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: "Courier New", Courier, monospace;
}

header, footer {
	background-color: #f8f8f8;
	padding: 20px;
	text-align: center;
}

main {
	_padding: 20px;
}

#contentWrapper {
	transition: filter 0.3s;
}

.blur {
	filter: blur(5px);
}

.hidden {
	display: none;
}

.error {
	border: 2px solid red !important;
}

.popup {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: white;
	padding: 20px;
	border: 1px solid #ccc;
	border-radius: 4px;
	z-index: 1001;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
	width: auto; 
	max-width: 500px; /* Set a maximum width */
}

button {
	display: block;
	float: left;
    padding: 8px 16px;
    background-color: var(--buttonSubmitBGColor);
    border: none;
    border-radius: 4px;
    color: var(--buttonSubmitTextColor); 
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

button:hover {
    font-weight: bold;
    transform: scale(1.03);
}

button:focus {
	transform: scale(1);
}

button:disabled {
	background-color:var(--buttonSubmitDisabledColor);
	cursor: not-allowed;
}

#contentOverlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.15);
	z-index: 1000;
}

.popupContent {
	max-height: 80vh;
	overflow-y: auto;
}

.closeBtn {
	position: absolute;
	top: 10px;
	right: 10px;
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
}

.inputWrapper {
	position: relative;
	display: flex;
	align-items: center; /* flex-start; /* Align items at the top */
}

.inputWrapper.last {
	margin-bottom: 12px;
}

.myForm .inputWrapper:not(:last-of-type) {
	margin-bottom: 12px;
}

.inputWrapper label {
	width: 110px;
}

.icon {
    position: absolute;
    left: 3px;
    bottom: 3px;
    font-size: 16px;
}

.inputWrapper textarea + label {
	/* Top alignment */
	align-self: flex-start;
	margin-bottom: 5px; 
}

.inputWrapper label[for^="message"] {
	align-self: flex-start;
	margin-top: 5px; /* Adjust as needed for spacing */
}

.inputWrapper input,
.inputWrapper textarea {
	width: 100%;
	flex: 1;
	outline: none;
	border: 1px solid var(--inputBorderColor);
	border-radius: 4px;
	padding: 5px;
	padding-right: 14px; /* Space for the clear button */
}

.inputWrapper input:focus,
.inputWrapper textarea:focus {
	border-color: var(--inputFocusBorderColor);
	outline: none; /* Optional: Remove the default outline */
	box-shadow: 0 0 0 2px rgba(0, 123, 255, .25);
}

.inputIconWrapper {
	position: relative;
	display: flex;
	align-items: center;
	width: auto; /*100%; */
}

.inputIconWrapper input {
	flex: 1;
	padding-left: 30px; /* Space for the icon */
}

.invalid {
	border-color: red !important;
}

.inputWrapper textarea {
	resize: none;
}

.clear-button {
	position: absolute;
	right: 5px;
	background: none;
	border: none;
	font-size: 12px;
	cursor: pointer;
	display: none;
}

.clear-button:hover {
    color: black; /* Change color to black on hover */
}


textarea + .clear-button {
    top: 5px; /* Position the clear button in the upper right corner */
}

/* Target built-in hide/show password icon */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
	font-size: 8px; /* Reduce the size of the icon */
}

input[type="password"]::-webkit-clear-button,
input[type="password"]::-webkit-reveal-button {
	font-size: 8px; /* Reduce the size of the icon */
}

.charCounter {
    bottom: 2px;
    right: 5px;
    text-align: right;
    font-size: 10px;
    color: #666;
    position: absolute;
}

.required::after {
	content: '*';
	color: red;
}


@media (max-width: 600px) {

	.inputWrapper {
		_width: 100%; /* Ensure input groups take full width */
		flex-direction: column; /* single line */
		align-items: flex-start; /* single line */
	}
	
	.inputWrapper .clear-button{
		margin-top: 25px;
	}
	
}


#form1 {
	width: 100%;
}


#form2 input {
	width: 200px;
}
