/* =============================================================================
   EDIT.CSS - Styles for editing interfaces and content management
   Used by: creator, edit_echo, edit_readings, edit_course, edit_prompts, info_echo
   ============================================================================= */

/* =============================================================================
   1. BUTTONS & CONTROLS
   ============================================================================= */

/* Button pre-styling (used in edit_test.html) */
.btn-pre {
  min-width: 40px;
}

/* Toolbar pre-styling (used in edit_test.html) */
.toolbar-pre {
  margin-bottom: 10px;
}

/* Navigation button list positioning */
.nav-btn-list {
  position: absolute;
  left: 30rem;
  top: -2.4rem;
}

/* Action buttons - compact, icon-only buttons for toolbars */
.do-btn {
  padding: 0;
  border: none !important;
  box-shadow: none;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  position: relative;
  z-index: 10;
}

.do-btn .bi {
  font-size: 1rem;
  line-height: 1;
}

.do-btn:focus {
  box-shadow: none;
  outline: none;
}

/* Windy tab buttons - Rough sketchy style for creative interfaces */
.btn-windy-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 18px;
  background: #e3e3db;
  border: 2.5px solid #000;
  border-radius: 15px 2px 12px 8px / 12px 4px 12px 7px;
  color: #000;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
  filter: url('#rough-paper');
}

.btn-windy-tab:nth-child(2) {
  transform: rotate(0.5deg);
  border-radius: 10px 3px 11px 2px / 2px 11px 3px 10px;
}

.btn-windy-tab:nth-child(3) {
  transform: rotate(-0.3deg);
  border-radius: 3px 10px 2px 12px / 12px 2px 10px 3px;
}

.btn-windy-tab::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 2px solid #000;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.btn-windy-tab:hover {
  transform: translateY(-3px) rotate(-1deg);
  box-shadow: 3px 5px 0 rgba(0, 0, 0, 0.3);
  background: #fff;
}

.btn-windy-tab:nth-child(2):hover {
  transform: translateY(-3px) rotate(1deg);
}

.btn-windy-tab:nth-child(3):hover {
  transform: translateY(-3px) rotate(-0.5deg);
}

.btn-windy-tab:hover::before {
  opacity: 0.3;
}

.btn-windy-tab.active {
  background: #fff;
  box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.2);
  transform: translateY(1px) rotate(-0.5deg);
}

.btn-windy-tab.active:nth-child(2) {
  transform: translateY(1px) rotate(0.5deg);
}

.btn-windy-tab.active:nth-child(3) {
  transform: translateY(1px) rotate(-0.3deg);
}

.btn-windy-tab i {
  transition: transform 0.15s ease;
}

.btn-windy-tab:hover i {
  transform: scale(1.1);
}

.btn-windy-tab::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: #000;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
  border-radius: 50%;
}

.btn-windy-tab:hover::after {
  transform: scaleX(1);
}

/* SVG filter for rough edges - used with btn-windy-tab */
svg.rough-filters {
  position: absolute;
  width: 0;
  height: 0;
}

/* =============================================================================
   2. LAYOUT & CONTAINERS
   ============================================================================= */

