/*
Color Palette Specifications
Color         HEX Code  Recommended Use Case
Rich Black    #1a1a1a   Website background, footer, and deep text sections
Crimson Red   #8f1d2c   Call to action (CTA) buttons, hover effects, and active navigation links
Opulent Gold  #cca43b   Headers, logo accents, price tags, and decorative icons
Off-White     #f4f4f4   Primary reading text and neutral backgrounds to maintain legibility
Charcoal Gray #333333   Secondary text, borders, and subtle divider lines
*/


:root {
  --crimson: #8f1d2c;
  --gold: #cca43b;
  --off-white: #f4f4f4;
  --light-gray: #cccccc;
  --middle-gray: #666666;
  --charcoal: #333333;
  --rich-black: #1a1a1a;

  color-scheme: light dark;
  --bg-color: light-dark(#ffffff, #121212);
  --bg-color-reverse: light-dark(#121212, #ffffff);
  --text-color: light-dark(var(--rich-black), var(--off-white));
  --text-color-reverse: light-dark(var(--off-white), var(--rich-black));
}

html {
  height: 100%;
  line-height: 1.35;
  margin: 2rem;
}

body {
  font-family: Charis, serif;
  font-size: 1.2rem;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: underline;
  background-color: transparent;
  cursor: pointer;
}

a:hover,
a:focus {
  color: inherit;
}

/* Accessibility: keep a visible focus ring for keyboard users only */
a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

hr {
  border: none;
  height: 1px;
  background-color: var(--text-color);
  margin: 20px 0;
}

b,
strong {
  font-weight: 600;
}

/* 
Reference: https://www.countryparson.org/muddlings/2019/2/4/liturgical-typeface-on-a-shoestring
This file is from the Charis project (https://software.sil.org/charis/).
Copyright (c) 1997-2025 SIL Global (https://www.sil.org/) with Reserved
Font Names "Charis" and "SIL". This Font Software is licensed under the SIL
Open Font License, Version 1.1 (https://openfontlicense.org).
*/

/* Charis */
@font-face {
  font-family: Charis;
  font-weight: 400;
  font-style: normal;
  src: url(/assets/font/Charis7/Charis-Regular.woff2) format('woff2');
}

@font-face {
  font-family: Charis;
  font-weight: 500;
  src: url(/assets/font/Charis7/Charis-Medium.woff2) format('woff2');
}

@font-face {
  font-family: Charis;
  font-weight: 600;
  src: url(/assets/font/Charis7/Charis-SemiBold.woff2) format('woff2');
}

@font-face {
  font-family: Charis;
  font-weight: 700;
  src: url(/assets/font/Charis7/Charis-Bold.woff2) format('woff2');
}

/* Cormorant Garamond */
@font-face {
  font-family: CormorantGaramond;
  font-style: normal;
  font-weight: 700;
  src: url(/assets/font/CormorantGaramond/CormorantGaramond-Bold.woff2) format('woff2');
}

.title {
  font-family: CormorantGaramond, serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  padding: 0 0.1rem;
}

.heading {
  font-size: 1.15rem;
  font-weight: 600;
}

.btn {
  /* Layout & Sizing */
  display: inline-block;
  padding: 0.5rem;
  margin: 0.2rem 0.5rem;

  /* Typography */
  text-decoration: none;
  /* font-family: sans-serif; */
  font-weight: 500;
  /* font-size: 16px; */

  /* Colors & Borders */
  background-color: light-dark(var(--charcoal), var(--light-gray));
  color: var(--text-color-reverse);
  border-radius: 3px;

  /* Animation */
  transition: background-color 0.2s ease, transform 0.1s ease;
  cursor: pointer;
}

/* Colors */
.color-gold {
  color: var(--gold);

}

.color-black {
  color: light-dark(var(--charcoal), var(--light-gray));
}

.bg-gold {
  background-color: var(--gold);
}

.bg-red {
  background-color: var(--crimson);
}

/* Hover State */
.btn:hover,
.btn-hover {
  background-color: light-dark(var(--light-gray), var(--middle-gray));
  color: var(--text-color);
}

.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Clicked / Active State */
.btn:active {
  transform: scale(0.98);
}

/* remove bold styling from heading
h1 {
  font-weight: normal;
} */

/* Desktop default layout (Side-by-Side) */
.container {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

.box1 {
  flex: 1;
  text-align: left;
  flex-basis: 15%;
}

.box2 {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-basis: 68%;
}

.box3 {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  flex-basis: 15%;
}

.box_btns {
  text-align: center;
}

/* Mobile responsive layout (Stacked) */
@media (max-width: 768px) {
  html {
    margin: 0.5rem;
  }

  .container {
    flex-direction: column;
    gap: 0;
  }

  .box1 {
    text-align: center;
  }

  .box2,
  .box3 {
    justify-content: center;
  }

}

/* Container for the tooltip */
.tooltip {
  position: relative;
  display: inline-block;
}

/* Tooltip design and positioning */
@media (hover: hover) and (pointer: fine) {
  [data-tooltip]:hover::after {
    content: attr(data-tooltip);
    /* Grabs text from the HTML attribute */
    position: absolute;
    bottom: calc(-100% - 0.5rem);
    /* Places tooltip at bottom */
    left: 50%;
    transform: translateX(-50%);
    border: 2px solid var(--text-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 0.2rem;
    font-size: 0.8rem;
    white-space: nowrap;

    /* Hides the tooltip by default */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out;
    z-index: 10;
  }
}

/* Reveal tooltip on hover and keyboard focus */
.tooltip:hover::after,
.tooltip:focus::after {
  opacity: 1;
  visibility: visible;
}



/* Table Customization */

/* Disable alternate row zebra striping for Tabulator Bootstrap 5 theme */
.tabulator .tabulator-row.tabulator-row-even,
.tabulator .tabulator-row.tabulator-row-odd {
  background-color: var(--bg-color);
  color: var(--text-color);
}

/* Custom background color for hovered rows */
.tabulator .tabulator-row:hover {
  background-color: light-dark(var(--light-gray), var(--middle-gray)) !important;
}

/* Add filter icon in filter input header filter */
.tabulator-header-filter input {
  /* background-image: url("data:image/svg+xml,%3Csvg xmlns='http://w3.org' viewBox='0 0 512 512'%3E%3Cpath fill='%23888888' d='M3.9 54.9C-5.6 45.4-5.2 29.8 4.8 20.8l.1-.1C14.8 10.8 30.2 10.7 40 20.5L184 164.5V424c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24V164.5L472 20.5c9.8-9.8 25.2-9.7 35.1 .2l.1 .1c10 9 10.4 24.6 .8 34.1L320 240V379.7c0 8.3-4.3 16-11.3 20.3l-64 39.7C233.4 446.5 219 440.6 219 428V240L3.9 54.9z'/%3E%3C/svg%3E"); */
  /* background-repeat: no-repeat; */
  /* background-position: right 8px center; */
  /* background-size: 14px; */
  color: #888888 !important;
  /* padding-right: 28px !important; */
}

.tabulator-tooltip {
  border: 2px solid var(--text-color) !important;
  background-color: var(--bg-color) !important;
  color: var(--text-color) !important;
  padding: 0.5rem !important;
  border-radius: 0.2em !important;
  font-size: 0.8em !important;
}

.tabulator-row .tabulator-responsive-collapse td:first-child {
  color: var(--text-color);
}

.tabulator-cell.custom-column-title {
  text-decoration: none;
  font-weight: 500;
  background-color: var(--crimson);
  color: var(--off-white);
  border-radius: 3px;
  margin: 5px;
}

.tabulator-cell.custom-column-epub:hover {
  color: var(--off-white);
}

.tabulator-cell.custom-column-epub:active {
  color: var(--crimson);
  transform: scale(1.2); 
}
