/* Kindle-like reader styles */

/* Progress Bar */
.kindle-progress {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.kindle-progress-bar {
  height: 100%;
  background: #007aff;
  width: 0%;
  transition: width 0.3s ease;
}

/* Navigation Overlays - Base Styles */
.kindle-header,
.kindle-footer {
  position: fixed;
  left: 0;
  right: 0;
  height: 44px;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  padding: 0 20px;
  z-index: 1000;
}

/* Header - Always Visible */
.kindle-header {
  top: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  justify-content: space-between;
  opacity: 1;
}

/* Footer - Auto-hide */
.kindle-footer {
  bottom: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Footer Visibility */
.kindle-overlay-visible .kindle-footer {
  opacity: 1;
}

/* Content Layout */
.kindle-reader {
  padding: 35px 0;
  max-width: 800px;
  margin: 0 auto;
  font-family: "Georgia", serif;
  line-height: 1.6;
  text-align: justify;
  color: #2c2c2c;
}

@media (max-width: 840px) {
  .kindle-reader {
    padding: 35px 20px;
    margin: 0;
  }
}

.kindle-reader p {
  margin-bottom: 1.2em;
  text-indent: 1.5em;
}

.kindle-reader h1,
.kindle-reader h2,
.kindle-reader h3 {
  margin: 1.5em 0 1em;
  text-align: right;
}

/* Page Info */
.kindle-page-info {
  font-size: 0.9em;
  color: #666;
}

.kindle-chapter-title {
  font-size: 1em;
  font-weight: normal;
  color: #666;
}

/* Chapter Progress Markers */
.kindle-chapter-markers {
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 4px;
  pointer-events: none;
}

.kindle-chapter-marker {
  position: absolute;
  width: 2px;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
}

/* RTL Support */
[dir="rtl"] .kindle-reader {
  text-align: justify;
}

[dir="rtl"] .kindle-reader p {
  text-indent: 1.5em;
}

/* Touch Areas */
/* Touch areas only visible on mobile */
@media (hover: none) and (pointer: coarse) {
  .kindle-touch-area {
    position: fixed;
    top: 44px;
    bottom: 44px;
    width: 33.33%;
    z-index: 999;
  }
}

/* Hide touch areas on desktop */
@media (hover: hover) and (pointer: fine) {
  .kindle-touch-area {
    display: none;
  }
}

.kindle-touch-area.left {
  left: 0;
}

.kindle-touch-area.center {
  left: 33.33%;
  right: 33.33%;
}

.kindle-touch-area.right {
  right: 0;
}
