#content { width: 100%; }

.column {
  width: 100%;
  margin: 0 auto 80px;
}

main { text-align: center; }

.box-body h1 { margin: 1rem auto 2rem; }

@media screen and (max-width: 641px) {
  .column { max-width: 100%; }
  main { padding: 6px; }
}

.announce p { text-align: left;line-height: 1.8; }

.form { margin: 0 0 10rem; }
.form-group { text-align: left; }

#blog-name {
  display: inline-block;
  max-width: 60%;
}

.announce-about-preference ul {
  margin: 0;
  padding-left: 1rem;
}

.announce-about-preference li {
  text-align: left;
  margin: 0 0 1rem;
}

#email-modded-info { margin: 1rem 0 0; }

#cancel-email-mod {
  margin: 0 0 2rem;
  padding: 4px;
  display: inline-block;
  color: #a94442;
}

ul.info { text-align: left; }

/* -------- new form styles -------- */

form h2,
form h3,
form h4 {
  width: 100%;
  margin-top: 20px;
}

.form-group {
  margin: 25px auto 15px;
  max-width: 550px;
}

.form-group .error { color: #a94442; }

.form-group label {
  display: block;
  font-size: inherit;
  font-weight: 700;
  padding: 5px;
  color: #666;
}
label .required, legend .required {
  color: #b04343;
  padding: 0 5px;
  font-weight: normal;
}

.form-group input[type=text],
.form-group input[type=password],
.form-group input[type=email],
.form-group input[type=number],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 5px 1em;
  border: solid 2px #ccc;
  border-radius: 4px;
}
.form-group textarea { padding: 2px 1em;}

.form-group input[disabled] {
  color: #666;
  opacity: 0.8;
  cursor: not-allowed;
  border-color: #f9f9f9;
}

.form-group legend {
  font-size: initial;
  font-weight: 700;
  margin: 1.5em 0 5px;
  color: #666;
  border: none;
}

fieldset .radio-group {
  display: -ms-flexbox;
  display: flex;
}

input[type=radio] + label:last-child {
  border-right: 1px #eee solid;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}
input[type=radio] + label:first-of-type {
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.radio-group > input[type=radio] {
  /* always add .sr-only */
}

input[type=radio] + label {
  display: block;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  padding: 5px 15px;
  margin: 5px 0 10px;
  width: auto;
  font-weight: normal;
  text-align:center;
  color: inherit;
  border: 1px #eee solid;
  border-right: none;
  background: transparent;
  transition: background 0.2s ease;
  background:#fff;
}
input[type=radio]:checked + label {
  font-weight: bold;
  background-color: hsla(106, 98%, 35%, 0.50);
  border: 1px solid #333;
}

input[type=radio]:focus + label { outline: 3px auto #2ab002; }

input[type=radio]:checked + label:before {
  content: '✓';
  display: inline-block;
  position: absolute;
  margin-left: -14px;
}

/* specifics to settings page */
#preference-form .announce,
.announce-about-preference {
  max-width: 550px;
  margin: auto;
}

#photo-input-group {
  display: flex;
  flex-flow: column;
  position: relative;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border: 5px transparent dashed;
}
#photo-input-group.hovered { border-color: #ccc; }

#photo-input-group img {
  width: 100%;
  height: 155px;
  max-width: 155px;
  -o-object-fit: contain;
     object-fit: contain;
  -webkit-filter: brightness(0.9);
          filter: brightness(0.9);
  opacity: 0.8;
  -webkit-clip-path: circle(50%);
          clip-path: circle(50%);
  background: #ccc;
  flex: 1 0 auto;
}

#photo-input {
  opacity: 0;
  position: absolute;
  z-index: 1;
  height: calc(100% - 40px);
  width: 100%;
  max-height: 60vw;/* limits size on mobile */
}

#photo-input-group label[for="photo-input"] {
  position: absolute;
  right: calc(50% - 80px);
  top: 115px;
  padding: 12px;
  font-size: 24px;
  line-height: 1;
  color: #fff;
  border: 2px #fff solid;
  border-radius: 30px;
  background: rgba(59, 59, 59, 0.9);
  z-index: 1;
  pointer-events: none;
  transition: transform 0.2s ease;
}
#photo-input:hover ~ label[for="photo-input"] { transform: scale(1.15); }

#photo-input-group [name="remove-photo"] {
  width: auto;
  margin: 25px auto -10px;/* ensure it's not under the transparent input */
}

#pass-toggle:focus + label,
#options-toggle:focus + label { outline: 3px auto #2ab002; }

#pass-toggle + label,
#options-toggle + label {
  display: block;/* avoid centering */
  margin: 10px auto;
  padding: 0 10px;
  color: #999;
  text-align: right;
  max-width: 550px;
  cursor: pointer;
}

#pass-toggle:checked + label,
#options-toggle:checked + label { text-decoration: underline; }

