/* 
 * Base content styles, to be shown on the frontend and in the editor
 */

:root {
  --font-size-xxs: 12.5px;
  --font-size-xs: 15px;
  --font-size-sm: 17px;
  --font-size-md: 1rem;
  --font-size-lg: 1.3rem;
  --font-size-xl: 1.65rem;
  --font-size-xxl: 2rem;
  --font-size-xxxl: 2.3rem;
}

body {
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body#tinymce {
  margin-left: auto;
  margin-right: auto;
  max-width: 870px;
  padding: 1rem var(--container-padding);
  overflow: visible !important;
  box-sizing: border-box;
  background-color: var(--tan);
  &:after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: white;
    top: 0;
    left: 50%;
    z-index: -1;
    max-width: 870px;
    transform: translateX(-50%);
    box-shadow: var(--container-shadow);
  }
}

/* Pre-title attribution */

.pretitle-attribution {
  display: block;
  background-color: var(--light-blue);
  margin-top: calc(var(--container-padding) * -1.15);
  margin-left: calc(var(--container-padding) * -1);
  width: calc(100% + var(--container-padding) * 2);
  padding: 0.6rem var(--container-padding);
  margin-bottom: 2rem;
  color: var(--gray);
}

/* Headings */

.entry-title {
  font-family: var(--font-stack-headings);
  font-weight: 600;
  font-variation-settings: "opsz" 144;
  line-height: 110%;
  letter-spacing: -0.03em;
  margin-bottom: 0.8rem;
  text-transform: none;
}

h1 {
  font-size: var(--font-size-xxxl);
  margin-bottom: 1rem;
}

@media (min-width: 801px) {
  h1 {
    font-size: 2.6rem;
  }
}

.entry-title {
  font-size: 3rem;
}

@media (max-width: 800px) {
  .entry-title {
    font-size: 2.3rem;
  }
}

h2 {
  font-family: var(--font-stack-base);
  margin-top: 2.8rem;
  margin-bottom: 1rem;
  font-size: var(--font-size-xl);
  letter-spacing: -0.01em;
}

