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

.btn {
  @apply font-bold py-2 px-4 rounded;
}
.btn-blue {
  @apply bg-blue-500 text-white;
}
.btn-blue:hover {
  @apply bg-blue-700;
}

.space-top {
  margin-top: 16px;
}
/*

@layer components {
  .btn-primary {
    @apply py-2 px-4 bg-blue-200;
  }
}

*/
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

.book-reader {
  margin: auto;
  width: 100%;
  /* border: 3px solid rgb(89, 89, 89); */
  border: none;
  padding: 0px;
}

.column .book-reader {
  width: 50%;
}

/* Override the column width when book-reader is in a CSS grid context */
.grid .book-reader,
[class*="grid"] .book-reader {
  width: 100% !important;
}

/* Ensure grid columns can have different heights and align to top */
.grid {
  align-items: start !important;
}

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

/* specific to the PDF print version of the book used for publishing... Although HTML payload seems to format better */
@media print {
  .book-reader {
    margin: auto;
    width: 100%;
    border: none;
    padding: 0px;
  }

  .cover {
    all: unset;
    /* overflow-wrap: normal; */
    /* margin: unset;
    width: 100vw;
    height: 95vh; */
    /* page-break-after: always; */
  }

  .cover .page-body {
    height: 90vh;
  }

  #book-ending p {
    font-size: 1.75em;
  }

  .book-pages {
    all: unset;
  }

  .book-page {
    width: 100vw;
    height: 98vh;
    page-break-after: always;
  }

  .page-body {
    height: 95vh;
  }

  .book-page img {
    width: 98%;
    max-width: 98%;
    max-height: 65%;
  }

  pre.page-content {
    margin-top: 0.8em;
    text-align: left;
    font-size: 1em;
    width: 82%;
  }

  pre.large {
    font-size: 2.25em;
  }

  .footer_page_number {
    margin: auto;
    border-bottom: none;
  }

  footer_author {
    margin: auto;
    border-bottom: none;
    font-size: 2em;
  }
}

.format-html {
  width: 34em;
}

.cover {
  text-align: center;
  overflow-wrap: normal;
  margin: auto;
  border: none;
}

.cover img {
  width: 100%;
}

.cover h1 {
  font-size: 2.5em;
  margin: 0px;
}

.cover h1 {
  font-size: 2.5em;
  margin: 0px;
}

.cover h2 {
  margin: 0px;
}

.book-pages {
  text-align: center;
  overflow-wrap: normal;
  margin: auto;
  border: none;
}

.book-page {
  margin: auto;
  margin-top: 0px;
  width: 100%;
  border: none;
  page-break-after: always;
}

.book-page img {
  width: 90%;
  max-width: 90%;
  max-height: 65%;
}

.book-page a {
  all: unset;
}

pre.page-content {
  white-space: pre-wrap;
  /* Since CSS 2.1 */
  white-space: -moz-pre-wrap;
  /* Mozilla, since 1999 */
  white-space: -pre-wrap;
  /* Opera 4-6 */
  white-space: -o-pre-wrap;
  /* Opera 7 */
  word-wrap: break-word;
  /* Internet Explorer 5.5+ */
  margin: auto;
  margin-top: 0.8em;
  margin-top: 0.2em;
  font-size: 0.85em;
}

pre.page-content.large {
  text-align: left;
  font-size: 2.25em;
}

.footer_page_number {
  border-bottom: 1px solid rgb(89, 89, 89);
  margin: auto;
  margin-top: 0.65em;
  margin-bottom: 0.2em;
  font-size: 0.65em;
}

/* styles for non deployment related user interface */

.book-index-title {
  color: rgba(0, 0, 0, 0.8);
  text-decoration: none;
}

.two h1 {
  text-transform: capitalize;
}

.two h1:before {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 2px;
  content: "";
  background-color: #c50000;
}

.two h1 span {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 4px;
  line-height: 3em;
  padding-left: 0.25em;
  color: rgba(0, 0, 0, 0.8);
  padding-bottom: 10px;
}

.alt-two h1 {
  text-align: center;
}

.alt-two h1:before {
  left: 50%;
  margin-left: -30px;
}

/* below is for editting related styles */

.edit-mode-true {
  font-size: 150%;
}

.edit-mode-true h1 {
  margin-bottom: -5px;
  font-size: 1em;
}

.edit-mode-true h2 {
  margin-bottom: -5px;
  font-size: 0.8em;
}

.edit-mode-true textarea {
  font-size: 18px;
}

.edit-mode-true input[type="text"] {
  font-size: 18px;
}

/* Page edit preview only: keep image and text visible together */
.page-edit-preview {
  transform: scale(0.75);
  transform-origin: top center;
  padding: 2rem 0 6rem 0;
}

.page-edit-preview .book-page {
  display: flex;
  flex-direction: column;
}

.page-edit-preview .page-body {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 0;
}

.page-edit-preview .book-page img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
}

.page-edit-preview pre.page-content {
  font-size: 1.2em;
  margin: 0;
  flex-shrink: 1;
  overflow-y: auto;
  max-height: 30vh;
}

.row {
  display: flex;
  margin-top: 8px;
}

.column {
  flex: 50%;
  margin-top: 8px;
}

img.selected {
  border: 5px dashed rgb(50, 92, 19);
  margin: -4px;
  padding: -2px;
  max-width: 365px;
}

.sticky {
  position: -webkit-sticky;
  position: sticky;
  align-self: flex-start;
  top: 0;
  height: 100%;
}

.image-form {
  display: inline;
}

.inline-title {
  font-size: inherit;
  font-weight: bold;
}

.inline-subtitle {
  font-size: -1;
  font-weight: bold;
}

form.inline-edit {
  display: inline;
}

input.inline-title {
  border-top-style: hidden;
  border-right-style: hidden;
  border-left-style: hidden;
  border-bottom-style: hidden;
  /* border-bottom-style: groove; */
  /* background-color: #eee; */
  display: inline;
}

input.inline-subtitle {
  border-top-style: hidden;
  border-right-style: hidden;
  border-left-style: hidden;
  border-bottom-style: hidden;
  /* border-bottom-style: groove; */
  /* background-color: #eee; */
  display: inline;
}

.flex-container {
  display: flex;
  flex-wrap: wrap;
  overflow-y: auto;
  height: 800px;
  padding-bottom: 150px;
}

.flex-child {
  flex: 1 0 23%;
  /* explanation below */
  padding: 2px;
  min-height: 120px;
}

.image-option {
  max-width: 300px;
}

.big-blue-button {
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
