/************* Quill Editor *************/
.ql-container.ql-snow {
  font-size: 16px;
  background-color: white; 
  border: 1px solid black !important;
  min-height: 200px;
}

.ql-editor {
  line-height: 1.6;
  padding-left: 8px !important; /* Adjust this value to your liking */
  padding-right: 8px !important;
  padding-top: 8px !important;
}

.ql-editor.ql-blank::before {
  left: 15px !important; /* Match the padding-left above exactly */
  right: 15px !important;
  font-style: normal;
  color: rgba(0,0,0,0.6); /* Optional: standard placeholder grey */
}
/* Bold fix */
.ql-editor strong,
.ql-editor b {
  font-weight: bold !important;
}

.ql-editor span {
  font-weight: inherit;
}

/* Fix for the link/image tooltip being cut off */
.ql-snow .ql-tooltip {
  margin-left: 10px; /* Moves it away from the left edge */
  white-space: nowrap; 
  left: 5px !important; /* Forces a minimum distance from the left */
}

/* Optional: Ensure it stays above other elements if needed */
.ql-snow .ql-tooltip.ql-editing {
  left: 15px !important;
}

/************* Quill size classes *************/
.ql-editor .ql-size-8px {
  font-size: 8px;
}

.ql-editor .ql-size-10px {
  font-size: 10px;
}

.ql-editor .ql-size-12px {
  font-size: 12px;
}

.ql-editor .ql-size-14px {
  font-size: 14px;
}

.ql-editor .ql-size-18px {
  font-size: 18px;
}

.ql-editor .ql-size-24px {
  font-size: 24px;
}

.ql-editor .ql-size-32px {
  font-size: 32px;
}

/************* Quill size dropdown labels *************/
.ql-snow .ql-picker.ql-size .ql-picker-label::before {
  content: "16px" !important;
}

.ql-snow .ql-picker.ql-size .ql-picker-label[data-value]::before {
  content: attr(data-value) !important;
}

.ql-snow .ql-picker.ql-size .ql-picker-item:not([data-value])::before {
  content: "16px" !important;
}

.ql-snow .ql-picker.ql-size .ql-picker-item[data-value]::before {
  content: attr(data-value) !important;
}

/************* Quill size dropdown visual previews *************/
.ql-snow .ql-picker.ql-size .ql-picker-item:not([data-value])::before {
  font-size: 16px !important;
}

.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="8px"]::before {
  font-size: 8px !important;
}

.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="10px"]::before {
  font-size: 10px !important;
}

.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="12px"]::before {
  font-size: 12px !important;
}

.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="14px"]::before {
  font-size: 14px !important;
}

.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="18px"]::before {
  font-size: 18px !important;
}

.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="24px"]::before {
  font-size: 24px !important;
}

.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="32px"]::before {
  font-size: 32px !important;
}

/************* Mini-editor toolbar *************/
#bible-mini-toolbar {
  position: fixed;
  top: 42px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  max-width: calc(100vw - 40px);
  z-index: 2500;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  background: #000;
  border: 1px solid #222;
  padding: 6px 8px;
  margin: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

#bible-mini-toolbar button,
#bible-mini-toolbar select {
  min-height: 28px;
  padding: 3px 8px;
  font-size: 14px;
}

#bible-mini-toolbar button {
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
}

#bible-mini-toolbar button:hover {
  background: #f3f3f3;
}

#bible-mini-toolbar button.active-tool {
  background: #31ACFF;
  color: #fff;
  border-color: #31ACFF;
}

#bible-mini-toolbar .toolbar-separator {
  color: #777;
  margin: 0 2px;
}

/************* Bible display area *************/
#display-text {
  padding-top: 45px;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  max-height: none !important;
}

#bible-text {
  padding: 20px;
  font-size: 18px;
  line-height: 1.7;
  user-select: text;
}

#bible-drawing-area {
  position: relative;
  cursor: text;
  transform-origin: top left;
}

#bible-drawing-area.drawing-mode {
  cursor: crosshair;
}

#bible-drawing-area.drawing-mode,
#bible-drawing-area.drawing-mode * {
  user-select: none;
}

