/* =========================================================
   exhibit-card-final-overrides.css

   Final visual restore for the Exhibit Card catalog page.
   Loaded AFTER:
   - exhibit-card-catalog.css
   - two-feature-columns.css
   - gallery-hero-controls.css

   Purpose:
   - Restore the green pill label.
   - Restore the large white rounded title box.
   - Restore the left hero image panel.
   - Restore white rounded right-column content boxes.
   - Restore white rounded ad containers.
   ========================================================= */


/* =========================================================
   TOP FEATURE AREA
   ========================================================= */

.exhibit-catalog-page .catalog-topper {
  width: 100%;
  margin: 0 0 1.35rem 0;
}

.exhibit-catalog-page .catalog-kicker {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;

  width: fit-content;
  max-width: 100%;

  padding: 0.35rem 0.7rem;
  margin: 0 0 0.75rem 0;

  border: 1px solid #b9d6c5 !important;
  border-radius: 999px !important;

  background: #fbfff9 !important;
  color: #1f6b3b !important;

  box-shadow: none;

  font-size: 0.72rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}


/* Large white rounded title box */
.exhibit-catalog-page .catalog-hero-copy,
.exhibit-catalog-page .box-10g-catalog {
  width: 100%;

  padding: 1.15rem 1.25rem;
  margin: 0 0 1.35rem 0;

  border: 1px solid #d8d1c8 !important;
  border-radius: 14px !important;

  background: #ffffff !important;
  color: #333942 !important;

  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08) !important;
}

.exhibit-catalog-page .catalog-hero-copy h1,
.exhibit-catalog-page .box-10g-catalog h1 {
  margin: 0;

  color: #333942 !important;

  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
}


/* =========================================================
   LEFT HERO IMAGE PANEL
   ========================================================= */

.exhibit-catalog-page .left-product-column {
  min-width: 0;
}

.exhibit-catalog-page .media-panel {
  position: relative;

  width: 100%;

  border: 1px solid #d8d1c8 !important;
  border-radius: 16px !important;

  background: #d8d5ca !important;

  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08) !important;

  overflow: hidden;
}

.exhibit-catalog-page .hero-frame {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;

  padding: 0.75rem 0.75rem 0.35rem 0.75rem;

  background: #d8d5ca !important;
}

.exhibit-catalog-page .hero-frame img {
  display: block;

  width: auto;
  max-width: 100%;

  height: auto;
  max-height: 66vh;

  margin: 0 auto;

  border-radius: 6px;
}

.exhibit-catalog-page .hero-caption {
  padding: 0.75rem 0.95rem 0.85rem 0.95rem;

  border-top: 1px solid #d8d1c8 !important;

  background: #ffffff !important;
}

.exhibit-catalog-page .hero-caption h2 {
  margin: 0;

  color: #333942 !important;

  font-size: 1.05rem;
  line-height: 1.2;
}

/* Keep hero caption clean: title only */
.exhibit-catalog-page .hero-caption [data-hero-caption],
.exhibit-catalog-page .hero-caption .hero-page-cue,
.exhibit-catalog-page .hero-page-cue {
  display: none !important;
}


/* =========================================================
   RIGHT FEATURE COLUMN
   ========================================================= */

.exhibit-catalog-page .right-content-column,
.exhibit-catalog-page .two-feature-right {
  min-width: 0;
  width: 100%;
}

.exhibit-catalog-page .right-content-column > [data-generated-sections],
.exhibit-catalog-page .two-feature-right > [data-generated-sections] {
  display: flex;
  flex-direction: column;
  gap: 1rem;

  width: 100%;
  max-width: 100%;
  min-width: 0;
}


/* Main generated right-column boxes */
.exhibit-catalog-page .catalog-anchor-section.panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;

  margin: 0 0 1.1rem 0;
  padding: 0;

  border: 1px solid #d8d1c8 !important;
  border-radius: 16px !important;

  background: #ffffff !important;
  color: #222222 !important;

  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08) !important;

  overflow: hidden;
}

