/* 
 * 
 * Forms have three sections.
 * 	Data/main Secton:	input fields, select, readio button, etc.
 * 	Validation Section: emvcode -- bot/spam protection input, button, message
 * 	Submit SEction:     frmsubmitsecion -- button, spin and message
 *
 * Form layout:
 *
 *    frmlblval - two columns - left column contains labels, right contains the values (input fields)
 *         The validation  section, submit section  go to the right as well.
 *
 *    frm_container - 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
 *
 */



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;
	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;
}

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

.frmlblval {
	display: grid;
	grid-template-columns: 1fr 2fr;
	grid-gap: 0.6em;
	align-items:baseline;
}

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


.frmflds1col {
	display:grid;
    grid-template-columns: 1fr;
	grid-gap: 0.6em 0;
	margin: 0.6em 0;
}

.frmflds1col input {
	width:100%;
}

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

.frmflds2col input, textarea {
    width:100%;
}

.frmflds3col {
	display: flex;
	justify-content:space-between;
	margin: 0.5em  0;
}





.frmvalidationsecion {
	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 */
}

.frmsubmitsecion {
	display:flex;
	flex-flow:row nowrap;
	align-items:flex-start;
	margin: 1rem 0;
	gap: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;
}


.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;
}

.frmsubmitsecion img { /* this is busywaiting.gif */
	display:none;
	width: 40px;
	height:40px;
	flex: 0 0 auto; /* no grow, no shrink, 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;
}


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

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

.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 frm_container 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;
}




/* 
 * ==================
 * Responsive adjustments for mobile screens
 * =====================
 */

@media screen and (max-width: 600px) {
    /* on smaller screens collapse the  two column layout  to one column */
    .frmflds2col {
    	grid-template-columns: 1fr;
    }
    
    .frmflds3col {
        display:block;
    }
    
    .frmflds3col > div {
        margin:0.5em 0;
    }
}