h3 {
  font-family: var(--font-stack-subheadings);
  font-weight: 600;
  font-size: var(--font-size-lg);
  font-stretch: 105%;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

h4 {
  font-family: var(--font-stack-subheadings);
  font-weight: 600;
  font-size: var(--font-size-md);
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

h1 + h2,
h2 + h3,
h3 + h4,
h4 + h5 {
  margin-top: 0;
}

/*
.deck {
  text-transform: uppercase;
  font-family: "HEX Franklin", sans-serif;
  font-stretch: 70%;
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 1.3rem;
  color: var(--gray);
  margin-top: -0.5rem;
  margin-bottom: 2rem;
}
*/

/* Paragraphs + lists */

p,
li {
  font-family: var(--font-stack-base);
  font-size: var(--font-size-sm);
  line-height: 1.65;
}

p {
  margin-bottom: 1rem;
}

p:empty {
  height: 1rem;
}

li {
  margin-bottom: 0.6rem;
}

ul,
ol {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-left: 1.3rem;
}

:is(dir, menu, ol, ul) :is(dir, menu, ul) {
  list-style: none;
  padding-left: 1rem;
  margin-top: 0.5rem;
}

/* Anchor links */

p a,
li a {
  color: var(--blue);
  text-decoration-color: rgb(171, 207, 255);
}

p a:hover,
li a:hover {
  text-decoration-color: var(--blue);
}

/* Annotations */

.annotation {
  background-color: var(--light-blue);
  position: relative;
  width: calc(100% + var(--container-padding) * 2);
  left: calc(var(--container-padding) * -1);
  padding: 0 var(--container-padding);
}

body#tinymce .annotation {
  width: 100%;
}

.annotation * {
  font-family: var(--font-stack-subheadings);
  margin-top: 0;
  margin-bottom: 0;
}

/* Recreate stripped <br> from post content */
.annotation *:not(hr):empty,
.annotation br,
.annotation :is(h2, h3, h4, h5):has(br) {
  display: block;
  height: 15px;
}

.annotation :is(h3, h4, h5, h6, p, li) {
  font-stretch: 98%;
}

.annotation h4 {
  font-size: var(--font-size-md);
}

.annotation p,
.annotation ul,
.annotation ol,
.annotation li {
  font-size: var(--font-size-xs);
  line-height: 1.55;
  font-weight: 425;
  margin-block-start: 0; /* for editor */
}

.annotation strong,
.annotation b {
  font-weight: 600 !important;
}

.annotation ul {
  padding-left: 1rem;
}

.annotation :is(dir, menu, ol, ul) :is(dir, menu, ul) {
  padding-left: 0;
}

.annotation :is(dir, menu, ol, ul) :is(dir, menu, ul) li {
  font-size: var(--font-size-xxs) !important;
  margin-bottom: 0 !important;
  color: rgba(0, 0, 0, 0.7);
}

.annotation .timeline,
.annotation.timeline {
  font-size: var(--font-size-xs);
  font-style: italic;
  font-weight: 270;
  font-stretch: 102% !important;
  color: #898f93;
}

.annotation .song-title,
.annotation.song-title {
  font-size: var(--font-size-xl);
  font-weight: 370 !important;
  letter-spacing: -0.02em;
}

.annotation .song-title :is(strong, b),
.annotation.song-title :is(strong, b) {
  font-weight: 650 !important;
  letter-spacing: 0;
}

.annotation *[style*="padding-left"],
.annotation[style*="padding-left"] {
  padding-left: 1rem !important;
}

/* Horizontal rule */

hr {
  background-color: #ccc;
  border: none;
  height: 1px;
  width: 60%;
  margin: 1rem auto;
}

/* Sessions grid */

.sessions-grid {
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem auto;
}

.sessions-grid li {
  list-style: none;
  margin: 0;
  width: 39vw;
  height: 39vw;
  max-width: 250px;
  max-height: 250px;
  border-left-width: 0;
  border-right-width: 0;
  border-bottom-width: 0;
  border-top-width: 0.5rem;
  border-top-style: solid;
  flex-grow: 0;
  flex-shrink: 0;
  outline: 1px solid rgba(0, 0, 0, 0.06);
}

@media (min-width: 801px) {
  .sessions-grid li {
    width: 20vw;
    height: 20vw;
  }
}

@media (min-width: 1101px) {
  .sessions-grid li {
    width: 17vw;
    height: 17vw;
  }
}

.sessions-grid li a {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
  padding: 0.3em 0.7em;
}

.sessions-grid li a:hover .title {
  text-decoration: underline;
}

.sessions-grid li a .title {
  order: 2;
  font-family: var(--font-stack-headings);
  letter-spacing: -0.03em;
  font-size: clamp(18px, 5vw, 32px);
  line-height: 1.1;
  font-weight: 700;
  font-variation-settings: "opsz" 71;
}

@media (min-width: 801px) {
  .sessions-grid li a .title {
    font-size: clamp(18px, 2.3vw, 32px);
  }
}

.sessions-grid li a .eyebrow {
  width: 100%;
  order: 1;
  font-size: 1.2rem;
  font-family: var(--font-stack-subheadings);
  font-stretch: 120%;
  font-weight: 350;
}

/* Forms (just the contact form, maybe to live in a separate file) */

form label {
  font-family: var(--font-stack-subheadings);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-stretch: 120%;
  font-size: 0.7rem;
  color: var(--gray);
}

form label span {
  font-size: initial;
  text-transform: initial;
  letter-spacing: initial;
  font-stretch: initial;
}

form input[type="text"],
form input[type="email"],
form textarea {
  margin-top: 0.3rem;
  font-family: var(--font-stack-base);
  border: 1px solid #bbbbbb;
  border-bottom-color: #a4a4a4;
  border-radius: 6px;
  box-shadow: rgba(0, 0, 0, 0.06) 0 1px 5px;
  width: 100%;
  font-size: 1rem;
  padding: 0.1rem 0.4rem;
}

form input[type="text"],
form input[type="email"] {
  max-width: 400px;
}

form textarea {
  max-width: 600px;
  height: 240px;
}

form .wpcf7-not-valid-tip {
  display: block;
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

form .wpcf7-response-output {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 0.5rem 1rem !important;
  font-family: var(--font-stack-subheadings);
  border-radius: 8px;
  max-width: 600px;
  font-size: 0.9rem !important;
}

.wpcf7 form.sent .wpcf7-response-output {
  background-color: #c7ffdb;
  border-color: #a9e0bd !important;
}

.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output {
  background-color: rgb(255, 207, 207);
  border-color: rgb(238, 156, 156) !important;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
  background-color: rgb(250, 237, 170);
  border-color: rgb(242, 220, 109) !important;
}

form input[type="submit"] {
  font-family: var(--font-stack-headings);
  background-color: var(--theme-bg-color);
  color: white;
  font-weight: 600;
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 0.1em 0.8em;
  font-variation-settings: "opsz" 64;
  font-size: 1.6rem;
  box-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
  transform: scale(1);
  transition: transform 0.2s ease;
}

form input[type="submit"]:hover {
  cursor: pointer;
  transform: scale(1.03);
}

form input[type="submit"]:active {
  background-color: #378046;
}

.center {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.center p {
  width: 100%;
}

/* Font size utilities */

.font-size-xxs {
  font-size: var(--font-size-xxs);
}
.font-size-xs {
  font-size: var(--font-size-xs);
}
.font-size-sm {
  font-size: var(--font-size-sm);
}
.font-size-md {
  font-size: 17px;
}
.font-size-lg {
  font-size: 1.3rem;
}
.font-size-xl {
  font-size: 1.65rem;
}
.font-size-xxl {
  font-size: 2rem;
}
.font-size-xxxl {
  font-size: 2.4rem;
}

/* Font family utilities */

.font-family-serif {
  font-family: var(--font-stack-base);
}
.font-family-sans-serif {
  font-family: var(--font-stack-subheadings);
  font-stretch: 100%;
}
.font-family-sans-serif-condensed {
  font-family: var(--font-stack-subheadings);
  font-stretch: 70%;
}
.font-family-title {
  font-family: var(--font-stack-headings);
  font-variation-settings: "opsz" 144;
}

/* Font weight utilities */

.font-weight-light {
  font-weight: 300;
}
.font-weight-regular {
  font-weight: 400;
}
.font-weight-semibold {
  font-weight: 600;
}
.font-weight-bold {
  font-weight: 700;
}

/* Text transform utilities */

.text-transform-uppercase {
  text-transform: uppercase;
}

/* Letter spacing utilities */

.letter-spacing-tighter {
  letter-spacing: -0.02em;
}

.letter-spacing-looser {
  letter-spacing: 0.025em;
}

/* Line height utilites */

.line-height-tight {
  line-height: 1.1;
}

.line-height-regular {
  line-height: auto;
}

.line-height-spacious {
  line-height: 1.5;
}

/* Margin controls */

.margin-top-0 {
  margin-top: -1rem;
}

.margin-bottom-0 {
  margin-bottom: -1rem;
}

/* See markClosingItalicQuotes in JS */
.closing-double-quote {
  display: inline-block;
  margin-left: -0.15em;
  margin-right: 0.11em;
}

figure + figure {
  margin-left: 1rem;
}

/* Figures */

figure.audio {
  display: inline-block;
  width: 275px;
  background-color: #f1f9f3;
  border-radius: 20px;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
}

figure.left {
  float: left;
  margin-right: 1.5rem;
}

figure.right {
  float: right;
  margin-left: 1.5rem;
}

figure > div {
  margin-bottom: 0.8rem;
}

figure button {
  appearance: none;
  border: none;
  background-color: var(--theme-bg-color);
  border-radius: 99px;
  width: 60px;
  height: 60px;
  text-align: center;
  display: block;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  transform: scale(1);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  box-shadow: rgba(0, 0, 0, 0.25) 0 2px 3px;
}

figure button:hover {
  transform: scale(1.03);
  box-shadow: rgba(0, 0, 0, 0.18) 0 3px 6px;
}

figure button:active {
  background-color: #378046;
}

figure button span {
  visibility: hidden;
}

figure button:after {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
}

figure button[data-playing="false"]:after {
  content: "▶";
  font-size: 34px;
  margin-top: 2px;
  margin-left: 3px;
}

figure button[data-playing="true"]:after {
  content: "⏸";
  font-size: 51px;
}

figure figcaption p {
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  font-style: italic;
  text-align: center;
  margin: 0;
}

/* Tables */

table {
  width: auto !important;
  border-collapse: collapse;
  border: none;
  margin-bottom: 1rem;
}

@media (min-width: 801px) {
  table {
    min-width: 500px;
  }
}

th,
td {
  border: none;
  padding: 0.2em 1em 0.4em 0;
  vertical-align: top;
  font-family: var(--font-stack-subheadings);
  width: auto !important;
  font-size: 14px;
}

th {
  font-weight: 600;
  text-align: left;
}

body#tinymce table[data-mce-selected="1"] tr:not(:last-child) th,
body#tinymce table[data-mce-selected="1"] tr:not(:last-child) td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

body#tinymce table[data-mce-selected="1"] th:not(:last-child),
body#tinymce table[data-mce-selected="1"] td:not(:last-child) {
  border-right: 1px solid rgba(0, 0, 0, 0.12);
}
