/**
 * Stylesheet for muchtodo.seamusjohnston.com 
 * Some styles taken from
 * normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css
 */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

*:focus-visible {
  outline: none;
}

body {
  line-height: 1.6rem;
  font-family: "Courier", serif;
  font-size: 1.2rem;
  background-color: #d4ddd8;
  background-image: url('./lorem-ipsum-background-tile.jpg');
  background-repeat: repeat;
  height: 100%;
  margin: 0;
  padding: 0;
}

#toast {
  min-height: 4.8rem;
  font-size: 0.9rem;
  line-height: 1.2rem;
  background-color: lightblue;
  box-shadow: 0 0.4rem 1rem -0.5rem black;

  padding: 0.5rem;
  margin: -0.3em -1rem 0.3rem;
  
  border-top: .4rem double #5c6a6b;
  border-right: 0;
  border-bottom: .4rem double #5c6a6b;
  border-left: 0;
}

#add-new-todo {
  margin: 0.2rem 0.1rem;
}

.content-wrapper {
  background-color: #f0f0f0;
  background-image: url('./white-grunge-background-tile.jpg');
  padding: .2em 1rem;
}

.collapsible-bubble {
  width: fit-content;
}

.toast__aria-text {
  background-color: #c2e6f2;
  padding: 0.4rem 0.8rem 0.2rem;
  margin-right: 0.5rem;
  transition: all 5s;
}

.toast__aria-text--focus {
  background-color: lightyellow;
  box-shadow: 0.3rem -0.2rem 0 0 purple, -0.2rem 0.2rem 0.3rem 0 grey;
  border-radius: 0 0 0 0.7rem;
  transition: none;
}

.coupon {
  padding: 0.5rem 0.5rem 0.2rem;
  margin: 0.2rem auto;
  border: 0.15rem dashed #5c6a6b;
}

.flex {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
}

.flex-inline {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
}

footer {
  text-align: center;
  width: 100%;
}

.button-box {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-around;
  align-content: space-around;
  margin: 0.3rem 0;
}

.button-box > button {
  margin: 0.3rem 0.1rem
}

button {
  font-size: 1.3rem;
  border: rgba(173, 216, 230, 0.34) groove 0.2rem;
  padding: 0.1rem 0.4rem;
  background-color: rgba(173, 216, 230, 0.34);
}

/* Fix for that stupid dotted line in FF */
button::-moz-focus-inner {
  border: none;
}

button:hover,
button:focus {
  outline: none;
  padding: 0.1rem 0.4rem;
  border: rgb(173, 216, 230) outset 0.2rem;
}

button:active {
  background-color: rgb(173, 216, 230);
  padding: 0.1rem 0.4rem;
  border: rgb(173, 216, 230) inset 0.2rem;
}

.icon {
  width: 1.5rem;
  vertical-align: text-top;
}

a {
  color: #0000b5;
  border-bottom: 0.2rem transparent solid;
}

a:hover,
a:focus,
a:active {
  outline: none;
  border: none;
  text-decoration: none;
}

a:hover {
  border-bottom: 0.2rem black solid;
}

a:visited,
a:active {
  color: #550000;
}

a:visited:focus,
a:active {
  border-bottom: 0.2rem #550000 solid;
}

a:focus {
  border-bottom: 0.2rem #0000b5 solid;
}

a.bold-link {
  padding: 0.05rem 0.2rem;
  margin: 0.2rem 0.3rem 0.1rem;
  display: inline-block;
}

hr {
  margin-top: 0.5rem;
  box-sizing: content-box; /* 1 */
  height: 0; /* 1 */
  overflow: visible; /* 2 */
}

.table-wrapper {
  display: flex;
  justify-content: center;
  flex-flow: column nowrap;
  overflow-x: auto;
  background-color: #f0f0f0;
  background-image: url('./white-grunge-background-tile.jpg');
  padding: .2em 1rem;
}

table {
  border-collapse: collapse;
  white-space: nowrap;
}

th, td {
  padding: .3rem;
  text-align: left;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  border: 1px solid black;
}

tr {
  background-color: #e0dddf;
}

tr:nth-child(even) {
  background-color: #c9c7c8;
}

table > label {
  align-self: center;
}

input[type=text], textarea {
  padding: 0.3rem;
  font-size: 1.2rem;
  width: 100%;
}

textarea:read-only {
  font-size: 0.8rem;
}

input[type=text]:invalid, textarea:invalid {
  border: .2rem solid red;
}

input[type=checkbox]:focus-visible {
  box-shadow: 0 0 0.2rem 0.2rem cornflowerblue;
}

input[type=text], textarea:focus-visible {
  box-shadow: 0 0 0 0.2rem lightblue;
}

p {
  margin: 0.7rem 0 0;
}

ul, ol {
  margin: auto 2rem;
}

.flex-grow-2 {
  flex-grow: 2;
}

.flex-align-items-center {
  align-items: center;
}

.text-align-center {
  text-align: center;
}

.block {
  display: block;
}

.full-width {
  width: 100%;
}

/**
 * full credit to Scott O'Hara
 * https://www.scottohara.me/blog/2017/04/14/inclusively-hidden.html
 */
.sr-only:not(:focus):not(:active) {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}


/* Tablet + Desktop */
@media (min-width: 40em) {
  .content-wrapper, .table-wrapper {
    box-shadow: 0 0 40px;

    border-top: .0;
    border-right: 0;
    border-bottom: .4rem double #5c6a6b;
    border-left: 0;
  }

  .content-wrapper {
    margin: 1.9rem auto;
    max-width: 28.2rem;
  }

  #toast {
    margin-bottom: 1rem;
  }

  .table-wrapper {
    margin: 2rem auto;
    max-width: 50rem;
  }
}

.print-only {
  display: none;
}

@media print {
  .no-print {
    display: none;
  }
  .print-only {
    display: block;
  }
  .content-wrapper, .table-wrapper {
    margin: auto;
    box-shadow: none;
    border: none;
  }
  footer.content-wrapper.content-wrapper {
    margin: auto;
    border-bottom: .4rem double #5c6a6b;
  }
  th, td {
    border: 0.1rem dotted black;
  }
  
  tr {
    background-color: white;
  }
  
  tr:nth-child(even) {
    background-color: white;
  }
}
