/* ===========================================================
   fm_form_responsive_all.css  (Load this file LAST)
   - Includes original add.css (sanitized) + responsive rules
   - Keeps desktop table layout intact
   - Stacks labels/fields vertically on small screens only
   =========================================================== */

/* ====== [1] Original add.css (sanitized) ====== */
@charset "utf-8";
/* CSS Document */

body {
	background-color: #FFF;
	padding: 0;
	margin: 0;
	background-image: url(../img/bg.gif) !important;
	background-repeat: repeat-y !important;
	background-position: center !important;
}

#top {
	margin: auto;
	margin-top: 0;
	margin-bottom: 0;
	padding: 4px 0 0 0;
	background-color: #FFF;
	width: 600px;
	max-width: 100%;
	text-align:left;
	/*border-left: 10px solid #3BAAD6;
	border-right: 10px solid #3BAAD6;*/
	/*border: 1px solid #FFF;*/
	/*height: 100%;*/
	
}

.headerimg {
	text-align: right;
	margin-top: 1em;
}
@media (max-width: 768px) {
	.headerimg {
		margin-right: 1em;
	}
	.headerimg img {
		max-width: 40vw;
		height: auto;
	}
}

#form_mes p {
	margin-top: 0;
	padding-top: 0;
	/*border-left: 10px soild #3BAAD6;*/
}

#form_mes {
	margin:10px 10px 10px 10px;
	padding:0;
	/*padding-top: 10px;*/
	padding-bottom: 5px;
	/*padding: 10px;*/
	/*border-left: 10px solid #3BAAD6;*/
	/*padding: 10px;*/
	/*padding-left: 14px;*/
	font-size: 14px;
	line-height: 140%;
	/*background-color: #1EA7CC;*/
	/*background-color: #006633;*/
	background-color: #FBDCBD;
	color: #000;
	text-align: center;
}

#form_mes p {
	text-align: left;
	padding: 10px 10px 0 10px;
}

#form_mes p span {
	font-size: 12px;
}


#message {
	margin:10px 10px 10px 10px;
	padding:0;
	padding-top: 10px;
	padding-bottom: 10px;
	/*padding: 10px;*/
	/*border-left: 10px solid #3BAAD6;*/
	/*padding: 10px;*/
	padding-left: 14px;
	font-size: 12px;
	background-color: #FFF;
	color: #FF0000;
	font-weight: bold;
	border: 1px dotted #FF0000;
}

table.bordered {
	width: 96% !important;
	margin: 10px 10px;
	border-top: 1px solid #CCC;
	border-left: 1px solid #CCC;
}
table.bordered td {
	padding: 10px;
	border-right: 1px solid #CCC;
	border-bottom: 1px solid #CCC;
}

/*#form_mes strong {
	border-left: 10px soild #CCC;
	padding-left: 16px;
}*/

#copyright {
	/*padding; 10px auto;*/
	padding-bottom: 20px;
	font-weight: bold;
	text-align:center;
	color: #FFFFFF;
}

.pagetop {
	display: none;
	position: fixed;
	bottom: 30px;
	right: 55px;
}
.pagetop a {
	display: block;
	width: 50px;
	height: 50px;
	background-color: rgba( 51,51,51,0.40 );
	border-radius: 50px;
	text-align: center;
	color: #fff;
	font-size: 24px;
	text-decoration: none;
	line-height: 50px;
}

#maincontent #sendtable input {
	display: block;
	margin:5px auto !important;
	padding:0;
}

#maincontent #sendtable td p {
	margin: 1em;
}

#maincontent table.bordered td p {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}


/* ====== [2] Responsive/override layer ====== */

/* Safe baseline */
#maincontent, #wrap { box-sizing: border-box; }
#maincontent *, #wrap * { box-sizing: inherit; }
#maincontent img, #maincontent video { max-width: 100%; height: auto; }
#maincontent table { width: 100%; border-collapse: collapse; table-layout: auto; }
#maincontent td { vertical-align: top; }
#wrap, #maincontent { max-width: 100%; overflow-x: hidden; }

/* Inputs default */
#maincontent input[type="text"],
#maincontent input[type="email"],
#maincontent input[type="tel"],
#maincontent input[type="url"],
#maincontent input[type="number"],
#maincontent input[type="search"],
#maincontent textarea,
#maincontent select {
  max-width: 70%;
  font-size: 16px;
}
#maincontent input[type="radio"],
#maincontent input[type="checkbox"] { width: auto; }

/* Desktop guard (wider screens keep table layout) */
@media (min-width: 769px) {
  #maincontent table.bordered              { display: table !important; }
  #maincontent table.bordered tbody        { display: table-row-group !important; }
  #maincontent table.bordered tr           { display: table-row !important; }
  #maincontent table.bordered td           { display: table-cell !important; width: auto !important; }
  #wrap { width: auto !important; }
}

/* Mobile: stack vertically */
@media (max-width: 768px) {
  #wrap, #maincontent {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 12px;
    padding-right: 12px;
  }

  #maincontent, #maincontent td, #maincontent p, #maincontent label, #maincontent span {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  #maincontent table.bordered,
  #maincontent table.bordered tbody,
  #maincontent table.bordered tr,
  #maincontent table.bordered td {
    display: block !important;
    width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
  }

#maincontent table.bordered tr {
    border: 1px solid #ddd;
    margin: 10px 0;
    padding: 10px;
    background: #fff;
  }
  #maincontent table.bordered td {
    border: 0 !important;
    padding: 6px 0 !important;
  }
  #maincontent table.bordered td:first-child {
    font-weight: bold;
    color: #333;
    margin-bottom: 6px;
  }
  #maincontent table.bordered td:nth-child(3) {
    font-size: 0.92em;
    color: #777;
    margin-top: 4px;
  }
  #maincontent table.bordered td[nowrap] { white-space: normal !important; }

	#maincontent table.bordered {
		width: 93% !important;
		margin: 1em !important;
	}
	#maincontent table.bordered tr {
		margin-bottom: 1em !important;
	}
	#maincontent table.bordered td {
		margin: 1em !important;
		border: 10px solid #000;
		/*margin-right: 10em !important;*/
		/*border-right: 10px solid #000;*/
	}

	#maincontent table.bordered td p {
		margin-right: 2em;
	}

  #maincontent input[type="text"],
  #maincontent input[type="email"],
  #maincontent input[type="tel"],
  #maincontent input[type="url"],
  #maincontent input[type="number"],
  #maincontent input[type="search"],
  #maincontent textarea,
  #maincontent select {
    width: 70% !important;
    max-width: 70% !important;
    min-width: 0 !important;
    display: block;
  }

  #maincontent dl { width: auto !important; }
  #maincontent dl dt,
  #maincontent dl dd {
    float: none !important;
    width: 100% !important;
    display: block !important;
    clear: both;
  }
  #maincontent dl dt { margin: 14px 0 6px; font-weight: bold; }
  #maincontent dl dd { margin: 0 0 14px; }

  #maincontent #sendtable input,
  #maincontent #sendtable2 input,
  #maincontent input[type="submit"],
  #maincontent input[type="button"],
  #maincontent button {
    display: inline-block;
    margin: 14px auto !important;
  }
  #maincontent #sendtable input,
  #maincontent #sendtable2 input { margin-left: 0 !important; }
  
  #maincontent #sendtable input {
	display: block;
	margin:5px auto !important;
	padding:0;
  }

}
