.leftPad05em { padding-left:0.5em; }
.bottomPad05em { padding-bottom:0.5em; }
.topPad05em { padding-top:0.5em; }
.topBottomPad1em { padding:1em 0em 1em 0em; }
.bottomControl { padding-left:14.5em; }

@font-face {
    font-family: Lancelot;
    src: url(lancelot/Lancelot-Regular.ttf);
}

body {
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    /* display: flex;
    flex-direction: column; */
    align-items: center;
    background-image: url("../assets/background.png");
    background-size: 15%;
    background-repeat: repeat;
}

h1, h2, h3, h4, h5 {
    margin: 20px 0 10px;
    letter-spacing: -3px;
}

p {
    /* font-family: Lancelot; */
    font-family: serif;
    font-size: large;
}

.menu {
    gap: 30px;
    margin-bottom: 30px;
    background-color: #000000;
}

.menu a {
    text-decoration: none;
    color: #ec7c7c;
}

img {
    max-width: 100%;
    height: auto;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}
.right {
    float: right;
    margin-left: 1em;
}
.left {
    float: left;
    margin-right: 1em;
}
.center {
    display: block;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}
/* are we on desktop? */
@media only screen and (min-width: 601px) {
    .small {
        max-width: 60%;
        height: auto;
    }
}
.caption {
    margin-top: 0;
    font-size: 0.9em;
    font-style: italic;
}

#container {
    margin: 2em auto;
    width: 80%;
    max-width: 80%;
    background-color: #E47878;
    outline-color: #000000;
    outline-style: solid;
    outline-width: 6px;
    outline-offset: 0;
    text-align: center;
}

#content ul {
  padding: 0 0;
  margin: 0;
  font-weight: bold;
}

/* HEADER STYLE */
#header ul {
  list-style-type: none;
  padding: 0 0;
  margin: 0;
}
#header li {
  font-size: 1.5em;
  letter-spacing: -4px;
  display: inline-block;
  margin-right: 0.3em;
  /*margin-bottom: 0.2em;
  margin-top: 0.2em;*/
}
#header li a {
  color: #000000;
  text-decoration: none;
  background-color: inherit;
}
#header li a:hover {
  text-decoration: underline;
}

/* LINK STYLE */
a:hover { 
  background-color: #626252;
}

a:link, a:visited {
  color: #202b3f;
}

/* POST LIST STYLE */
#postlistdiv ul {
  font-size: 1.2em;
  padding: 0;
  list-style-type: none;
}

#taggedPosts ul {
  font-size: 1.2em;
  padding: 0;
  list-style-type: none;
}

#tagList ul {
  font-size: 1.2em;
  padding: 0;
  list-style-type: none;
}

#recentpostlistdiv ul {
  font-size: 1.2em;
  padding: 0;
  list-style-type: none;
}
.moreposts {
  font-size: 0.8em;
  margin-top: 0.2em;
}

#postTags, #nextprev {
  font-weight: bold;
}

#cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  font-size: 1.2rem;
}

#cal-header button {
  background: none;
  border: 1px solid #000000; /* #ccc was 1.7:1 on the pink container, below the 3:1 minimum */
  cursor: pointer;
  padding: 0.25rem 0.75rem;
  font-size: 1rem;
  min-height: 32px;
  min-width: 44px;
}

#cal-header button:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

#cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-dow {
  text-align: center;
  font-weight: bold;
  padding: 0.25rem;
}

.cal-day {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
  width: 100%;
  height: 118px;
  min-width: 44px;
  overflow: hidden;
  border: 1px solid #444444;
  padding: 4px;
  background: none;
  font: inherit;
  color: #000000;
  text-align: left;
}

button.cal-day {
  cursor: pointer;
}

button.cal-day:hover {
  background: rgba(0, 0, 0, 0.08);
}

.cal-day:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

.cal-day.empty {
  background: #f9f9f9;
  border: none;
}

.cal-day.today {
  background: #fff8e1;
  border-color: #f0a500;
}

.cal-day.today .cal-date {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cal-date {
  font-size: 0.85rem;
  font-weight: bold;
  display: block;
}

.cal-event {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  padding: 2px 0;
  font-size: 0.9rem;
  margin-top: 2px;
  overflow: hidden;
  overflow-wrap: break-word;
}

.cal-open-hours {
  font-size: 0.95rem;
  font-weight: bold;
}

/* dots */
.cal-dots {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
  margin-top: 3px;
}

.cal-dot {
  box-sizing: border-box;
  width: 6px;
  height: 9px;
  border-radius: 50%;
  background: #000000;
}

.cal-dot-open {
  background: none;
  border: 1.5px solid #000000;
}

/* "+N more" button shown when a day has more events than MAX_VISIBLE_EVENTS in calendar.js */
.cal-more {
  -webkit-line-clamp: 1;
  font-weight: bolds;
  color: #000000;
}

/* Full-screen dimmed backdrop; hidden by default, shown by adding .open (see below) */
.cal-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* calendar.js toggles this class to show/hide the modal */
.cal-modal.open {
  display: flex;
}

/* The white card holding the event details, centered inside .cal-modal */
.cal-modal-content {
  position: relative;
  background: #fff;
  color: #202b3f;
  padding: 1.5rem;
  width: 400px;
  max-width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  outline: 4px solid #000000;
  text-align: left;
}


.cal-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.cal-modal-summary {
  margin: 0 1.5rem 0.5rem 0;
  font-size: 1.3rem;
}

.cal-modal-date {
  font-weight: bold;
  font-size: 1rem;
}

.cal-modal-time {
  color: #000000; /* muted so it reads as secondary to the date above it */
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.cal-modal-desc {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  white-space: pre-wrap;
}

.cal-modal-open-hours {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 1.5rem 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px dotted #000000;
  font-size: 0.95rem;
}

.cal-modal-event + .cal-modal-event {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
}

/* MOBILE STYLES */
@media only screen and (max-width: 600px) {
    #container {
        width: 92%;
        max-width: 92%;
        margin: 1em auto;
    }

    #content {
        padding: 0 0.8em;
        box-sizing: border-box;
    }

    #header ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 0.3em;
    }

    #header li {
        font-size: 1.15em;
        letter-spacing: -2px;
    }

    img {
        width: 100% !important;
    }

    #content iframe {
        width: 100% !important;
        aspect-ratio: 4 / 3 !important;
    }

    .small {
        max-width: 100%;
    }

    .cal-day {
        height: auto;
        min-height: 56px;
        min-width: 0;
        padding: 4px 2px;
        text-align: center;
    }

    .cal-date {
        font-size: 0.8rem;
    }

    .cal-event {
        display: none;
    }

    .cal-dots {
        display: flex;
    }

    .cal-dow {
        font-size: 0.7rem;
        padding: 0.1rem;
    }

    #cal-header {
        font-size: 0.95rem;
        padding: 0.25rem;
    }

    #cal-header button {
        min-height: 44px;
        min-width: 44px;
        font-size: 1rem;
    }
    #cal-grid {
        margin-left: -0.8em;
        margin-right: -0.8em;
        gap: 2px;
    }
}