#pass-toggle:checked + label::before,
#options-toggle:checked + label::before {
  content: '⌄';
  display: inline-block;
  width: 1em;
  height: 1em;
  font-family: sans-serif;
}

#pass-toggle + label { color: inherit; }

#options-group .close-group {
  padding: 10px;
  color: inherit;
  cursor: pointer;
}

#pass-toggle:checked ~ #password-group,
#options-toggle:checked ~ #options-group {
  max-height: initial;
  padding: 0px 10px 10px;
  overflow: visible;
}

#preference-form [name$=-toggle] {
  position: absolute;
  right: 0;
  top: 0;
  padding: 0 5px;
  margin: 5px;
  width: auto;
}

[aria-controls="passwordReqs"] {border-color: transparent;}

#passwordReqs {
  display: none;
  padding: .25rem .5rem;
  font-weight: normal;
  color: #555;
  background: #fff;
  border-radius: .25rem;
  margin: .25rem 0;
}

[aria-pressed="true"] + #passwordReqs {
  display: block;
}

#password-group,
#options-group {
  display: flex;
  padding: 0 10px;
  position: relative;
  flex-flow: wrap;
  justify-content: center;
  background: hsla(0, 0%, 90%, 1);
  border-radius: 2px;
}

#options-group {
  display: flex;
  width: 840px;
  justify-content: center;
  margin: auto;
}

#password-group .form-group,
#options-group .form-group {
  -ms-flex: 1 0 auto;
      flex: 1 0 auto;
  max-width: 400px;
  min-width: 20em;
  margin: 15px 5px 10px;
  padding: 0 10px;
}

#options-group .padder,
#options-group .close-group,
#blog-name-block,
#selfIntro {
  width: 100%;
  max-width: none;
}

@supports (display: grid) {
  #options-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(300px, 450px));
    grid-gap: 5px 1rem;
    width: 100%;
  }

  #options-group .close-group { grid-column: 1 / -1; }
  #blog-name-block { grid-row: span 2; }
  #selfIntro { grid-row: span 2; }

  #options-group h2,
  #options-group > .announce { grid-column: 1 / -1; }/* all row */
}

.force-inline {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
      align-items: center;
}

#twitter-connect,
.card-status,
.addresses-link {
  display: inline-block;
  padding: 0 10px;
}

#twitter-connect.form-group {
  width: calc((550px / 3) * 2);
  vertical-align: top;
}

#twitter-connect.form-group .oty-btn-plain {
  width: auto;
  display: inline-block;
  color: #666 !important;
  border-color: #666;
  margin: 0;
}

#twitter-connect.form-group > tw-connected {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

#twitter-connect.form-group > .tw-connected > span:first-of-type {color: #55acee;}
#twitter-connect.form-group > .tw-connected a:first-of-type {
  color: #333;
  margin: 0.5em 0px;
}

.form-group.hires-status {
  display: inline-block;
  padding: 0 10px;
  width: 550px;
}

.form-group.addresses-link {
  white-space: nowrap;
  width: calc(550px / 3 * 3);
}

#hires-status-label, #addresses-status-label { margin: 0; }

.card-status {
  text-align: right;
  width: calc(550px / 3);
  vertical-align: top;
}
.card-status .fa { display: inline; }/* prevent wrapping */

#birthday.form-group {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
      align-items: center;
  -ms-flex-pack: justify;
      justify-content: space-between;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
}
#birthday > .announce { width: 100%; }
#birthday > input {
  min-width: auto;
  -ms-flex: 1 1 auto;
      flex: 1 1 auto;
  width: 0;
}

input[name="answer[]"],
#habitats + select { margin-top: 1em; }

@media screen and (max-width: 641px) {
  .form-group {
    margin: 15px 10px;
    max-width: 100vw;
  }
  #preference-form .announce,
  .announce-about-preference { margin: 10px; }

  #twitter-connect.form-group,
  .form-group.card-status,
  .form-group.hires-status,
  .form-group.addresses-link {
    margin: 10px 0;
    width: calc(50% - 10px);
  }
  .form-group.addresses-link, .form-group.hires-status {
    width: 100%;
  }

  #password-group .form-group,
  #options-group { grid-template-columns: 1fr; }
}


/* Old profile edit page */
#profile-body input,
#profile-body select,
#profile-body textarea {
  margin-left: 5px;
  margin-right: 5px;
  margin-top: 3px;
}

@media screen and (max-width:641px){
  #profile-body table.form {
    table-layout: fixed;/* auto makes the browser just size cells to their content */
    margin: 10px;
    width: calc(100% - 2 * 10px);/* minus margin */
  }

  #format-fieldset { flex-wrap: wrap; }

  #profile-body input[type="text"] { max-width: 100%; }

  #profile-body table.form th { width: 100%; }
  #profile-body table.form td {
    width: 100%;
    display: flex;
    flex-flow: column;
  }

  #profile-body tr {
    display: flex;
    flex-flow: column;
  }
  #profile-body #birthdate {
    align-items: center;
    flex-flow: row;
  }
}
