/* Box Office Jedi — Showdown shared styles
 * -----------------------------------------
 * Used by every showdown-*.html page. The page itself is a thin shell;
 * showdown.js builds the tables and these classes paint them.
 */

/* Page header — flex row with breadcrumb on the left and the
 * Print | Adjust-for-inflation toolbar on the right. Same pattern as
 * .at-page-header on the all-time / yearly chart pages. */
.sd-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 4px;
  gap: 16px;
}
.sd-page-header .sd-crumb a,
.sd-page-header .sd-crumb span {
  font-family: Verdana, Geneva, sans-serif;
  font-weight: bold; font-size: 14px;
  color: #00239C; text-decoration: none;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.sd-page-header .sd-crumb a:hover { text-decoration: underline; }

/* Right-side tools: Print + Adjust this page for inflation */
.sd-page-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 12px;
  font-weight: bold;
}
.sd-page-tools a {
  color: #00239C;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sd-page-tools a:hover { text-decoration: underline; }
.sd-page-tools .sd-pt-sep { color: #AAA; font-weight: normal; }
.sd-page-tools img { vertical-align: middle; }

/* Banner shown when inflation adjustment is active */
.sd-infl-banner {
  display: none;
  font-family: 'Times New Roman', Times, serif;
  font-size: 13px;
  color: #555;
  font-style: italic;
  text-align: center;
  background: #F4F4FE;
  border-top: 1px solid #C8CCE0;
  border-bottom: 1px solid #C8CCE0;
  padding: 6px 14px;
  margin: 0 14px 8px;
}
.sd-infl-banner.is-active { display: block; }

.sd-section-bar { height: 5px; background: #75140C; margin-bottom: 12px; }

/* Showdown title — dark red, matches the rest of the showdown theme */
.sd-title {
  font-family: Verdana, Geneva, sans-serif;
  font-weight: bold; font-size: 32px;
  color: #75140C;
  text-align: center;
  margin: 18px 0 14px;
  letter-spacing: -0.5px;
  text-decoration: underline;
  line-height: 1.05;
}

/* Tab strip with "Compare:" label on the left */
.sd-tabstrip {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 0 16px;
  margin: 4px 0 0;
  border-bottom: 2px solid #888888;     /* dark gray, matches table border */
}
.sd-compare-label {
  font-family: 'Times New Roman', Times, serif;
  font-style: normal;
  font-weight: normal;
  font-size: 16px;
  color: #000;
  padding: 6px 4px 8px;
  white-space: nowrap;
}
.sd-tabs {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  flex: 1;
  margin-bottom: -2px;          /* pushes active tab over the strip border */
}
.sd-tab {
  font-family: Verdana, Geneva, sans-serif;
  font-weight: bold; font-size: 13px;
  padding: 6px 18px;
  background: #DCDCDC;
  color: #00239C;
  border: 1px solid #000000;
  border-bottom: none;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
}
.sd-tab:hover { background: #C8C8C8; color: #000; }
.sd-tab.active {
  background: #FFFFFF; color: #000;
  border-bottom: 2px solid #FFFFFF;
}

/* Per-tab legend strip. Sits below the tab row, above the chart. Used
 * to explain the dense compound cells on the Weekend Box Office tab.
 * Hidden by default — showdown.js toggles display based on active tab. */
.sd-tab-legend {
  font-family: Verdana, Geneva, sans-serif;
  font-weight: normal;
  font-size: 12px;
  color: #000;
  padding: 8px 16px 0;
  text-align: center;
}

.sd-panel { display: none; }
.sd-panel.active { display: block; }

.sd-wrap {
  padding: 18px 16px 20px;
  overflow-x: auto;
  text-align: center;       /* centers the auto-width table */
}

/* Table — auto-fit columns; uniform 1px dark gray inter-cell lines and
 * outer border, no red anywhere on the grid. */
.sd-table {
  width: auto;
  margin: 0 auto;
  border-collapse: collapse;
  border: 1px solid #888888;
  box-shadow: 3px 3px 0 #888888;
}
.sd-table td,
.sd-table th {
  border: 1px solid #888888;     /* same weight + color as outer border */
}

/* Per-column color stripes — six slots, one per film. Order chosen so any
 * adjacent pair is visually distinct. Never repeats within a single
 * showdown (the 6th slot only kicks in for 6-film showdowns).
 *   .sd-col-1  light blue
 *   .sd-col-2  light green
 *   .sd-col-3  light pink
 *   .sd-col-4  light yellow
 *   .sd-col-5  light purple
 *   .sd-col-6  light gray
 */
.sd-col-1 { background: #F5FAFF; }
.sd-col-2 { background: #EEFDEA; }
.sd-col-3 { background: #FDF2F2; }
.sd-col-4 { background: #FEFAEC; }
.sd-col-5 { background: #F2F2FE; }
.sd-col-6 { background: #F5F5F5; }

/* Header row: poster + linked title (no year line under the title) */
.sd-head-cell {
  text-align: center; padding: 10px 8px 8px;
  vertical-align: bottom;
}
.sd-poster {
  width: 90px; height: 132px; object-fit: cover;
  display: block; margin: 0 auto 6px; border: 1px solid #888;
}
.sd-poster-placeholder {
  width: 90px; height: 132px;
  background: #DDD;
  display: flex; align-items: center; justify-content: center;
  font-family: Verdana, sans-serif; font-size: 10px; color: #666;
  margin: 0 auto 6px; border: 1px solid #888;
}
.sd-movie-title-link {
  font-family: Verdana, Geneva, sans-serif;
  font-weight: bold; font-size: 12px;
  color: #00239C; text-decoration: none;
  display: block; line-height: 1.3; max-width: 140px;
  margin: 0 auto;
}
.sd-movie-title-link:hover { text-decoration: underline; }

/* Left-side label cells (Genre, Studio, etc.) */
.sd-label {
  font-family: Verdana, Geneva, sans-serif;
  font-weight: bold; font-size: 13px;
  color: #000;
  padding: 6px 14px;
  background: #F0F0F0;
  vertical-align: middle;
  white-space: nowrap;
}
/* Weekend-number cell on the Weekend tab — Verdana REGULAR, not bold */
.sd-wknd-label {
  font-family: Verdana, Geneva, sans-serif;
  font-weight: normal; font-size: 16px; color: #000;
  padding: 6px 8px;
  background: #F0F0F0; text-align: center;
  vertical-align: middle;
}
.sd-corner,
.sd-corner-wknd { background: #F0F0F0; }

/* Body cells (Summary tab) */
.sd-movie {
  font-family: 'Times New Roman', Times, serif;
  font-size: 16px; color: #000;
  padding: 6px 12px;
  text-align: center; vertical-align: middle;
  white-space: nowrap;
}
.sd-movie.best { font-weight: bold; }

/* Body cells (Weekend tab) — multi-line stack */
.sd-wknd-cell {
  font-family: 'Times New Roman', Times, serif;
  font-size: 15px; color: #000;
  padding: 6px 10px;
  text-align: center; vertical-align: top; line-height: 1.5;
}
.sd-wknd-cell .wg  { font-size: 16px; display: block; }
.sd-wknd-cell .wg.best { font-weight: bold; }
.sd-wknd-cell .wm  { font-size: 12px; color: #00239C; display: block; }
.sd-wknd-cell .wth { font-size: 12px; color: #555; display: block; }
/* Weekend-over-weekend pct change. Default is a soft red (legacy
 * behavior). Up/down modifiers replace that default so the sign carries
 * the meaning visually: positive change = blue, negative = red. */
.sd-wknd-cell .wch        { font-size: 12px; color: #555; display: block; }
.sd-wknd-cell .wch.wch-up   { color: #002AF5; }
.sd-wknd-cell .wch.wch-down { color: #F23620; }
.sd-wknd-cell .wgt { font-size: 12px; color: #000; display: block; }
.sd-wknd-cell .wpend {
  color: #999; font-size: 16px;
}

/* Footer rows on the Weekend tab (Total, Budget, Theaters, Release Date,
 * Yearly Rank). The "Total" row gets a heavier top border to separate it
 * from the weekend grid. Same dark gray, just thicker. */
.sd-table tr.sd-footer-row:first-of-type td {
  border-top: 2px solid #888888;
}

/* "Loading…" placeholder shown while data fetches */
.sd-empty {
  font-family: 'Times New Roman', Times, serif;
  font-style: italic; color: #777;
  padding: 28px; text-align: center;
}