/* Container details - main content container */
.container-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Floating toolbar - fixed toolbar for edit pages */
.floating-toolbar {
  position: fixed;
  top: 100px;
  right: 10px;
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 2px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.floating-toolbar .btn {
  margin: 2px;
}

/* Two-column notes layout for editor interfaces */
.container-2-notes-cols {
  display: flex;
  flex-direction: row;
}

/* Border section - content box with styling */
.border-section {
  padding: 10px 10px 12px 10px;
  background-color: #ecf0f2;
  border: 1px solid #000;
  border-radius: 10px;
}

/* Carousel container for image galleries */
.carousel-container {
  display: flex;
  max-width: max-content;
  overflow: hidden;
  white-space: nowrap;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: invert(0%);
  width: 3rem;
  height: 3rem;
}

.carousel-item img {
  border-radius: 10px;
  height: auto;
  width: auto;
  max-width: 600px;
  max-height: 600px;
}

/* =============================================================================
   3. TEXT & DATA DISPLAY
   ============================================================================= */

/* Details data - inline data display blocks */
.details_data {
  margin-bottom: 0;
  padding: 0.5rem 0 0.5rem 0;
  display: inline-block;
}

/* Details title - for data labels */
.details_title {
  margin-bottom: 0;
  padding: 0;
  font-weight: 700;
}

/* Header color - for headers on dark/colored backgrounds */
.header-color {
  color: #f5faff;
}

/* =============================================================================
   4. LISTS & TABLES
   ============================================================================= */

/* Notes list - scrollable list for notes/content items */
.notes-list {
  width: 100%;
  max-width: 100%;
  overflow-y: auto;
  border-color: #0000ff;
  border-width: 1px;
  border-style: solid;
}

/* Prompts list - styled list for AI prompts */
.prompts-list {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  color: #000099;
  width: 100%;
  max-width: 100%;
  overflow-y: auto;
}

/* Prompt selection states */
.unselected-prompt {
  font-weight: 500;
}

.selected-prompt {
  font-weight: 700;
  background-color: #cccccc;
}

/* Works list - display grid for content items */
.works-list {
  display: flex;
  flex-direction: column;
  background-color: #f3f9fc;
  border-bottom: 1px solid #ccc; 
}

.works-row-outline {
  border: 1px solid #000;
  border-radius: 10px;
  background-color: #fff;
  padding: 10px;
}

.works-row {
  display: flex;
  flex-direction: row;
  gap: 2px;
}

.works-opus-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: start;
  background-color: #f3f9fc;
  border-bottom: 1px solid #ccc;  
}

.works-list-cell {
  display: flex;
}

.works-list-cell1 {
  display: flex;
}

.works-list-cell-title {
  display: flex;
}

.works-list-cell2 {
  display: flex;
  border-radius: 20px;
  padding: 3px 5px 3px 10px;
  font-size: 0.9rem;
  font-weight: 600;
  background-color: #ecf4f9;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
  
}

.small-avatar {
  max-width: 50px;
  max-height: 50px;
}

/* =============================================================================
   5. NOTES & EDITOR COMPONENTS
   ============================================================================= */

/* Notes column layout */
.notes-column {
  position: relative;
  display: flex;
  flex-direction: column;
}

.notes-title {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 2rem;
  width: 100%;
  margin-bottom: 2.8rem;
}

/* Notes toolbar - editor controls bar */
.notes-toolbar {
  position: absolute;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  z-index: 100;
  min-height: 4vh;
  top: 2rem;
  height: 4vh;
  padding: 6px;
  width: 100%;
}

.notes-toolbar-writer {
  align-items: center;
  justify-content: space-between;
  top: 0.5rem;
  min-height: 0;
  max-height: 2vh;
}

.notes-container {
  flex: 1 1 auto;
}

/* Individual note styling */
.note {
  top: 0;
  left: 0;
  width: 100%;
  display: none;
}

.note.wave {
  animation: wave 0.2s ease;
}

.note input {
  width: 300px;
}

/* Note text editor - contenteditable div for rich text */
.noteText {
  width: 100%;
  height: 100%;
  resize: none;
  background-color: #fff;
  border: 1px solid var(--title);
  border-radius: 2px;
  padding: 10px;
  outline: none;
  overflow-y: scroll;
}

.noteText:empty::before {
  content: attr(data-placeholder);
  color: #888;
  pointer-events: none;
  display: block;
}

/* Note text outer container */
.noteTextOuter {
  width: 100%;
  height: calc(100vh - 180px);
  resize: none;
  margin: 0;
  background-color: transparent;
  border: none;
  padding: 2px;
}

/* Singular prompt text input */
.singular_prompt_text {
  resize: none;
  width: 100%;
  box-shadow: 1px 1px 3px #444444;
  border-radius: 7px;
  border-style: solid;
  border-color: #D7DFDD;
  border-width: 1px;
}

