/* Clearing */

span.clear {
	display: block;
	clear: both;
	height: 0;
}

.clear {
    clear: both;
}

/* Monospace text */

.monospace {
	font-family: monospace;
    letter-spacing: 0.4em;
    font-weight: 600;
}

.monospace li {
    font-size: 1.4rem;
}

/* Greyed-out text */

s {
    color: rgb(153, 153, 153);
    text-decoration: none;
    font-style: italic;
}

i s, em s {
    font-style: normal;
}

/* Keyboard input */

kbd, code {
	padding: 0.2rem 0.4rem;
	border-radius: 0.3rem;
	font-size: 0.8rem;
}

kbd {
	background-color: rgb(247, 245, 241);
	border: 1px solid rgb(226, 226, 226);
}

code {
	background-color: rgb(241, 245, 247);
	border: 1px solid rgb(226, 226, 226);
}


/* Camel case */
span.camel {
	text-transform: none;
}


/* Alerts */

aside.info, aside.warning, aside.error {
	clear: both;
    padding: 2rem 2rem 2.8rem 6rem;
    margin: 3rem 5rem;
    border-radius: 1rem;
    position: relative;
    font-weight: 600;
}

aside.info::before, aside.warning::before, aside.error::before {
    font-family: 'Font Awesome 6 Free';
	font-style: normal;
	font-weight: 900;
	font-display: block;
    position: absolute;
    left: 2.5rem;
    top: 2.7rem;
    font-size: 2rem;
}

aside.info ul, aside.warning ul, aside.error ul {
    margin-left: 0;
}

aside.info p, aside.warning p, aside.error p {
	padding: 0;
	margin-left: 0;
	max-width: none;
}

aside.info {
    background-color: rgb(13, 71, 161);
    color: rgb(255, 255, 255);
}

aside.info::before {
    content: '\f05a';
    color: rgb(255, 255, 255);
}

aside.warning {
    background-color: rgb(253, 228, 0);
    color: rgb(0, 0, 0);
}

aside.warning::before {
    content: '\f071';
    color: rgb(0, 0, 0);
}

aside.warning p:first-of-type, aside.error p:first-of-type {
    margin-top: 0.4rem;
}

aside.error {
    background-color: rgb(183, 28, 28);
    color: rgb(255, 255, 255);
}

aside.error::before {
    content: '\f06a';
    color: rgb(255, 255, 255);
}


/* Boxes */

aside.box {
	clear: both;
    padding: 1.5rem 2rem 3rem 2rem;
    margin: 2rem auto 3rem auto;
    border-radius: 0.5rem;
    background-color: rgb(247, 245, 241);
    border: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
	max-width: calc(110ch - 5rem);
}

aside img {
    float: right;
    max-width: 30%;
    margin: 0 0 1rem 1rem;
    border-radius: 0.5rem;
}

aside.box p {
    margin-right: 0;
    max-width: none;
}

aside.box i.fa-solid, aside.box i.fa-regular {
	display: block;
	position: absolute;
	margin: 1.5rem 0 0 1rem;
	font-size: 2rem;
}

section:nth-of-type(even) aside.box {
    background-color: rgb(255, 255, 255);
}

aside.blurb {
    padding: 2rem 2rem;
    margin: 0.5rem 0 2rem 2rem;
    background-color: rgb(247, 245, 241);
    font-size: 2rem;
    line-height: 1.4;
    font-weight: 600;
    font-style: italic;
    border-left: 8px solid rgb(23, 159, 217);
	width: 30%;
	float: right;
}

aside.blurb a:link, aside.blurb a:visited {
    color: rgb(255, 255, 255);
}


/* Panels */

ul.panels {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	grid-auto-rows: 1fr;
    gap: 1rem;
    list-style: none;
    margin: 2rem 5rem;
    padding: 0;
	max-width: none;
}

ul.panels li {
    background-color: rgb(249, 247, 247);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    overflow: hidden;
	transition: box-shadow 0.2s ease-in-out;
    padding: 0;
    border-radius: 0.8rem;
}

