/* 
 * 
 * Forms have three sections.
 * 	Data/main Secton:	input fields, select, readio button, etcc.
 * 	Validation Section: emvcode -- bot and spam protection (optional) input, button, message
 * 	Submit SEction:     frmrowsubmit -- button, spin and message
 *
 * Data/Main Section layout:
 *
 * frmonecolumn - single column Labels above the fileds. 
 *
 * frmcentered - same as above, centered in the  parent div
 *
 * frmfldfld - two columns - fields in both colums, that naturally go together 
 *	 	Example: first name and last name, or email, phone.
 * 		labels above the fields (input)
 * 		wide fields like textarea take two columns
 *
 * frmlblval - two columns - left column contains labels, right contains the values (input fields)
 *
 */



form textarea {
	resize: none;
}

form .required {
	color:red;
	font-family: 'Open Sans'; /* Because the character * in some fonts as  Raleway is too small */
}

input[type=file]::file-selector-button {
	margin-right: 20px;
	border: none;
	background-color:#efefef;
	padding: 5px 20px;
	border: 1px solid #afafaf ;
    border-radius: 5px;
	cursor: pointer;
	transition: background .2s ease-in-out;
}

input[type=file]::file-selector-button:hover {
	background-color:#dfdfdf;
}


form input, textarea, select {
	font-family: inherit;
	font-size:85%;
	background-color:#ffffff90;
	border: 1px solid #00000050;
	color:  #000000C0;
    padding: 0.2em 0.4em;
}

form textarea {
	width:100%;
	padding:0.5em;
	height:12rem;
	font-family: inherit;
}

.frmhead {
	font-size:1.5rem;
	border-bottom:1px solid #dac9da;
	margin-bottom:2rem;
}

.frmfldfld {  
	margin: 0 auto;
	width:100%; 
	max-width:60rem;
	background-color: #ffffffbd;
	border: 1px solid #00000050; 
	text-align:left;
	padding: 2rem;
}

.frmlblval {  
	margin: 0 auto;
	width:100%;
	padding: 2rem 1rem;
	text-align:left;
}



.frmonecolumn .frmfields input[type='text'] ,
.frmfldfld .frmfields input[type='text'] {
	width:100%;
}



.frmlblval .frmfields {
	display: grid;
	grid-gap: 0.6em;
	align-items:baseline;
}

.frmlblval .frmfields >:nth-child(even) {
	text-align:left;
}

.frmlblval select {
	width:max-content;
}


.frmrow1item {
	margin:10px 0;
}

.frmrow1item input {
	width:100%;
}


.frmrowemvc {
	background-color:#ffffff90;
	border: 1px solid #00000050;
	padding:0.5rem;
}


.frmemvcbox  {
	display:flex;
	flex-flow:row nowrap;
	align-items: center;
}

.frmemvcbox  input {
	margin: 0 0.5rem;
	width:5rem;
}

.frmemvcbox  button {
	font-size:90%;
	margin-right:1rem;
	padding: 0.2em 0.4em;
}
.frmemvcbox .frmemvcspin { /* this is for spin busywaiting.gif */
	display:none;
	width: 24px;
	height:24px;
	flex: 0 0 auto; /* no grow, no shrink, width as given */
}

.frmonecolumn .frmrowemvc {
	padding: 0.5em 1em;
}

.smaller {
	font-size: 90%;
}

.smalleri {
	font-size: 90%;
	font-style: italic;
}

.xsmaller {
	font-size: 85%;
}

.xsmalleri {
	font-size: 85%;
	font-style: italic;
}

.lighter {
    color:#000000a3;
}

.frmrowsubmit {
	display:flex;
	flex-flow:row nowrap;
	align-items:flex-start;
	margin: 1rem 0;
	gap:1em;
}

.frmbtnbig {
	font-size: 140%;
	padding: 0.35em 1em;
}

.frmbtnsmall {
	font-size: 85%;
	padding: 0.2em 0.8em;
	background-color: #0000f02b;
}

.frmbtnsmall,
.frmbtnbig {
	flex: 0 0 auto;
    border-radius: 9px;
	border: 1px solid #afafaf ;
	background-color:#efefef;
	cursor:pointer;
}

.frmbtnsmall:hover,
.frmbtnbig:hover {
	background-color:#dfdfdf;
}


.frmrowsubmit img { /* this is busywaiting.gif */
	display:none;
	width: 40px;
	height:40px;
	flex: 0 0 auto; /* no grow, no shrink, width as given */
}

.frmmessage {
    line-height: 1.2em;
	width: 20rem;
	padding-left: 1rem;
	flex: 1 1 auto;  /* grow, shrink, start with width as given */
}

.success {
	color:#090; 	
	border-left:5px solid #090;
	padding-left:0.5rem;
}

.failure {
	border-left:5px solid #d00;
	padding-left:0.5rem;
}

.frmonecolumn .frmrowsubmit,
.frmonecolumn .frmmessage {
	padding: 0;
	width: 100%;
}

.frmfldfld .frmrowemvc,
.frmfldfld .frmrowsubmit {
	width: 100%;
}


.frmcentered {
	margin: 0 auto;
	max-width:32rem;
}


.frmcentered .frmfields,
.frmcentered .frmrowsubmit {
	padding: 1em 0;
	width: ffit-content;
	margin: auto;
}

ul.frmradiov,
ul.frmcheckboxv {
	list-style-type: none;	
	margin:0;
	padding:0;
}

ul.frmradiov li,
ul.frmcheckboxv li {
	margin:0;
	padding:0;
}

.frmonecolumn textarea {
	height:10rem;
}

.frmonecolumn label {
	color: #1f559c;
    display: block;
    padding-left: 1.5em;
    text-indent: -1.5em;
}


.ipbig {
	width:20rem;
}

.ipmedium {
	width:15rem;
}

.ipsmall {
	width:10rem;
}

.ipxsmall {
	width:6rem;
}

.frmfldnote {
	font-size:80%;
	color: #00004690
}

.tooltip {
	position: relative;
	display: inline-block;
	vertical-align:super;
	font-size:70%;
}


.tooltip .tooltiptext {
	position: absolute;
	z-index: 1;
	left: 0%;
	bottom: 100%;
	visibility: hidden;
	font-size: 130%;
	margin-left: -20px;  
	white-space: nowrap;
	color: #440;
	background-color: #ffffb9; /* this color should have good contrast with the frmfldfld background color */
	border: 1px solid #bbf ;
	border-radius: 4px;
	text-align: left;
	padding: 0.3em 0.6em;
	/* Position the tooltip */
	transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
 	visibility: visible;
	opacity: 1;
}

@media screen and (max-width: 600px) {

.frmfldfld .frmfields {
	grid-template-columns: 1fr;
}
}

@media screen and (min-width: 600px) {

.frmfldfld .frmfields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5em 2em;
}

.frmlblval .frmfields {
	grid-template-columns: 1fr 2fr;
}

.frmlblval .frmfields >:nth-child(odd) {
	text-align:right;
}

}