/* Typography inside note text editor */
.noteText h1 { 
  font-size: 2rem;
  margin: 1rem 0 .6rem;
}

.noteText h2 { 
  font-size: 1.6rem;
  margin: 1rem 0 .6rem;
}

.noteText h3 { 
  font-size: 1.4rem;
  margin: 1rem 0 .5rem;
}

.noteText h4 { 
  font-size: 1.2rem;
  margin: 1rem 0 .4rem;
}

.noteText h5 { 
  font-size: 1.05rem;
  margin: .8rem 0 .3rem;
}

.noteText p,
.noteText li,
.noteText blockquote { 
  margin: .5rem 0;
}

.noteText blockquote { 
  border-left: 4px solid #d1d5db;
  padding-left: .75rem;
  color: #374151;
}

.noteText ul,
.noteText ol { 
  padding-left: 1.4rem;
}

.noteText hr { 
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 1rem 0;
}

.noteText img { 
  max-width: 100%;
  height: auto;
  display: block;
  margin: .5rem 0;
}

/* =============================================================================
   6. ANIMATIONS
   ============================================================================= */

@keyframes wave {
  0% {
    transform: translateY(8px) translateX(16px);
    opacity: 0.1;
  }
  20% {
    transform: translateY(6px) translateX(12px);
    opacity: 0.2;
  }
  40% {
    transform: translateY(4px) translateX(8px);
    opacity: 0.4;
  }
  60% {
    transform: translateY(2px) translateX(4px);
    opacity: 0.6;
  }
  80% {
    transform: translateY(0px) translateX(0px);
    opacity: 0.8;
  }
  100% {
    transform: translateY(-1px) translateX(-1px);
    opacity: 1;
  }
}

@keyframes pulse {
  0% { 
    opacity: 1;
  }
  50% { 
    opacity: 0.7;
  }
  100% { 
    opacity: 1;
  }
}

/* =============================================================================
   8. RESPONSIVE DESIGN - MOBILE
   ============================================================================= */

@media (max-width: 768px) {
  /* Button adjustments */
  .do-btn {
    width: 1rem;
    height: 1rem;
    padding: 0 !important;
  }

  .do-btn .bi {
    font-size: 1rem;
  }

  .nav-btn {
    height: 3rem;
    padding: 0 !important;
  }

  .nav-btn .bi {
    font-size: 3rem;
  }

  .nav-btn-list {
    left: 75%;
  }
  
  #navSelectFont {
    width: auto !important;
    height: 1rem !important;
    font-size: 1rem !important;
    margin-right: 0.4rem !important;
  }

  /* Layout adjustments */
  .container-2-notes-cols {
    width: 200vw;
  }

  .border-section {
    margin: 0;
    flex-wrap: wrap;
  }

  /* Notes column adjustments */
  .notes-column {
    width: 100%;
  }

  .notes-title {
    margin-bottom: 4.8rem;
  }

  .notes-toolbar {
    height: 8vh;
  }

  .note input {
    width: 30%;
  }

  .noteTextOuter {
    height: calc(100vh - 240px);
  }

  /* Works list mobile adjustments */
  .works-row {
    flex-wrap: wrap;
  }

  .work-opus-row {
    flex-wrap: wrap;
  }
}

/* =============================================================================
   9. RESPONSIVE DESIGN - DESKTOP
   ============================================================================= */

@media (min-width: 769px) {
  .border-section {
    margin-left: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .notes-column {
    width: 50%;
    flex-basis: 50%;
  }

  .works-list-cell1 {
    min-width: 120px;
  }

  .works-list-cell2 {
    min-width: 400px;
  }
}

/* Additional notes-column media query for consistency */
@media (max-width: 768px) {
  .notes-column {
    flex-basis: 50%;
  }
}

/* =============================================================================
   END OF EDIT.CSS
   ============================================================================= */
