/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;  
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #94C09F;
  text-shadow: none;
}

::selection {
  background: #94C09F;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */
   /*@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@200..800&family=Prata&display=swap');*/

   html, body {background-color: #94C09F; margin:0; padding:0; font-family: "Assistant", sans-serif; max-width: 100vw; overflow-x: hidden;}
   header {background-color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 10px; width: calc( 100vw - 20px);}
   header figure {margin: 0; transition: all 0.3s;}  
   header a:hover figure {opacity: 0.8;} 
   header h1, header h2 {font-weight: 200; margin: 0; text-align: right; color: #94C09F; font-size: 15px; line-height: 1;}
   header h1 {font-family: "Prata", serif; text-transform: uppercase; color: #900C24; font-size: 25px;}
   header nav {display: flex; justify-content: center; align-items: center; gap: 5px; padding: 10px;}
   header nav svg {fill: #1A8867; width: 40px; height: 40px; transition: all 0.3s;}
   header nav a:hover svg {fill:#8dc4b2;}
   header nav a:nth-child(2) svg {width: 30px; height: 30px;}

   #adventCalendar {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 100px [col-start]);
    grid-template-rows: repeat(13, 100px [row-start]);
    justify-content: center;
    align-content: center;
    gap: 6px;
    padding: 40px 0;
  }
  .day {cursor: pointer; margin: 0; padding: 0; border: 0; position: relative;}
  .day .flap {
    background-color:#375A54; 
    border:1px dashed #000;
    position: absolute;
    bottom: 0;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: end;
    justify-content: end;
    padding: 10px;
    font-family: "Prata", serif;
    font-size: 48px;
    color: #FADBDE;
    pointer-events: none;
  }

  .day:nth-child(1) {grid-area: 3 / 3 / span 1 / span 1;}
  .day:nth-child(2) {grid-area: 7 / 3 / span 1 / span 1;}
  .day:nth-child(3) {grid-area: 8 / 2 / span 2 / span 2;}
  .day:nth-child(4) {grid-area: 5 / 3 / span 1 / span 1;}
  .day:nth-child(5) {grid-area: 3 / 1 / span 1 / span 1;}
  .day:nth-child(6) {grid-area: 9 / 1 / span 1 / span 1;}
  .day:nth-child(7) {grid-area: 6 / 2 / span 1 / span 2;}
  .day:nth-child(8) {grid-area: 1 / 2 / span 1 / span 2;}
  .day:nth-child(9) {grid-area: 10 / 3 / span 1 / span 1;}
  .day:nth-child(10) {grid-area: 2 / 1 / span 1 / span 1;}
  .day:nth-child(11) {grid-area: 7 / 2 / span 1 / span 1;}
  .day:nth-child(12) {grid-area: 11 / 1 / span 1 / span 1;}
  .day:nth-child(13) {grid-area: 4 / 1 / span 2 / span 2;}
  .day:nth-child(14) {grid-area: 1 / 1 / span 1 / span 1;}
  .day:nth-child(15) {grid-area: 10 / 1 / span 1 / span 2;}
  .day:nth-child(16) {grid-area: 13 / 3 / span 1 / span 1;}
  .day:nth-child(17) {grid-area: 2 / 2 / span 2 / span 1;}
  .day:nth-child(18) {grid-area: 12 / 3 / span 1 / span 1;}
  .day:nth-child(19) {grid-area: 4 / 3 / span 1 / span 1;}
  .day:nth-child(20) {grid-area: 8 / 1 / span 1 / span 1;}
  .day:nth-child(21) {grid-area: 12 / 1 / span 2 / span 2;}
  .day:nth-child(22) {grid-area: 2 / 3 / span 1 / span 1;}
  .day:nth-child(23) {grid-area: 11 / 2 / span 1 / span 2;}
  .day:nth-child(24) {grid-area: 6 / 1 / span 2 / span 1;}

  #modals {
      position: absolute;
      width: calc((100px * 3) + (6px * 2));
      height: calc((100px * 13) + (6px * 13));
      top: 40px;
      pointer-events: none;
      display: flex;
      align-items: center;
      justify-content: center;
      left: calc((100vw - 312px) / 2);
  }
  .dayModal {max-width: 312px; background-color: #375A54;background-color: #375A54f5; pointer-events: all; position: absolute; min-height: 100%; top: 0; left: 0; text-align: center;}
  .modalTop {display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding:10px;}
  .modalTop h3, .modalTop button.closeModal {margin: 0; font-family: 'Prata', serif; font-size: 24px; font-weight: 400; color: #FFA1AA;}
  .modalTop button.closeModal {background: none; border: 0; cursor: pointer;}
  .modalMain {padding: 0 15px 15px;}
  .modalMain img {max-width: 100%;}
  .modalMain h4 {font-family: 'Prata', serif; font-size: 25px; color: #fff; font-weight: 200; margin: 20px 0; line-height: 1.2;}
  .modalMain p {color:#C1E0C9; font-size: 18px;}
  .modalMain a {display: inline-block; padding: 10px 20px; background-color: #71A34C; color: #fff; font-weight: bold; font-size: 20px;
    border-radius: 50px; text-transform: uppercase; text-decoration: none;}
  
  
/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (max-width: 45em) {
  /* Style adjustments for viewports that meet the condition */
  header nav {display: none;}
  .day:nth-child(14) .flap, .day:nth-child(19) .flap, .day:nth-child(11) .flap, .day:nth-child(12) .flap {background-color:#900C24; }
  .day:nth-child(22) .flap, .day:nth-child(13) .flap, .day:nth-child(16) .flap, .day:nth-child(20) .flap {background-color:#E43142;}
  .day:nth-child(10) .flap, .day:nth-child(9) .flap, .day:nth-child(7) .flap, .day:nth-child(21) .flap {background-color:#71A34C;}
  .day:nth-child(5) .flap, .day:nth-child(2) .flap, .day:nth-child(15) .flap {background-color:#1A8867;}
}

@media only screen and (min-width: 45em) {
  header {justify-content: space-around; width: calc( 100vw - 20px)}
  header figure img {width:91px;height:95px;}
  header h1 {font-size: 36px; text-align: center;}
  header h2 {font-size: 20px; text-align: center;}
  #adventCalendar {
    grid-template-columns: repeat(6, 120px [col-start]);
    grid-template-rows: repeat(6, 120px [row-start]);
    gap: 12px;
  }
  .day:nth-child(1) {grid-area: 2 / 5 / span 1 / span 1;}
  .day:nth-child(2) {grid-area: 5 / 4 / span 2 / span 1;}
  .day:nth-child(3) {grid-area: 4 / 4 / span 1 / span 1;}
  .day:nth-child(4) {grid-area: 2 / 1 / span 1 / span 1;}
  .day:nth-child(5) {grid-area: 3 / 6 / span 2 / span 1;}
  .day:nth-child(6) {grid-area: 5 / 5 / span 1 / span 1;}
  .day:nth-child(7) {grid-area: 6 / 2 / span 1 / span 1;}
  .day:nth-child(8) {grid-area: 2 / 4 / span 1 / span 1;}
  .day:nth-child(9) {grid-area: 3 / 1 / span 2 / span 2;}
  .day:nth-child(10) {grid-area: 4 / 5 / span 1 / span 1;}
  .day:nth-child(11) {grid-area: 5 / 6 / span 1 / span 1;}
  .day:nth-child(12) {grid-area: 6 / 1 / span 1 / span 1;}
  .day:nth-child(13) {grid-area: 1 / 2 / span 2 / span 2;}
  .day:nth-child(14) {grid-area: 2 / 6 / span 1 / span 1;}
  .day:nth-child(15) {grid-area: 3 / 5 / span 1 / span 1;}
  .day:nth-child(16) {grid-area: 4 / 3 / span 1 / span 1;}
  .day:nth-child(17) {grid-area: 1 / 1 / span 1 / span 1;}
  .day:nth-child(18) {grid-area: 6 / 3 / span 1 / span 1;}
  .day:nth-child(19) {grid-area: 6 / 5 / span 1 / span 2;}
  .day:nth-child(20) {grid-area: 1 / 5 / span 1 / span 2;}
  .day:nth-child(21) {grid-area: 5 / 1 / span 1 / span 1;}
  .day:nth-child(22) {grid-area: 3 / 3 / span 1 / span 2;}
  .day:nth-child(23) {grid-area: 1 / 4 / span 1 / span 1;}
  .day:nth-child(24) {grid-area: 5 / 2 / span 1 / span 2;}
  .day:nth-child(4) .flap, .day:nth-child(22) .flap, .day:nth-child(5) .flap, .day:nth-child(18) .flap {background-color:#900C24; }
  .day:nth-child(24) .flap, .day:nth-child(13) .flap, .day:nth-child(10) .flap, .day:nth-child(14) .flap {background-color:#E43142;}
  .day:nth-child(20) .flap, .day:nth-child(15) .flap, .day:nth-child(9) .flap, .day:nth-child(2) .flap {background-color:#71A34C;}
  .day:nth-child(6) .flap, .day:nth-child(16) .flap, .day:nth-child(17) .flap, .day:nth-child(1) .flap {background-color:#1A8867;}

  #modals {height: 740px; top: 40px; left: calc((100vw - 795px) / 2); width: calc((120px * 6) + (12px * 4));}
  .dayModal {width:100%; max-width: 740px; padding: 20px; text-align: left;}
  .modalMain {display: flex; gap: 20px;}
  .modalMain img {align-self: start; max-width: 50%;}
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