ul.panels li img {
	width: 100%;
    width: calc(100% + 2rem);
	height: 260px;
	object-fit: cover;
    object-position: top;
	border-radius: 0.9rem 0.9rem 0 0;
	margin: 0 -1rem 1.5rem -1rem;
}

ul.panels.tall li img {
	height: 240px;
}

ul.panels li a.current {
    filter: grayscale(1) contrast(0.8) brightness(1.4);
}

ul.panels li:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

ul.panels li a:link, ul.panels li a:visited {
    display: block;
    text-align: center;
    font-weight: bold;
    padding: 0 1rem 2.5rem 1rem;
}

ul.panels a[target="_blank"]::after {
    display: none;
}


/* Book animation */

div.book {
    width: 225px;
    height: 350px;
    position: relative;
    text-align: center;
    margin: 0 3rem 2rem 5rem;
    display: block;
    vertical-align: top;
}

div.book .book-cover {
    background-size: 100% 100%;
}

div.book span {
    display: block;
}

div.book .book-cover {
    position: absolute;
    z-index: 1;
    width: 100%;
    height: 100%;
    transform-origin: 0 50%;
    -webkit-transform-origin: 0 50%;
    background: #111;
    background-size: cover;
    border-radius: 3px;
    box-shadow: inset 4px 1px 3px #ffffff60, inset 0 -1px 2px #00000080;
    transition: all .5s ease-in-out;
    -webkit-transition: all .5s ease-in-out;
}

div.book .effect {
    width: 20px;
    height: 100%;
    margin-left: 10px;
    border-left: 2px solid #00000010;
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    transition: all .6s ease;
}

div.book .light {
    width: 90%;
    height: 100%;
    position: absolute;
    border-radius: 3px;
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 100%, rgba(255, 255, 255, 0.2) 100%);
    top: 0;
    right: 0;
    opacity: .1;
    transition: all .5s ease;
    -webkit-transition: all .5s ease;
}

div.book .book-inside {
    width: calc(100% - 2px);
    height: 96%;
    position: relative;
    top: 2%;
    border: 1px solid grey;
    border-radius: 3px;
    background: white;
    box-shadow: 5px 20px 20px -5px #00000030, inset -2px 0 0 grey, inset -3px 0 0 #dbdbdb, inset -4px 0 0 white, inset -5px 0 0 #dbdbdb, inset -6px 0 0 white, inset -7px 0 0 #dbdbdb, inset -8px 0 0 white, inset -9px 0 0 #dbdbdb;
}

div.book:hover .book-cover {
    transform: perspective(2000px) rotateY(-30deg);
    -webkit-transform: perspective(2000px) rotateY(-30deg);
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    box-shadow: inset 4px 1px 3px #ffffff60, inset 0 -1px 2px #00000080, 10px 0px 10px -5px #00000030;
}

/* Glossaries */

h3.letter {
	display: block;
	font-size: 3rem;
	margin: 4rem 0 0 5rem;
	border: 0;
	text-align: left;
	max-width: 80ch;
	font-weight: 900;
	clear: both;
    color:rgb(100, 100, 100);
    border-bottom: 2px solid rgb(100, 100, 100);
}

h5.glossary {
	font-size: 1.5rem;
	margin-bottom: 0.5rem;
	clear: both;
}

h5.glossary + figure {
	margin-top: -2.5rem;
}

h4.glossary {
    margin-top: 0;
    margin-bottom: 1rem;
	opacity: 0.6;
	font-style: italic;
	font-size: 2rem;
}

/* Lexicon */

p.occurrenceOriginal {

}

p.occurrenceTransliterated {
    color: rgb(100, 100, 100);
    margin-top: 0.3rem;
    font-style: italic;
}

/* Banners */

