/* --- Media auxiliary buttons --- */
.media-aux {
  text-align: center;
  margin-top: 5px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
}
.media-aux .ep-btn {
  display: inline-block;
  background: #3A0000;
  color: #C0C0C0;
  text-decoration: none;
  padding: 10px 22px;
  border: 1px solid #660000;
  border-radius: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 0 6px rgba(0,0,0,0.4);
}
.media-aux .ep-btn:hover,
.media-aux .ep-btn:focus {
  background: #990000;
  color: #FFFFFF;
  text-decoration: underline;
  box-shadow: 0 0 10px rgba(255, 200, 150, 0.35);
}
.media-aux .sep {
  display: inline-block;
  color: #C0C0C0;
  margin: 0 12px;
  font-weight: normal;
  vertical-align: middle;
}
@media (max-width:700px) {
  .media-aux {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .media-aux .sep { display: none; }
  .media-aux .ep-btn {
    width: 80%;
    text-align: center;
  }
}

/* Title image */
.ep-title {
  text-align: center;
  margin: 20px 0;
}
.ep-title img {
  display: inline-block;
  border: none;
  max-width: 100%;
  height: auto;
}

/* A11y helper */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

/* Episode info table — matches site frame */
#MainBody .comics-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #380000;
  color: var(--color-text);
  border: 1px solid #990000;
  border-radius: 8px;
  overflow: hidden;                            /* rounds the outer corners */
  table-layout: fixed;                         /* clean wrapping */
  font: 1rem/1.5 Arial, Helvetica, sans-serif; /* match Index page */
}

/* Header */
#MainBody .comics-table thead th {
  text-align: center;
  padding: 10px 12px;
  background: linear-gradient(#5a0000, #380000);
  color: #FFD9B3;
  font-weight: bold;
  border-bottom: 1px solid #660000;
}

/* Body cells */
/* Base TD styling for all article tables */
#MainBody .comics-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px;
  border-top: 1px solid #660000;
  word-wrap: break-word;
}

/* Odd-numbered tables: #3A0000 */
#MainBody .comics-table:nth-of-type(odd) > tbody > tr > td {
  background: #3A0000;
}

/* Even-numbered tables: #320000 */
#MainBody .comics-table:nth-of-type(even) > tbody > tr > td {
  background: #320000;
}

#MainBody .Synopsis p + p {
  margin-top: 14px;
}

#MainBody .Synopsis h3 {
  text-transform: uppercase;
}

.comics-table + .comics-table {
  margin-top: 2rem;
}

/* Float the article image with text wrapping around it */
#MainBody .article-image {
  float: left;
  margin: 0 1.2rem 1rem 0;
  max-width: 45%;
  height: auto;
  border-radius: 6px;
  box-shadow: 4px 4px 15px rgba(0,0,0,0.7);
}

/* Let the article be normal flow text so it wraps under the float */
#MainBody .Synopsis {
  font: 1rem/1.5 Arial, Helvetica, sans-serif;
  color: var(--color-text);
  text-align: justify;
  text-justify: inter-word;
  min-width: 0;
}

.Synopsis ul.comics-credits {
  list-style-position: inside;   /* makes the bullet sit inside the padding box */
  padding-left: 1.25rem;         /* indent text + bullet away from the edge */
  margin-left: 0;                /* margin no longer needed for spacing */
  text-align: left;
}

/* --- Episode toolbar: right-justified as a group --- */
#MainBody .comics-toolbar {
  max-width: 500px;
  display: flex;
  justify-content: center;   /* center horizontally */
  align-items: center;
  gap: 10px;
  background: #380000;
  border: 1px solid #990000;
  border-radius: 8px;
  padding: 10px;
  margin: 0 auto 16px;       /* keep equal top/bottom rhythm */
  text-align: center;
}

@media (max-width:700px) {
  #MainBody .comics-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  #MainBody .comics-toolbar .issue-button { width: 100%; }
}

/* --- Comic Books Jump To navigation buttons --- */
.comics-toolbar button.issue-button {
  background-color: #4A0000;
  color: #C0C0C0;
  border: 1px solid #660000;
  border-radius: 4px;
  padding: 6px 12px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.comics-toolbar button.issue-button:hover {
  background-color: #990000; /* ensure inside color changes */
  color: #FFFFFF;
  box-shadow: inset 0 0 6px rgba(255, 100, 100, 0.6), 0 0 8px rgba(255, 255, 255, 0.4);
}

.comics-toolbar button.issue-button:focus-visible {
  outline: 2px solid #FFD9B3;
  outline-offset: 2px;
}