.exhibit-catalog-page .card-section-body {
  padding: 1.15rem 1.25rem;
  min-width: 0;
}

.exhibit-catalog-page .card-section-body h2 {
  margin: 0 0 0.65rem 0;

  color: #333942 !important;

  font-size: 1.4rem;
  line-height: 1.2;
}

.exhibit-catalog-page .card-section-body p {
  margin: 0.7rem 0;
  max-width: 100%;
}

/* =========================================================
   AD BOXES INSIDE RIGHT COLUMN
   Flush header style for each player section.

   This styles the optional ad box generated at the top of
   each player's section:

   <div class="ad-placeholder card-context-ad">
     ad code here
   </div>

   If a player has no ad, leave cardAdHTML blank in the JSON.
   The JavaScript should then skip creating this div.
   ========================================================= */


/* Outer player/research section */
.exhibit-catalog-page .catalog-anchor-section.panel {
  padding: 0 !important;

  border: 1px solid #d8d1c8 !important;
  border-radius: 16px !important;

  background: #ffffff !important;
  color: #222222 !important;

  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08) !important;

  overflow: hidden !important;
}


/* Flush ad header at the top of each player section */
.exhibit-catalog-page .catalog-anchor-section.panel > .ad-placeholder.card-context-ad,
.exhibit-catalog-page .catalog-anchor-section.panel > .card-context-ad {
  box-sizing: border-box !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 100% !important;
  max-width: 100% !important;
  min-height: 82px !important;

  margin: 0 !important;
  padding: 0.85rem 1rem !important;

  border-top: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom: 1px solid #ddd6ce !important;

  border-radius: 16px 16px 0 0 !important;

  background: #ffffff !important;
  text-align: center !important;

  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.12) !important;

  position: relative !important;
  z-index: 2 !important;

  overflow: hidden !important;
}


/* Player text/content area below the ad header */
.exhibit-catalog-page .catalog-anchor-section.panel > .card-section-body {
  padding: 1.15rem 1.25rem 1.25rem 1.25rem !important;
  background: #ffffff !important;
  position: relative !important;
  z-index: 1 !important;
}


/* Slightly more top padding when an ad appears above the text */
.exhibit-catalog-page .catalog-anchor-section.panel > .ad-placeholder.card-context-ad + .card-section-body,
.exhibit-catalog-page .catalog-anchor-section.panel > .card-context-ad + .card-section-body {
  padding-top: 1.35rem !important;
}


/* Keep ad content contained */
.exhibit-catalog-page .card-context-ad img,
.exhibit-catalog-page .card-context-ad iframe,
.exhibit-catalog-page .card-context-ad ins {
  max-width: 100% !important;
}

.exhibit-catalog-page .card-context-ad img {
  display: block !important;
  height: auto !important;
  margin: 0 auto !important;
}


/* Hide accidental empty ad containers */
.exhibit-catalog-page .ad-placeholder.card-context-ad:empty,
.exhibit-catalog-page .card-context-ad:empty {
  display: none !important;
}

/* =========================================================
   META CHIPS
   ========================================================= */

.exhibit-catalog-page .card-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 0.6rem;

  margin: 1rem 0;
}

.exhibit-catalog-page .meta-chip {
  padding: 0.55rem 0.7rem;

  border: 1px solid #e4d9cd !important;
  border-left: 4px solid #c6a58e !important;
  border-radius: 10px !important;

  background: #faf7f2 !important;
  color: #333333 !important;

  font-size: 0.92rem;
  line-height: 1.35;
}

.exhibit-catalog-page .meta-chip strong {
  display: block;

  margin: 0 0 0.15rem 0;

  color: #8b3f2f !important;

  font-size: 0.72rem;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}


/* =========================================================
   SEARCH PHRASE PILLS
   ========================================================= */

.exhibit-catalog-page .search-phrase-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;

  margin: 0.9rem 0;
}

