/* Through the Bible in a Year - embedded plan view & verse modal */
#bible-plan-view { margin: 0; box-sizing: border-box; }
#bible-plan-view * { box-sizing: border-box; }

.header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  position: relative;
  background-color: #fff;
}

.back-button {
  position: absolute;
  left: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #000;
  padding: 4px 8px;
}

.header-title {
  font-size: 18px;
  font-weight: 400;
  color: #000;
}

.banner-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  margin-bottom: 20px;
}

.container {
  padding: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.day-section-label {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 16px;
  color: #000;
  margin-bottom: 8px;
  margin-top: 20px;
  font-weight: 500;
  font-style: italic;
}

.days-container {
  position: relative;
  margin-bottom: 24px;
}

.days-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 18px;
  color: #000;
}

.days-nav.left {
  left: -15px;
}

.days-nav.right {
  right: -15px;
}

.days-nav:hover {
  background: #f5f5f5;
}

.days-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.days-row::-webkit-scrollbar {
  display: none;
}

.day-box {
  min-width: 50px;
  height: 60px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.day-box:hover {
  border-color: #999;
}

.day-box.active {
  background-color: transparent;
  border-color: #999;
  border-width: 2px;
}

.day-box.completed {
  background-color: transparent;
}

.day-number {
  font-size: 13px;
  font-weight: 400;
  color: #000;
  margin-bottom: 4px;
}

.day-checkbox {
  width: 16px;
  height: 16px;
  border: 1px solid #ddd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
}

.day-checkbox.checked {
  background-color: #fff;
  border-color: #000;
  border-width: 1px;
}

.day-checkbox.checked::after {
  content: '✓';
  color: #000;
  font-size: 11px;
  font-weight: 400;
}

.current-day-label {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 32px;
  color: #000;
  margin-bottom: 20px;
  margin-top: 24px;
  font-weight: 400;
  font-style: italic;
}

.reading-section {
  margin-bottom: 20px;
}

.reading-item {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.reading-checkbox {
  width: 18px;
  height: 18px;
  border: 1px solid #ddd;
  border-radius: 50%;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  background-color: #fff;
  transition: all 0.2s;
}

.reading-checkbox:hover {
  border-color: #999;
}

.reading-checkbox.checked {
  background-color: #fff;
  border-color: #000;
  border-width: 1px;
}

.reading-checkbox.checked::after {
  content: '✓';
  color: #000;
  font-size: 12px;
  font-weight: 400;
}

.reading-text {
  font-size: 16px;
  color: #5A9FD4;
  font-weight: 400;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.reading-text a {
  color: #5A9FD4;
  text-decoration: none;
  cursor: pointer;
}

.reading-text a:hover {
  text-decoration: underline;
}

.verse-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #fff;
  z-index: 1000;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.verse-modal::-webkit-scrollbar {
  display: none;
}

.verse-modal.active {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  flex-direction: column;
}

.verse-modal-content {
  background-color: #fff;
  border: none;
  border-radius: 0;
  padding: 24px;
  max-width: none;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  scrollbar-width: none;
  -ms-overflow-style: none;
  box-sizing: border-box;
}

.verse-modal-content::-webkit-scrollbar {
  display: none;
}

.verse-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 0;
  border-bottom: none;
  position: relative;
}

.verse-modal-title {
  font-size: 14px;
  font-weight: 400;
  color: #000;
  margin: 0;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.verse-book-name {
  font-size: 32px;
  font-weight: 400;
  font-style: italic;
  color: #000;
  text-align: center;
  margin: 10px 0 20px 0;
  font-family: 'Georgia', 'Times New Roman', serif;
}

.verse-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Ensure touch target is large enough on mobile */
  touch-action: manipulation;
}

.verse-modal-close:hover {
  color: #000;
}

/* Make close button even larger on mobile devices */
@media (max-width: 768px) {
  .verse-modal-close {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    font-size: 28px;
  }
}

.verse-modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.verse-modal-settings-wrap {
  position: relative;
}

.verse-modal-settings-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
  padding: 4px 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.verse-modal-settings-btn img {
  width: 22px;
  height: 22px;
  display: block;
}

.verse-modal-settings-btn:hover { color: #000; }

.verse-modal .settings-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  padding: 14px;
  z-index: 200;
  min-width: 200px;
}

.verse-modal .settings-dropdown.open { display: block; }

.verse-modal .settings-dropdown .verse-controls {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 0;
  padding: 0;
  border-bottom: none;
  min-height: 0;
}

.verse-modal .settings-dropdown .verse-controls-sep { display: none; }

.verse-modal .settings-dropdown .verse-controls-btn {
  justify-content: center;
  min-height: 40px;
}

.verse-theme-dark .verse-modal-settings-btn { color: #aaa; }
.verse-theme-dark .verse-modal-settings-btn:hover { color: #fff; }

.verse-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 0 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid #eee;
  flex-wrap: wrap;
}

.verse-controls-btn {
  padding: 6px 12px;
  font-size: 13px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  color: #000;
  font-family: inherit;
}

.verse-controls-btn:hover {
  background: #f5f5f5;
  border-color: #999;
}

.verse-controls-sep {
  color: #999;
  margin: 0 2px;
  pointer-events: none;
  font-size: 12px;
}

.verse-theme-dark .verse-controls-sep { color: #555; }

.verse-controls-btn.active {
  background: #333;
  color: #fff;
  border-color: #333;
}

.verse-controls-btn.active:hover {
  background: #555;
  border-color: #555;
  color: #fff;
}

/* Font size: sm=17, md=20, lg=24, xl=28 — all verse numbers same size */
.verse-modal-content.verse-size-sm .verse-text { font-size: 17px; }
.verse-modal-content.verse-size-sm .verse-text .verse-number { font-size: 12px; }

.verse-modal-content.verse-size-md .verse-text { font-size: 20px; }
.verse-modal-content.verse-size-md .verse-text .verse-number { font-size: 14px; }

.verse-modal-content.verse-size-lg .verse-text { font-size: 24px; }
.verse-modal-content.verse-size-lg .verse-text .verse-number { font-size: 17px; }

.verse-modal-content.verse-size-xl .verse-text { font-size: 28px; }
.verse-modal-content.verse-size-xl .verse-text .verse-number { font-size: 19px; }

/* Dark theme (default): gradient background */
.verse-modal-content.verse-theme-dark {
  background: linear-gradient(to bottom, #0a0e1a 0%, #1a1f2e 100%);
  color: #e8e8e8;
}

.verse-theme-dark .verse-modal-title,
.verse-theme-dark .verse-book-name,
.verse-theme-dark .verse-text { color: #e8e8e8; }
.verse-theme-dark .verse-text .verse-number { color: #e55; }

.verse-theme-dark .verse-modal-close { color: #aaa; }
.verse-theme-dark .verse-modal-close:hover { color: #fff; }

.verse-theme-dark .verse-loading,
.verse-theme-dark .verse-error { color: #aaa; }

.verse-theme-dark .verse-controls { border-bottom-color: #333; }
.verse-theme-dark .verse-controls-btn {
  border-color: #555;
  background: #2a2a2a;
  color: #e8e8e8;
}
.verse-theme-dark .verse-controls-btn:hover {
  background: #3a3a3a;
  border-color: #666;
}
.verse-theme-dark .verse-controls-btn.active {
  background: #4a4a4a;
  color: #fff;
  border-color: #666;
}

.verse-theme-dark .verse-nav-button { color: #e8e8e8; }
.verse-theme-dark .verse-complete-button { color: #e8e8e8; }

.verse-text {
  color: #000;
  line-height: 1.8;
  font-size: 20px;
  font-weight: 300;
  white-space: normal;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: normal;
  max-width: 100%;
  box-sizing: border-box;
}

.verse-text .verse {
  display: inline;
  line-height: 1.8;
}

.verse-text .verse-number {
  font-size: 14px;
  font-weight: 300;
  vertical-align: super;
  margin-right: 2px;
  color: #c00;
  line-height: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Skeleton loader: grayed-out title + paragraph blocks, pulse while loading */
.verse-skeleton {
  padding: 4px 0;
}

.verse-skeleton-title {
  display: block;
  height: 20px;
  max-width: 180px;
  margin-bottom: 16px;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  animation: verse-skeleton-pulse 1.2s ease-in-out infinite;
}

.verse-skeleton-line {
  display: block;
  height: 16px;
  margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  animation: verse-skeleton-pulse 1.2s ease-in-out infinite;
}

.verse-skeleton-line:nth-child(2) { max-width: 98%; }
.verse-skeleton-line:nth-child(3) { max-width: 95%; }
.verse-skeleton-line:nth-child(4) { max-width: 88%; }
.verse-skeleton-line:nth-child(5) { max-width: 72%; }
.verse-skeleton-line:nth-child(6) { max-width: 60%; }

@keyframes verse-skeleton-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.85; }
}

.verse-theme-dark .verse-skeleton-title,
.verse-theme-dark .verse-skeleton-line {
  background: rgba(255, 255, 255, 0.15);
}

/* Smooth fade-in when real content replaces skeleton */
.verse-text.verse-loaded {
  animation: verse-content-fade-in 0.35s ease-out forwards;
}

@keyframes verse-content-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.verse-loading {
  text-align: center;
  color: #666;
  padding: 20px;
}

.verse-error {
  color: #d32f2f;
  padding: 20px;
  text-align: center;
}

.verse-modal-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: none;
}

.verse-modal-image {
  width: 50%;
  max-width: 50%;
  height: auto;
  display: block;
  margin: 0 auto;
  margin-bottom: 10px;
  object-fit: contain;
}

.verse-nav-button {
  background-color: transparent;
  color: #000;
  border: none;
  border-radius: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  transition: all 0.2s;
  box-shadow: none;
}

.verse-nav-button:hover {
  background-color: transparent;
  opacity: 0.7;
}

.verse-nav-button:active {
  transform: scale(0.95);
}

.verse-complete-button {
  background: none;
  color: #000;
  border: none;
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 28px;
  transition: opacity 0.2s, transform 0.2s;
}

.verse-complete-button:hover {
  opacity: 0.7;
  transform: scale(1.1);
}

.verse-complete-button:active {
  transform: scale(0.95);
}

@media (max-width: 768px) {
  .header {
    padding: 16px 32px;
  }

  .container {
    max-width: none;
    padding: 20px 0;
  }

  .verse-modal {
    padding: 0;
  }

  .verse-modal.active {
    align-items: stretch;
  }

  .verse-modal-header {
    justify-content: flex-end;
  }

  .verse-modal-header-actions {
    margin-left: auto;
  }

  .verse-modal-content {
    padding: 16px;
    height: 100%;
    max-height: none;
  }

  .verse-controls {
    display: flex;
    min-height: 44px;
    padding: 12px 0 14px;
  }

  .verse-controls-btn {
    padding: 10px 14px;
    font-size: 15px;
    min-height: 44px;
  }

  .verse-text {
    font-size: 18px;
  }

  .banner-image {
    width: 100%;
    max-width: none;
    height: 220px;
    object-fit: cover;
    margin-bottom: 36px;
  }

  .day-section-label {
    margin-top: 28px;
    margin-bottom: 12px;
    padding-left: 40px;
    padding-right: 40px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 22px;
    font-style: italic;
    font-weight: 500;
    color: #000;
    text-align: left;
  }

  .days-container {
    margin-bottom: 48px;
    padding-left: 40px;
    padding-right: 40px;
  }

  .current-day-label {
    margin-top: 40px;
    margin-bottom: 40px;
    padding-left: 40px;
    padding-right: 40px;
    font-weight: 400;
    text-align: left;
  }

  .reading-section {
    text-align: left;
    padding-left: 40px;
    padding-right: 40px;
  }

  .reading-item {
    justify-content: flex-start;
    margin-bottom: 40px;
  }

  .days-row {
    gap: 0;
  }

  .days-nav {
    display: none;
  }

  .day-box {
    min-width: 64px;
    height: 74px;
    border-radius: 4px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .day-number {
    margin-bottom: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #000;
  }

  .reading-text {
    font-size: 18px;
  }

  .reading-checkbox {
    width: 22px;
    height: 22px;
    margin-right: 14px;
  }

  .reading-checkbox.checked::after {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 16px 36px;
  }

  .container {
    padding: 20px 0;
  }

  .verse-modal {
    padding: 0;
  }

  .verse-modal.active {
    align-items: stretch;
  }

  .verse-modal-header {
    justify-content: flex-end;
  }

  .verse-modal-header-actions {
    margin-left: auto;
  }

  .verse-modal-content {
    padding: 14px;
    height: 100%;
    max-height: none;
  }

  .verse-controls {
    display: flex;
    min-height: 48px;
    padding: 12px 0 14px;
  }

  .verse-controls-btn {
    padding: 10px 14px;
    font-size: 15px;
    min-height: 44px;
  }

  .verse-text {
    font-size: 16px;
  }

  .day-section-label {
    font-size: 18px;
    margin-bottom: 10px;
    padding-left: 44px;
    padding-right: 44px;
  }

  .days-container {
    padding-left: 44px;
    padding-right: 44px;
  }

  .current-day-label {
    font-size: 28px;
    padding-left: 44px;
    padding-right: 44px;
  }

  .reading-section {
    padding-left: 44px;
    padding-right: 44px;
  }

  .day-box {
    min-width: 58px;
    height: 66px;
  }

  .day-number {
    font-size: 12px;
  }

  .day-checkbox {
    width: 14px;
    height: 14px;
  }

  .day-checkbox.checked::after {
    font-size: 10px;
  }
}
    