#betaBanner {
    position: fixed;
    bottom: 10px;
    right: 10px;
    width: 200px;
    background-color: rgb(253, 215, 0);
    color: black;
    text-align: center;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    border-radius: 10px;
}

#localhostBanner {
    position: fixed;
    bottom: 60px;
    right: 10px;
    width: 200px;
    background-color: #4CAF50;
    color: white;
    text-align: center;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    border-radius: 10px;
}

/* Notes */

.tinyNote {
    font-size: 0.9rem;
    color: rgb(100, 100, 100);
    margin-top: 2rem;
    margin-bottom: 2rem;
    text-align: left;
    font-weight: normal;
}

/* Estrangello */

span.estrangello {
    font-size: 1.3em;
    line-height: 1;
}

/* Floating Preview */
#floating-preview {
    display: none; /* Hidden by default */
    position: absolute;
    border: 1px solid #ccc;
    background-color: white;
    padding: 0 1.5rem 1rem 1.5rem; /* Adjusted padding: top right bottom left */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000; /* Ensure it's above other content */
    max-width: 340px; /* Limit width */
    overflow-y: auto; /* Allow scrolling if content is long */
    max-height: 260px; /* Limit height to 50% of viewport height */
    border-radius: 0;
    line-height: 1.6;
    overflow-x: hidden;
    cursor: pointer;
    /* Animation properties for appearing */
    opacity: 0;
    transform: translateY(10px); /* Starts slightly below its final position */
    transition: opacity 0.2s ease-out, transform 0.2s ease-out; /* Smooth transition for 200ms */
}

/* Class to trigger the "appear" animation */
#floating-preview.show-animation {
    opacity: 1;
    transform: translateY(0);
}

#floating-preview p, #floating-preview li, #floating-preview th, #floating-preview td {
    font-size: 0.9rem;
    line-height: 1.5;
}

#floating-preview p, #floating-preview li {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
}

#floating-preview ul, #floating-preview ol {
    margin-left: 0;
    margin-right: 0;
    columns: 1;
    max-width: none;
}

#floating-preview blockquote {
    margin-left: 0.8rem;
    margin-right: 0;
    max-width: none;
}

#floating-preview h1, #floating-preview h2, #floating-preview h3, #floating-preview h4, #floating-preview h5, #floating-preview h6 {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: none;
}

#floating-preview h1 {
    font-size: 1.3rem;
}

#floating-preview h2 {
    font-size: 1.2rem;
    margin-top: 1rem;
}

#floating-preview h3 {
    font-size: 1.1rem;
}

#floating-preview h4, #floating-preview h5, #floating-preview h6 {
    font-size: 1rem;
}

#floating-preview aside.box i.fa-solid {
    display: none;
}

#floating-preview aside.box, #floating-preview div.timeline div.contents, #floating-preview p.noteBox, #floating-preview aside.context {
    margin: 1rem -1.5rem;
    border-radius: 0;
    width: calc(100% + 3rem);
    max-width: none;
    border-right: 0;
    border-left: 0;
}

#floating-preview sup {
    display: inline-block;
    font-size: 0.8rem;
    vertical-align: top;
}

#floating-preview.text sup.v {
    opacity: 0.8;
    margin-right: 0.2rem;
}

#floating-preview.text div.medium-gap {
    height: 2rem;
}

#floating-preview.text div.large-gap hr {
    border: 0;
    border-top-width: 10px;
    border-top-style: dotted;
    border-top-color: rgba(0, 0, 0, 0.2);
    width: 80px;
    margin: 2rem auto 1.5rem auto;
}

#floating-preview section {
    padding: 2rem 0;
}

#floating-preview section {
    border-top: 1px solid rgba(0, 0, 0, 0.2);
}

#floating-preview section:first-of-type {
    border-top: none;
    padding-top: 0;
}

#floating-preview button {
    display: none;
}

i.fa-heart {
    margin-right: 0.2rem;
}

p.preTitle {
    font-size: 0.9rem;
    margin-top: 0;
    margin-bottom: -1rem;
}