.cover-digital-link {
  margin-top: 8px;
  font-size: 0.8em;
  display: none;
  width: 100%;
  text-align: center;
}

.cover-digital-link a {
  color: #3a78a7;
  text-decoration: none;
  padding: 3px 6px;
  background-color: #eef5fb;
  border-radius: 3px;
  transition: background-color 0.2s;
  display: inline-block;
}

.cover-digital-link a:hover {
  text-decoration: underline;
  background-color: #d9e9f7;
}

.links-visible .cover-digital-link {
  display: block;
}/* gallery.css - Styles for the cover gallery page */

/* Gallery page container */
body.gallery-page #container {
  max-width: 1280px;
  width: 1280px;
  margin: 1em auto;
}

body.gallery-page #content {
  padding: 10px 0;
}

body.gallery-page h1 {
  padding-left: 8px;
  margin-bottom: 20px;
}

/* Gallery controls */
.gallery-controls {
  margin: 0 10px 20px 10px;
  padding: 15px;
  background-color: #f7f7f7;
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.filter-controls select {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background-color: white;
  min-width: 150px;
  font-size: 0.9em;
}

.filter-controls button,
.filter-controls .button {
  padding: 8px 15px;
  background-color: #3a78a7;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s;
}

.filter-controls button:hover,
.filter-controls .button:hover {
  background-color: #2c5c82;
}

.display-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.toggle-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .3s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: #3a78a7;
}

input:checked + .toggle-slider:before {
  transform: translateX(18px);
}

.search-control {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
}

.search-control input[type="text"] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 0.9em;
}

/* Gallery stats */
.gallery-stats {
  margin: 0 10px 15px 10px;
  font-style: italic;
  color: #555;
}

/* Cover gallery layout */
.cover-gallery {
  display: grid;
  grid-template-columns: repeat(9, 128px);
  grid-auto-rows: min-content;
  gap: 10px;
  justify-content: center;
  padding: 15px;
  align-items: center;
}

.cover-item {
  position: relative;
  width: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
  padding: 0;
}

.cover-item:hover .cover-image {
  filter: brightness(0.7) contrast(1.1);
}

.cover-image {
  width: 128px;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 3px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  cursor: zoom-in;
  display: block;
  margin: auto;
}

.cover-image:hover {
  filter: brightness(0.7) contrast(1.1);
}

/* Type and content indicators */
.cover-type, .nsfw-indicator {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.9em;
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  opacity: 0.85;
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.7);
}

.cover-type {
  top: 5px;
  right: 5px;
}

.nsfw-indicator {
  top: 5px;
  left: 5px;
}

/* Hide badges when toggle is off */
.badges-hidden .cover-type,
.badges-hidden .nsfw-indicator {
  display: none;
}

/* Tooltip for full title */
.cover-item .tooltip {
  visibility: hidden;
  width: 200px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 5px;
  position: absolute;
  z-index: 100;
  bottom: 105%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.85em;
  pointer-events: none;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.cover-item .tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.cover-item:hover .tooltip {
  visibility: visible;
  opacity: 0.95;
}

/* Empty state */
.empty-gallery {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: #666;
  font-style: italic;
}

/* Responsive design */
@media only screen and (max-width: 1280px) {
  .cover-gallery {
    grid-template-columns: repeat(auto-fill, 128px);
  }
}

@media only screen and (max-width: 768px) {
  body.gallery-page #container {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
  
  .gallery-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-control {
    max-width: none;
  }
}

@media only screen and (max-width: 480px) {
  .cover-gallery {
    gap: 10px;
  }
}