html, body {
  height: 100%;
}

body {
  background-color: #dddddd;
  font-family: 'Roboto', sans-serif;
}

h2 {color: #293133}

.hidden {display: none}

.no-wordwrap {white-space: nowrap}

.bold {font-weight: bold}

.underline {text-decoration: underline}

.text-center {text-align: center}
.text-left {text-align: left}
.text-right {text-align: right}
.text-justify {text-align: justify}
.float-left {float: left;}
.clear {clear: both;}

.red {color: red}


.button-box {
  padding: 0.5em 1em;
}

.button {
  display: inline-block;
  padding: 0.3em 1.2em;
  margin: 0.3em;
  border: 0.05em solid #194066;
  border-radius: 0.15em;
  box-sizing: border-box;
  text-decoration: none;

  color: #001933;

  background-color: #74C4F5;
  text-align: center;
  cursor: pointer;

  line-height: 1.4;
}
.button:hover{
  background-color: #4a85bf;
}

.two-columns {
  width: 50%;
  display: inline-block;
  box-sizing: border-box;
}

table {
  margin: 0 auto;
  text-align: left;
  border-spacing: 0;
  border: 0.1em solid #A0A0A0;
  overflow: hidden;

  background: #e6e6e6;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
  margin: 0.5em;
}

table thead th {
  border-bottom: 0.1em solid #A0A0A0;
  border: 0;
  padding: 0.7em 0.7em;
}

table td
{
  padding: 0.5em 0.7em;
}

table tbody tr:nth-child(even)
{
  background-color: #d9d9d9;
}

table tbody tr:nth-child(even) td
{
  border: 0.1em solid #A0A0A0;
  border-left: 0;
  border-right: 0;
}

table tbody tr:last-child td
{
  border: 0;
}

.box {
  position: relative;
  padding: 2em 1em;
  margin: 1em;

  border: 0.1em solid #444e57;
  border-radius: 0.1em;
  background-color: #ddd;

  text-align: center;
  overflow: hidden;
  box-shadow: 0 1px 2px 0 rgba(50,50,50,.35);
}

.box h1 {
  position: absolute;
  top: 0;
  right: 0;
  bottom: auto;
  left: 0;

  font-size: 1em;

  margin: 0;
  margin-bottom: 0.1em;
  padding: 0.1em 0;

  color: white;
  background-color: #595959;
}

#search-mobile {
  display: none;
}

.search {
  margin: 0 auto;
  width: 38em;
  overflow: hidden;
}

.search .group {
  padding: 1em;
}

label, .label {
  white-space: nowrap;
  float: left;
  width: 10em;
  color: #001933;
}

label[name=morte-anno-da]
, label[name=morte-anno-a]
, label[name=nascita-anno]
{
  width: 5em;
  text-align: left;
}

.input-box {
  overflow: hidden;
}

.input-box input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.3em;
}

.columns-box {
  overflow: hidden;
}

#search-box .two-columns.left {
  padding-right: 1em;
}

#search-box .two-columns.right {
  padding-left: 1em;
}

.search #submit {
  padding: 0.8em;
  font-weight: bold;
}

.search .reset-fields {
  padding: 0.5em;
  font-weight: bold;
}

.search #submit
, .search .reset-fields
{
  width: 8em;
}

#sheet-box .tables-box {
  max-width: 40em;
  margin: 1em auto;
}

#sheet-box .tables-box table {
  width: 100%;
  border: 0;
  border-bottom: 0.1em solid #A0A0A0;
  margin: 0;
}

#sheet-box .number {
  font-size: 1.5em;
  font-weight: bold;
}

#map-box {
  position: relative;
  max-width: 40em;
  margin: 0 auto;
}

#map-box .map {
  display: block;
  width: 100%;
  margin-top: 1em;
  border-radius: 1em;
}

#map-box .marker-box {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);

  width: 10%;
  box-sizing: border-box;

  border: 0.4em solid red;
  border-radius: 50%;
  background-color: transparent;
  opacity: 90%;

  pointer-events: none;
}

#map-box .marker-box .marker-block {
  margin-top: 100%;
}

#map-box .marker-box .marker {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;

  box-sizing: border-box;
  opacity: 80%;
  border-radius: 50%;
  background-color: transparent;
}

.desktop-results {
  display: table;
}

.desktop-sheet {
  display: block;
}

.mobile-results
, .mobile-sheet
{
  display: none;
}

table.desktop-results
, .mobile-results .result
, .mobile-sheet .sheet
{
  border-radius: 0.4em 0.4em 0.2em 0.2em;
}

.desktop-sheet.tables-box table:first-child {
  border-radius: 0.8em 0.8em 0.2em 0.2em;
}

table.desktop-results {
  border-radius: 0.8em 0.8em 0.2em 0.2em;
  margin: 0 auto;
}

table.desktop-results
, .mobile-results
, .mobile-sheet
{
  margin-top: 0.8em;
}

.mobile-results .result
, .mobile-sheet .sheet
{
  max-width: 25em;
  padding: 0;
  margin: 1em auto 2em auto;
  box-sizing: border-box;
  background-color: #e6e6e6;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
  border-bottom: 0.1em solid #A0A0A0;
}

.mobile-sheet .sheet:last-child
{
  margin-bottom: 1em;
}

.mobile-results .result .block
, .mobile-sheet .sheet .block {
  padding-bottom: 0.7em;
}

.mobile-results .result .block .head
, .mobile-sheet .sheet .block .head {
  padding: 0.2em;
  margin-bottom: 0.2em;
}

table thead
, .mobile-results .result .block .head
, .mobile-sheet .sheet .block .head
{
  color: white;
  background-color: #353c7e;
}