/************* User-added Bible text annotations *************/
.eb-container .bible-user-format.bold {
  font-weight: 900 !important;
}

.eb-container .bible-user-format.italic {
  font-style: italic !important;
}

.eb-container .bible-user-format.underline {
  text-decoration-line: underline !important;
  text-decoration-thickness: 2px;
}

.eb-container .bible-user-format.double-underline {
  text-decoration-line: underline !important;
  text-decoration-style: double !important;
  text-decoration-thickness: 2px;
}

.eb-container .bible-user-format.strike-through {
  text-decoration-line: line-through !important;
}

/************* Bible highlight colors *************/
.eb-container .bible-user-format.highlight-yellow {
  background-color: #fff59d !important;
}

.eb-container .bible-user-format.highlight-green {
  background-color: #c8f7c5 !important;
}

.eb-container .bible-user-format.highlight-blue {
  background-color: #cce5ff !important;
}

.eb-container .bible-user-format.highlight-pink {
  background-color: #ffd6e7 !important;
}

.eb-container .bible-user-format.highlight-orange {
  background-color: #ffd59e !important;
}

/************* Bible font colors *************/
.eb-container .bible-user-format.text-black {
  color: #000000 !important;
}

.eb-container .bible-user-format.text-red {
  color: #c40000 !important;
}

.eb-container .bible-user-format.text-blue {
  color: #0066cc !important;
}

.eb-container .bible-user-format.text-green {
  color: #2f7d32 !important;
}

.eb-container .bible-user-format.text-purple {
  color: #6c2eb1 !important;
}

/************* Font color dropdown buttons *************/
.toolbar-dropdown-menu .font-color-option {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  margin: 0;
  border: 1px solid #999;
  border-radius: 4px;
  background: #fff;
  font-weight: bold;
  cursor: pointer;
}

.toolbar-dropdown-menu .font-color-option:hover {
  outline: 2px solid #555;
}

.font-color-option.text-black {
  color: #000000 !important;
}

.font-color-option.text-red {
  color: #c40000 !important;
}

.font-color-option.text-blue {
  color: #0066cc !important;
}

.font-color-option.text-green {
  color: #2f7d32 !important;
}

.font-color-option.text-purple {
  color: #6c2eb1 !important;
}

/************* Drawing layer *************/
#bible-annotation-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.drawn-annotation {
  fill: transparent;
  stroke-width: 2;
  pointer-events: auto;
  cursor: pointer;
}

.drawn-annotation.circle {
  stroke: #c40000;
}

.drawn-annotation.square {
  stroke: #0066cc;
}

.drawn-annotation.selected-annotation {
  stroke-width: 4;
}

/************* Freehand drawing *************/
.freehand-group {
  fill: none;
  stroke: #c40000;
  stroke-width: 2;
  pointer-events: auto;
  cursor: pointer;
}

.freehand-group path,
.freehand {
  fill: none;
  stroke: #c40000;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: stroke;
}

.freehand-group.selected-annotation path {
  stroke-width: 4;
}

/************* Toolbar dropdowns *************/
.toolbar-dropdown {
  position: relative;
  display: inline-block;
}

.toolbar-dropdown-menu {
  display: none;
  position: absolute;
  top: 32px;
  left: 0;
  z-index: 3000;
  background: #fff;
  border: 1px solid #ddd;
  padding: 8px;
  min-width: auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.toolbar-dropdown-menu.show {
  display: flex;
  gap: 6px;
}

.toolbar-dropdown-menu .color-option {
  width: 26px;
  height: 26px;
  min-width: 26px;
  padding: 0;
  margin: 0;
  border: 1px solid #999;
  border-radius: 4px;
  cursor: pointer;
}

.toolbar-dropdown-menu .color-option:hover {
  outline: 2px solid #555;
}

.color-option.yellow {
  background: #fff59d !important;
}

.color-option.green {
  background: #c8f7c5 !important;
}

.color-option.blue {
  background: #cce5ff !important;
}

.color-option.pink {
  background: #ffd6e7 !important;
}

.color-option.orange {
  background: #ffd59e !important;
}

.toolbar-separator {
  display: inline-block;
  width: 2px;
  height: 18px;
  background: #777;
  margin: 0 4px;
  user-select: none;
}

.text-tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
}

