@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,700;1,400;1,700&display=swap');

html {
  font-size: 100%;
}

* {
 -webkit-text-size-adjust:none;
}

body {
  font-size: 1rem;
  line-height: 1.5em;
  font-family: Roboto, sans-serif;
  margin: 0;
  padding: 0;
  background: #eeeee9;
}

input {
  font-family: Roboto, sans-serif;
  font-size: 16px;
  font-size: max(16px, 1rem);
}

li {
  margin: 0 0 1em;
}

main {
  max-width: 68rem;
  max-width: min(68rem, 100vw);
  margin: 0 auto;
  box-shadow: 0px 0px 5px #00000066;
  padding: 16px;
  background: #fff;
  min-height: 100vh;
  box-sizing: border-box;
}

fieldset.manader,
fieldset.helger {
  display: flex;
  flex-wrap: wrap;
}

fieldset.manader label,
fieldset.dagar label {
  display: inline-block;
  width: 6em;

}

fieldset.helger label {
  display: inline-block;
  width: 14em;
}

fieldset.helger div {
  flex-basis: 100%;
  font-weight: 700;
}

fieldset.helger div:not(:first-of-type)  {
  margin-top: 16px;
}

fieldset.manader .manval,
fieldset.dagar .dagval,
fieldset.helger .helgval {
  white-space: nowrap;
}

@media screen and (max-width: 30rem) {
  fieldset.manader {
    display: block;
  }
}

summary {
  cursor: pointer;
}
details[open] {
  background: #ddd;
  margin: 0 -16px;
  padding: 16px;
  position: relative;
  top: -16px;
}

p#feltext {
  background: #fcc;
  color: #000;
  border: 1px solid #f00;
  padding: 8px;
}
p#feltext:empty {
  display: none;
}

div.resultat {
	max-width: 100%;
	overflow-x: auto;
}

table#resultat {
  border-collapse: collapse;
  width: 100%;
}

#resultat tr {
  margin: 0;
  border-top: 1px solid #ccc;
}
#resultat tr.nymanad {
  border-top: 2px solid #aaa;
}

#resultat tr:last-child {
  border-bottom: 2px solid #aaa;
  margin-bottom: 2rem;
}

#resultat tr.helg td.d,
#resultat tr.helg td.vd,
#resultat tr.halvhelg td.d,
#resultat tr.halvhelg td.vd {
  color: #c00;
  font-weight: 700;
}

#resultat td.y {
  width: 4ch;
}

#resultat td.v,
#resultat td.d {
  width: 2ch;
}

#resultat td.m {
  width: 4ch;
}
#resultat td.vd {
  width: 2.5ch;
}


@media screen and (min-width: 30rem) {
  /* Använd långa månads- och dagsnamn */
  .m1::after,
  .m2::after  {
    content: 'uari';
  }
  .m8::after {
    content: 'usti';
  }
  .m9::after,
  .m11::after,
  .m12::after  {
    content: 'ember';
  }
  .m10:after {
    content: 'ober';
  }
	.vd0::after,
	.vd1::after {
	  content: 'ndag';
	}
	.vd2::after,
	.vd3::after {
	  content: 'sdag';
	}
	.vd4::after {
	  content: 'rsdag';
	}
	.vd5::after {
	  content: 'edag';
	}
	.vd6::after {
	  content: 'rdag';
	}
  
  #resultat td.m {
    width: 9ch;
  }
  #resultat td.vd {
    width: 7ch;
  }
}

.red {
  color: #c00;
}

#resultat tr.friafton,
#resultat tr.helg {
  background: #eee;
}

#resultat td {
  padding: 0 4px;
}

#resultat td.v {
  font-style: italic;
  text-align: right;
}

#resultat td.d {
  text-align: right;
}