.mobile-results .result .note
, .mobile-sheet .sheet .note {
  padding: 0 0.3em;
}

.mobile-results .result .block .button
, .mobile-sheet .sheet .block .button {
  width: 80%;
}

.mobile-results .result .two-columns
, .mobile-sheet .sheet .two-columns {
  white-space: nowrap;
}

.mobile-results .result {
  margin: 0 auto;
  border-radius: 0;
  padding-bottom: 0.4em;
}

.mobile-results .result:first-child {
  border-radius: 0.4em 0.4em 0 0;
}

.mobile-results .result:last-child {
  border-radius: 0 0 0.4em 0.4em;
  border: 0;
}

.mobile-results .result:only-child {
  border-radius: 0.4em;
}

.mobile-results .result .block {
  padding: 0;
}

.three-columns {
  width: 33.333%;
  display: inline-block;
  box-sizing: border-box;
}

.mobile-sheet .sheet .three-columns {
  white-space: nowrap;
}

#back-to-results
, #new-search
{
  padding: 0.3em 1.2em;
  margin: 0.3em;
  margin-bottom: 1.2em;
}


/*
  === === === === === === === === === === === === === === === ===
  GUIDE / ALERT BOX
  === === === === === === === === === === === === === === === ===
*/
#guide-box p {
  text-align: justify;
}

#guide-box p:last-of-type {
  margin-bottom: 0;
}

#guide-box div:last-of-type {
  font-style: italic;
}

#alert-box {
  position: relative;
  padding: 0.8em 1em 1em 0.8em;
  margin: 1em;
  border: 0.1em solid #444e57;
  border-radius: 0.1em;
  background-color: #ddd;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 1px 2px 0 rgba(50,50,50,.35);
}

#alert-box .title {
  font-size: 1.35em;
  font-weight: bold;
  margin: auto;
  background-color: white;
  color: red;
}

#alert-box .text {
  font-size: 1.1em;
  font-weight: bold;
  margin: auto;
}

#assistance-number {
  color: red;
  text-decoration: none;
  white-space: nowrap;
}


/*
  === === === === === === === === === === === === === === === ===
  HEADER / CONTENT / FOOTER
  === === === === === === === === === === === === === === === ===
*/
#header {
  background-color: #0059b3;
  min-height: 3.9em;
  text-align: center;
}

#header .logo {
  margin: 1.1em;
  width: 3.3em;
}

#header h1 {
  font-size: 2.2em;
  font-weight: bold;
  vertical-align: middle;
  margin: 0.1em 0;
}

#header h2 {
  color: #fff;
  font-size: 1.1em;
  font-weight: bold;
  vertical-align: middle;
  margin: 0.1em 0;
}

#content {
  margin-bottom: -4em;
  min-height: 100%;
}

#content:after {
  content: "";
  display: block;
}

#footer {
  background-color: #001933;
  text-align: center;
}

#footer span {
  display: block;
  font-size: 3em;
  font-weight: bold;
}

#footer .logo {
  margin: 0.3em;
  width: 3em;
}

#header, #footer {
  color: white;
  padding: 0.2em;
}

#footer, #content:after {
  height: 4em;
}


/*
  === === === === === === === === === === === === === === === ===
  MEDIA
  === === === === === === === === === === === === === === === ===
*/
@media only screen and (max-width: 47em)
{
  #search-desktop {
    display: none;
  }

  #search-mobile {
    display: block;
  }

  .search {
    width: auto;
  }

  .search .group {
    padding: 0em 0.5em 1em 0.5em;
  }

  label, .label {
    float: none;
  }

  .button-box {
    padding: 0 1em 0 1em;
  }

  .desktop-results
  , .desktop-sheet
  {
    display: none;
  }

  .mobile-results
  , .mobile-sheet
  {
    display: block;
  }

  #map-box .marker-box {
    border-width: 0.3em;
  }

  #footer span {
    font-size: 2.4em;
  }
}

@media only screen and (max-width: 35em)
{
  #header .logo {
    margin: 0.83em;
    width: 3em;
  }

  #header h1 {
    font-size: 1.66em;
  }

  #header h2 {
    font-size: 0.83em;
    margin: 1em;
  }

  .mobile-sheet .sheet .three-columns
  {
    display: block;
    padding: 0;
    width: 100%;
  }

  .mobile-sheet .sheet .three-columns.left
  , .mobile-sheet .sheet .three-columns.center
  {
    padding-bottom: 0.7em;
  }

  #map-box .marker-box {
    border-width: 0.2em;
  }

  #header span {
    font-size: 1.5em;
  }

  #footer span {
    font-size: 1.5em;
  }

}

@media only screen and (max-width: 22em)
{

  #header .logo {
    margin: 0.5em;
  }

  #header h1 {
    font-size: 1.32em;
  }

  #header h2 {
    font-size: 0.66em;
    margin: 1.87em;
  }

  .mobile-sheet .sheet .two-columns
  {
    display: block;
    padding: 0;
    width: 100%;
  }

  .mobile-results .result .button
  {
    padding-right: 0.3em;
    padding-left: 0.3em;
  }

  .mobile-sheet .sheet .two-columns.left
  {
    padding-bottom: 0.7em;
  }

  #map-box .marker-box {
    border-width: 0.1em;
  }

  #header span {
    font-size: 1.2em;
  }

  #footer span {
    font-size: 1.3em;
  }
}

@media only screen and (max-width: 18em)
{
  .mobile-results .result .two-columns
  {
    display: block;
    padding: 0;
    width: 100%;
  }

  #map-box .marker-box {
    border-width: 0.1em;
  }
}