.exhibit-catalog-page .search-phrase {
  display: inline-flex;
  align-items: center;

  padding: 0.25rem 0.55rem;

  border: 1px solid #eadccf !important;
  border-radius: 999px !important;

  background: #fff8f0 !important;
  color: #6f3a2d !important;

  font-size: 0.78rem;
  line-height: 1.2;
}


/* =========================================================
   BACK TO TOP / CATALOG BUTTONS
   ========================================================= */

.exhibit-catalog-page .card-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;

  margin-top: 1rem;
}

.exhibit-catalog-page .catalog-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0.45rem 0.8rem;

  border: 1px solid #c6a58e !important;
  border-radius: 999px !important;

  background: #8b3f2f !important;
  color: #ffffff !important;

  font-size: 0.82rem;
  line-height: 1.2;
  font-weight: 700;
  text-decoration: none !important;
}

.exhibit-catalog-page .catalog-button.secondary {
  background: #ffffff !important;
  color: #8b3f2f !important;
}
/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 700px) {
  .exhibit-catalog-page .catalog-hero-copy h1,
  .exhibit-catalog-page .box-10g-catalog h1 {
    font-size: 2rem;
  }

  .exhibit-catalog-page .catalog-anchor-section.panel {
    border-radius: 14px !important;
  }

  .exhibit-catalog-page .card-section-body {
    padding: 1rem;
  }

  .exhibit-catalog-page .card-meta-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   PLAYER SECTION TOP AD HEADER - FLUSH VERSION

   This block must be OUTSIDE the media query so it works on
   desktop-width pages as well as narrow screens.

   It controls the optional ad div at the top of each player's
   right-column section:

   <div class="ad-placeholder card-context-ad">
     ad code here
   </div>
   ========================================================= */


/* Outer player/research section */
body .exhibit-catalog-page .catalog-anchor-section.panel {
  padding: 0 !important;
  overflow: hidden !important;

  border: 1px solid #d8d1c8 !important;
  border-radius: 16px !important;

  background: #ffffff !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08) !important;
}


/* Flush ad header at top of player section */
body .exhibit-catalog-page .catalog-anchor-section.panel > .ad-placeholder.card-context-ad,
body .exhibit-catalog-page .catalog-anchor-section.panel > .card-context-ad {
  box-sizing: border-box !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 100% !important;
  max-width: 100% !important;
  min-height: 82px !important;

  margin: 0 !important;
  padding: 0.85rem 1rem !important;

  border-top: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom: 1px solid #ddd6ce !important;

  border-radius: 16px 16px 0 0 !important;

  background: #ffffff !important;
  text-align: center !important;

  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.12) !important;

  position: relative !important;
  z-index: 2 !important;

  overflow: hidden !important;
}


/* Player text area below the flush ad header */
body .exhibit-catalog-page .catalog-anchor-section.panel > .card-section-body {
  padding: 1.15rem 1.25rem 1.25rem 1.25rem !important;
  background: #ffffff !important;
  position: relative !important;
  z-index: 1 !important;
}


/* Extra breathing room below ad shadow */
body .exhibit-catalog-page .catalog-anchor-section.panel > .ad-placeholder.card-context-ad + .card-section-body,
body .exhibit-catalog-page .catalog-anchor-section.panel > .card-context-ad + .card-section-body {
  padding-top: 1.35rem !important;
}


/* Keep ad content contained */
body .exhibit-catalog-page .card-context-ad img,
body .exhibit-catalog-page .card-context-ad iframe,
body .exhibit-catalog-page .card-context-ad ins {
  max-width: 100% !important;
}

body .exhibit-catalog-page .card-context-ad img {
  display: block !important;
  height: auto !important;
  margin: 0 auto !important;
}


/* Hide accidental empty ad headers */
body .exhibit-catalog-page .ad-placeholder.card-context-ad:empty,
body .exhibit-catalog-page .card-context-ad:empty {
  display: none !important;
}
