/**************** FORM BUILER *****************/
form{
  margin: 0.5em auto 0 auto;
  width: calc(100% - 2em);
  padding: 1em 1em 0 1em;
  z-index: 0;
  color: #333;
}

legend {
    padding: 0.5em;
    font-weight: 700;
    color: #663;
}

label {
    margin: 0;
    padding: 0.25em 1em;
    font-weight: 600;
    display: inline-block;
    color: #663;
    min-width: 96px;
    text-align: right;
}

label.option{
    padding: 0 0 0 1em;
    min-width: 0;
    text-align: left;
}

textarea {
    display: block;
    width: calc(100% - 4em);
    margin: 0 1em 1em 1em;
    padding: 0.5em 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    /*-webkit-transition: 0.5s;*/
    /*transition: 0.5s;*/
    outline: none;
}

input[type=text] ,
input[type=email],
input[type=password] {
    padding: 0.25em 0.25em;
    margin: 0.25em;
    width: calc(100% - 128px);
    max-width: 65%;
    border: 2px solid #ccc;
    border-radius: 4px;
    outline: none;
}

.required::before {
  content: "*";
  font-weight: 600;
  font-size: 16px;
  color: #ff3366;
  padding-right: 0.2em;
  line-height: inherit;
}

.required2::after {
  content: "*";
  font-weight: 600;
  font-size: 16px;
  color: #ff3366;
  padding-left: 0.2em;
  line-height: inherit;
}

input:hover .helptext,
textarea:hover .helptext {
  display: inline-block;                /* インライン要素として表示 */
}

input:focus,
textarea:focus  {
    border: 2px solid #ffcccc;
    background-color: #fffcfc;
}

button[type=submit],
input[type=submit],
input[type=button].submit{
    margin: 0.5em 1em;
    padding: 0.25em 0.5em;
    background-color: #ede8de;
    border: 1px solid #ccc;
    border-radius: 8px;
    min-width: 160px;
    color: #663;
    font-weight: 600;
    font-size: 1em;
    outline: none;
}

input[type=button].confirm{
    margin: 0.5em 1em;
    padding: 0.25em 0.5em;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 8px;
    min-width: 160px;
    color: #663;
    font-weight: 600;
    font-size: 1em;
    outline: none;
}

button[type=submit]:hover,
input[type=submit]:hover,
input[type=button].submit:hover,
input[type=button].confirm:hover{
    background-color: #c9bc9c;
    color: #ffffff;
}

input[type=checkbox] {
    padding: 0.25em 0.25em;
    margin: 0.25em;
    width: 1em;
    outline: none;
}

.help {
  position   : relative;                /* 指定した分だけ相対的に移動 */
}

.help:hover {
    font-weight: 600;
}

.showhelp {
  position   : relative;                /* 指定した分だけ相対的に移動 */
}

.showhelp:hover .helptext{
  display: inline-block;                /* インライン要素として表示 */
}

.help:hover .helptext {
  display: inline-block;                /* インライン要素として表示 */
}

.helptext {
  position: absolute;
  display: none;
  /* bottom: -6em; */
  top: calc( 100% + 4px  ); 
  right: 16px;
  margin: 0;
  padding: 7px 10px;
  max-width: 85%;
  min-height: 24px;
  /*max-width: 100%;*/
  color: #366;
  background: #fafffa;
  border: 1px solid #699;
  border-radius: 4px;
  z-index: 100;
}

.helptext::before {
  content: "";
  position: absolute;
  left: 8px;
  top: -12px;
  width: 0;
  height: 0;
  border-right: 12px solid transparent;
  border-left: 12px solid transparent;
  border-bottom: 12px solid #669999;
  z-index: 100;
}


.helptext:after {
  content: "";
  position: absolute;
  left: 8px;
  top: -10px;
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 12px solid #fafffa;
  z-index: 100;
}


.helptext p {
  margin: 0;
  padding: 0;
}

.checkbox, 
.checkbox-multi {
  display: block;
  width: 100%;
}

.checkbox  label, 
.checkbox-multi  label,
.checkbox  input, 
.checkbox-multi  input {
    margin: 0;
    padding: 0.25em 0.5em 0.25em 2em;
    text-align: left;
    font-weight: 400;
}

.guide {
  color: #314d66;
  text-indent: -1em;
}
.guide::before {
  font-family: "Font Awesome 5 Free";
  content: "\f06a";
  color: #314d66;
  font-weight: 600;
  padding-right: 0.25em;
  line-height: inherit;
}

.info::before {
  font-family: "Font Awesome 5 Free";
  content: "\f06a";
  color: #89c997; /* mint green */
  font-weight: 600;
  padding-right: 0.25em;
  line-height: inherit;
}

.mail-form::before {
  font-family: "Font Awesome 5 Free";
  content: "\f0e0";
  color: #add8e6;
  font-weight: 600;
  padding-right: 0.25em;
  padding-left: 0.5em;
  line-height: inherit;
}

.alert {
  color: #314d66;
  text-indent: -1em;
}
.alert::before {
  font-family: "Font Awesome 5 Free";
  content: "\f06a";
  color: #ff3366;
  font-weight: 600;
  padding-right: 0.25em;
  line-height: inherit;
}

/********** FIELDSETS & COLUMNS *****************/
/* fieldsets */
fieldset {
    border: 1px solid #ccc;
    margin: 0.5em  1em;
    padding: 0.25em 1em;
    line-height: 1.5em;
}

fieldset.submit {
    display: block;
    border: none;
    margin: 0 auto 0 auto;
    line-height: 1.5em;
    text-align: center;
}

.option-fields {
    display: block;
    padding: 0.25em 2em;
}
/********** Confirmation Form (MODAL) *****************/
/* The Modal (background) */
.modal-form {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1000; /* Sit on top */
  width: calc(100% * 0.65 );
  top: 128px;
  left: calc(100% * 0.175);
  overflow: auto; /* Enable scroll if needed */
  background-color: #fcfcfc;
  border: 1px solid #c9bc9c;
}

/* The Close Button */
.close {
  background-color: #ccc;
}

input-images {
    margin: 0;
    padding: 0;
}
.image-uploader {
    border: none;
    margin: 0 auto;
}

/********** IMAGE VIEWER (MODAL) *****************/
#img-viewer {
    width: calc(100% - 2em);
    display: none;
    position: fixed;
    border: 2px solid #666666;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, .5);
    top: 84px;
    left: 1em;
    padding: 0;
}

/******************* SMALL MOBILE *******************/
@media screen and (max-width: 720px) {
.image-uploader {
    min-height: 180px;
}
}
/******************* SMALL MOBILE *******************/
@media screen and (max-width: 640px) {
.image-uploader {
    min-height: 120px;
}
}
/******************* SMALL MOBILE *******************/
@media screen and (max-width: 480px) {
fieldset {
    margin: 0.25em 0;
    padding: 0.5em;
}

.modal-form {
    width: calc(100% - 4em);
    top: 64px;
    left: 2em;
}

.image-uploader {
    min-height: 84px;
}

}
