﻿.container-mailForm {
	_width: 800px;
	width: 100%
	margin-top: 30px;
	display: flex;
	flex-direction: column;
	_align-items: flex-start;
	border: 1px solid var(--green-color); /*#ccc; /* Border around the form */
	padding: 20px; /* Padding inside the border */
	border-radius: 5px; /* Rounded corners */
	clear: both;
	_margin-top: 120px;
	_display: flex;
	_justify-content: center;
	_align-items: center;
	position: relative;
}

.container-mailForm h2 {
	_text-align: left;
	margin-bottom: 15px;
}
		
#contactForm {
    _width: 100%;
	display: flex;
	flex-wrap: wrap;
	
	_justify-content: space-between;
	_gap: 0.5em;
	_flex-direction: column;
}

form input, form textarea {
	width: calc(100% - 10px);
	margin: 5px auto;
	padding: 5px;
}	
	
.input-group{
	display: flex;
	align-items: center;  
	_margin-bottom: 5px; 
	position: relative;
	_border: 1px solid green;
	width: fit-content; /* Adjust width to fit content */
}

.input-group:last-of-type {
    margin-bottom: 0;
}

.input-group input,
.input-group textarea {
	border-radius: 5px;
	border: 1px solid var(--green-color);
	_width: 100%;
}

.xname-input {
	flex-grow: 1; /* Allow input to grow */
}

/* .input-group.textarea-group label, */
.input-group.textarea-group {
	align-items: flex-start; /* Align the label at the top for textarea */
}

.input-group label {
	margin-right: 10px;
	width: var(--input-group-label-width);
	display: flex;
	align-items: center;
	width: 110px;
	min-width: 110px;
}

.input-group:last-of-type label {
	margin-top: 5px;
}

.input-group input:focus,
.input-group textarea:focus {
	border-color: #007BFF;
	outline: none; /* Optional: Remove the default outline */
}

.invalid {
	border-color: red !important;
}

.name-input, .text-input {
	padding: 4px 20px 4px 4px;

}
	
.name-input {
	width: 300px;
	_max-width: 300px;
}

.text-input {
	_width: 500px;
	width: 100%;
	_min-width: 400px;
	_max-width: 500px;
	rows: 5;
	padding-right: 30px; /* Extra space for the clear button */
	resize: none;
}

.input-group.textarea-group{
	width: 100%; /* Adjust width to fit content */
}

.clear-button {
	position: absolute;
	background: none;
	border: none;
	cursor: pointer;
	font-size: 16px;
	color: #888;
	display: none;
	_tabindex: -1;
}

.clear-button.name-clear {
	right: 5px;
	top: 50%;
	transform: translateY(-50%);
}

.clear-button.text-clear {
	right: 5px;
	top: 8px;
}
	
.required-indicator {
	color: red;
	margin-left: 2px;
}

.char-counter {
	position: absolute;
	right: 12px;
	bottom: 8px;
	font-size: 12px;
	color: var(--charcounter-color);
}

.xsubmit-button {
	align-self: flex-end;
	padding: 10px 20px;
	background-color: #007BFF;
	color: white;
	border: none;
	border-radius: 5px;
	cursor: pointer;
}

.submit-button {
	padding: 10px 20px;
	background-color: #007BFF;
	color: white;
	border: none;
	border-radius: 5px;
	cursor: pointer;
}
		
.submit-button:disabled {
	background-color: #ccc;
	cursor: not-allowed;
}

.xsubmit-button {
	position: absolute;
	bottom: 20px; /* Adjust as needed */
	right: 20px; /* Adjust as needed */
}

#input-container {
	min-width: 620px;
	flex: 1;
	_display: flex;
	_border: 1px solid green;
}

#submit-button-container {
	padding: 5px 0;
	min-width: 100px;
	flex: 1;
            justify-content: flex-end;
            align-items: flex-end;

	_border: 1px solid red;
	display: flex;
	_justify-content: flex-end; /* Align the button to the right */
	_width: 100%; /* Make the container take full width */
	_margin-top: 10px; /* Space between textarea and submit button */
/*position: absolute; /* Position the submit button */
/*           bottom: 20px; /* Align it to the bottom of the container */
/*            right: 20px; /* Align it to the right of the container */
}
	
.blur {
	filter: blur(5px);
}

        .message {
            display: none;
            position: absolute;
            top: 50%;
            left: 50%;
			_bottom: 0;
            transform: translate(-50%, -50%);
            background-color: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 20px;
            border-radius: 5px;
            width: 100%; /* 300px; /* Match the width of the container */
			height: 100%;
			_display: flex;
			justify-content: center; /* Centers horizontally */
			align-items: center;
        }
        .message.success {
            background-color: lightgreen;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .message.error {
            background-color: lightcoral;
        }
        .message p {
            margin: 0;
            flex: 1;
            text-align: center; /* left; */
        }
        .message button {
            padding: 10px 20px;
            background-color: #007BFF;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
			position: absolute;
            bottom: 20px;
            right: 20px;
        }
        .message button.success {
            background-color: green;
            _margin-left: 10px;
        }
        .message button.error {
            background-color: red;
        }	
		
@media (max-width: 980px) {

	h2 {
		_color: red;
	}
	.cxontainer {
			width: 100%;
			padding-left: 10px;
			padding-right: 10px;
		}
		
	.container-mailForm {
		_width: 800px;
		_width: 100%;
		margin: 0;
		margin-top: 30px;
		
		_display: flex;
		_flex-direction: column;
		_align-items: flex-start;
		border: 1px solid #ccc; /* Border around the form */
		padding: 0px; /* Padding inside the border */
		_border-radius: 5px; /* Rounded corners */
		_clear: both;
		
		_display: flex;
		_justify-content: center;
		_align-items: center;
		width: 100%;
		_padding-left: 10px;
		_padding-right: 10px;
	}
	
	.container-mailForm h2 {
		_text-align: left;
		margin-top: 10px;
		margin-left: 5px;
	}
		
	.input-group {
		_width: 100%; /* Ensure input groups take full width */
		_flex-direction: column; /* single line */
		_align-items: flex-start; /* single line */
	}
	
	.input-group {
		_margin-right: 0;
		margin-bottom: 5px;
		width: auto;
	}
	
	.name-input, .text-input {
		width: 100%;
		padding-right: 30px; /* Ensure space for the clear button */
	}
	
	.xclear-button.name-clear {
		top: 75%;
	}
	
	.clear-button.text-clear {
		xright: 5px;
		top: 25px;
	}
	
	#contactForm {
		width: 100%;
		display: block;
		padding: 5px;
	}
	
	#input-container {
		min-width: 0;
	}

	#submit-button-container {
		min-width: 0;
	}
	
	
	
	.clear-button.name-clear {
		_top: 65%;
	}
	
	.clear-button.text-clear {
		top: 11px;
	}
	
	.char-counter {
       bottom: 8px;
	}
}

@media (max-width: 600px) {

	h2 {
		_color: blue;
	}
	
	#scontactForm {
		width: 100%;
		display: block;
		padding: 5px;
	}
	
	#sinput-container {
		min-width: 0;
	}

	#ssubmit-button-container {
		min-width: 0;
	}
	
	.input-group {
		_width: 100%; /* Ensure input groups take full width */
		flex-direction: column; /* single line */
		align-items: flex-start; /* single line */
	}
	
	.submit-button {
		width: 100%;
		margin-bottom: 10px;
	}
	
	.clear-button.name-clear {
		top: 70%;
	}
	
	.clear-button.text-clear {
		top: 27px;
	}
}
		
	