/************* Locked editor state *************/
.editor-tools-locked {
  opacity: 0.45;
}

.editor-tools-locked button,
.editor-tools-locked select {
  cursor: not-allowed !important;
}

.editor-tools-locked .ql-picker,
.editor-tools-locked .ql-picker-label,
.editor-tools-locked .ql-picker-options {
  pointer-events: none !important;
  cursor: not-allowed !important;
}

body.editor-locked-state .bible-user-format {
  background-color: transparent !important;
  text-decoration: none !important;
  font-weight: inherit !important;
}

body.editor-locked-state .drawn-annotation,
body.editor-locked-state .freehand-group,
body.editor-locked-state .freehand {
  display: none !important;
}

/************* Logged-out Quill state *************/
body.editor-locked-state .ql-editor {
  background: rgba(255, 255, 255, 0.65);
  color: #777;
  cursor: not-allowed;
}

body.editor-locked-state .ql-editor.ql-blank::before {
  color: #555;
  font-style: italic;
  opacity: 0.9;
}

body.editor-locked-state .ql-toolbar {
  opacity: 0.35;
}

/************* Editor save status in navbar *************/
.editor-save-status {
  display: inline-block;
  margin-left: 10px;
  font-size: 15px;
  color: #667;
  font-style: italic;
  font-weight: normal;
  vertical-align: middle;
  line-height: 1;
}

.editor-save-status-saving {
  color: #667;
}

.editor-save-status-saved {
  color: #2f7d32;
}

.editor-save-status-failed {
  color: #b00020;
}

/************* My Notes modal *************/
/******************************************/

.my-notes-content {
  position: relative;
  background: #fff;
  width: min(900px, 92vw);
  max-height: 80vh;
  overflow: auto;
  padding: 20px;
  border: 1px solid #888;
  border-radius: 6px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

.my-notes-content h2 {
  margin: 0 0 14px 0;
  font-size: 24px;
}

.my-notes-search {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid #aaa;
  border-radius: 4px;
  box-sizing: border-box;
}

.my-notes-status {
  margin-bottom: 10px;
  font-style: italic;
  color: #666;
}

.my-notes-table-wrapper {
  overflow-x: auto;
}

.my-notes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.my-notes-table th,
.my-notes-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.my-notes-table th {
  background: #f5f5f5;
}

.my-notes-table a {
  color: #0066cc;
  text-decoration: underline;
}

.overlay-content a.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/************* Auth buttons in header of My Notes *************/
.subheader #login,
.subheader #logout {
  font-size: 13px;
  padding: 3px 8px;
  margin-left: 4px;
  border: 1px solid #aaa;
  border-radius: 4px;
  background: #f7f7f7;
  color: #111;
  line-height: 1.2;
}

.subheader #login:disabled {
  color: #667;
  background: #eee;
}

/* Icons in the My Notes page */
.open-note {
    text-decoration: none;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 42px;
    filter: grayscale(100%); /* greyed out */
    opacity: 0.6;            /* Adds a slight faded look */
    transition: all 0.2s ease-in-out;
}

.open-note:hover {
    filter: grayscale(0%); /* Returns the door to its natural colors */
    opacity: 1;
    transform: scale(1.1);
}

.delete-note {
    text-decoration: none !important; 
    font-size: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 42px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.2s ease-in-out;
}

.delete-note:hover {
    filter: grayscale(0%) sepia(100%) hue-rotate(-50deg) saturate(600%); /* Forces it to bright red */
    opacity: 1;
    color: #ff4d4d; /* Fallback for standard characters */
    transform: scale(1.1);
}

/* USED FOR TIMER FOR INACTIVITY NOTIFICATION - 25 MINUTES  */
#timeout-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85); 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000; 
    backdrop-filter: blur(4px); 
}

/* The warning box styling */
.timeout-box {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    border-top: 5px solid #ff4d4d; /* Matches your red trash can hover */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    font-family: sans-serif;
}

.timeout-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    margin-top: 20px;
}
