@tailwind base;
@tailwind components;
@tailwind utilities;

@font-face {
  font-family: "Junicode";
  src: url("../fonts/JunicodeVF-Roman.4ea2710c1535.woff2") format("woff2");
}

@font-face {
  font-family: "Junicode";
  src: url("../fonts/JunicodeVF-Italic.9c7ff07e58d7.woff2") format("woff2");
  font-style: italic;
}

body {
  font-family: "Playfair Display," Georgia, "Times New Roman", Times, serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: 1.2rem;
  font-style: normal;
}

.prose span div {
  display: inline;
}

/* --- Step 4 Addition: Full Width & Image Wrapping --- */

/* 1. Override the 75% width restriction (site pages only, which use <article class="prose">) */
article.prose {
    max-width: none;
    width: 100%;
}

/* 2. Custom Image Wrapping for StreamField ImageBlocks */
/* This targets the 'image' blocks specifically */
.block-image {
    display: block;
    clear: both;
    margin-bottom: 2rem;
}

.block-image.left {
    float: left;
    margin-right: 2rem;
    margin-bottom: 1rem;
    width: 100%;
}

.block-image.right {
    float: right;
    margin-left: 2rem;
    margin-bottom: 1rem;
    width: 100%;
}

/* Responsive adjustment: on medium screens and up, images take up 1/3 width */
@media (min-width: 768px) {
    .block-image.left, .block-image.right {
        width: 33%;
    }
}

/* 3. Ensure paragraphs flow correctly around floated images */
.block-paragraph {
    display: block;
}
note[data-notation] {
  background-color: #e2e2e2;
  cursor: help;
  padding: 0 0.2em;
  border-radius: 0.3em;
}

/* Custom tooltip styles that we can't achieve with just Tailwind */
.tooltip-arrow {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid white;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.1));
}

.shadow-left {
  box-shadow: -8px 0 10px -6px rgba(0, 0, 0, 0.2);
}

.dropdown-toggle svg {
  transition: transform 0.2s;
}

.dropdown-open svg {
  transform: rotate(180deg);
}

/* 
[data-notation]:hover::before {
    content: attr(data-notation);
    position: absolute;
    background: #ffffcc;
    padding: 5px;
    border: 1px solid #000;
    border-radius: 5px;
    margin-top: 30px;
    font-size: 0.8em;
    z-index: 10;
} */

.grid > div {
  align-self: start;
}

/* Ensure main content stretches to the edges on the index page */
.no-padding {
  padding: 0;
  margin: 0;
}

/* Direct hover selector for tiles */
.tile-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  transition: opacity 0.3s;
  z-index: 5;
}

.image-tile:hover .tile-overlay {
  opacity: 0 !important;
}

/* Force hover effect */
@media (hover: hover) {
  .image-tile:hover .tile-overlay {
    opacity: 0 !important;
  }
}

/* images in richtextfields */
.prose .richtext-image {
  margin-left: auto;
  margin-right: auto;
  border-radius: 0.5rem;
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 0.1),
    0 2px 4px -2px rgb(0 0 0 / 0.1);
  border: 1px solid rgb(209 213 219);
}
.prose .richtext-image.right {
  float: right;
  margin: 0rem 1rem 1rem;
}
.prose .richtext-image.left {
  float: left;
  margin: 0rem 1rem 1rem;
}

/* heading blocks in streamfields */
.prose .block-heading {
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* videos in streamfields */
.prose .block-video iframe {
  max-width: 100%;
}

.prose {
  max-width: max(65ch, 75%);
}

/* let a prose block opt out of the width limit above with Tailwind's
   max-w-none (e.g. the manuscripts page introduction) */
.prose.max-w-none {
  max-width: none;
}
