
/* Contributors (bottom of NIJL ID, no label) */
.pcd-field-contributors{grid-template-columns:1fr;gap:0;padding:6px 0;}
.pcd-field-contributors .pcd-label{display:none;}
.pcd-field-contributors .pcd-value{font-size:inherit;line-height:inherit;}

.pcd-layout-v3{max-width:1400px;margin:0 auto;padding:0 16px;}
/* Private Collection Display - Frontend */

/* Object page layout (v3)
   NOTE: Themes/builders sometimes override layout on generic class names.
   We target the layout wrapper and the .pcd-top container with high specificity.
*/
.pcd-object { width: 100%; }
.pcd-layout-v3 .pcd-top,
.pcd-layout-v3 .pcd-top-grid{
  display:grid !important;
  grid-template-columns:minmax(0,2fr) minmax(0,1fr) !important;
  gap:28px;
  align-items:start;
  grid-template-areas:"a b";
}
.pcd-layout-v3 .pcd-sec-a{grid-area:a;}
.pcd-layout-v3 .pcd-sec-b{grid-area:b;}

@media (max-width: 980px){
  .pcd-layout-v3 .pcd-top,
  .pcd-layout-v3 .pcd-top-grid{grid-template-columns:minmax(0,2fr) minmax(0,1fr) !important;gap:20px !important;}
}
@media (max-width: 720px){
  /* Mobile order: A (without description) -> B -> Description -> C -> D */
  .pcd-layout-v3 .pcd-top,
  .pcd-layout-v3 .pcd-top-grid{
    grid-template-columns:1fr !important;
    gap:14px !important;
    grid-template-areas:"a" "b" !important;
  }
}

.pcd-sec-a{min-width:0;text-align:left;}
.pcd-sec-b{min-width:0;text-align:left;}

.pcd-head-block{font-size:1.5rem !important;line-height:1.25;font-weight:400;}
.pcd-head-ja{font-size:inherit !important;line-height:inherit;margin:0;font-weight:700;color:#000;}
.pcd-head-en{font-size:inherit !important;line-height:inherit;margin:0;font-weight:700;color:#000;font-style:italic;}
.pcd-head-spacer{height:14px;}
.pcd-head-spacer-top{height:14px;}
.pcd-head-spacer-before-desc{height:14px;}
.pcd-head-artist{font-size:inherit !important;line-height:inherit;margin:0;font-weight:400;color:#000;font-family:inherit !important;}
.pcd-head-artistdate .pcd-artist-role{font-weight:400;}
.pcd-head-artist .pcd-artist-link{font-weight:700;text-decoration:underline;color:inherit;}
.pcd-head-artist .pcd-artist-date{font-weight:400;}
.pcd-head-date{font-size:inherit !important;line-height:inherit;margin:0;font-weight:400;color:#000;font-family:inherit !important;}

/* Ensure artist/date rows use the exact same font family + size baseline as title rows.
   Some themes apply different typography to links/spans; we normalize within the head block. */
.pcd-head-block .pcd-head-artist,
.pcd-head-block .pcd-head-date,
.pcd-head-block .pcd-head-artist *,
.pcd-head-block .pcd-head-date *{
  font-size: inherit !important;
  font-family: inherit !important;
}

 
.pcd-desc{margin-top:0;font-size:inherit;line-height:inherit;}
.pcd-desc-desktop{display:block;}
.pcd-desc-mobile{display:none;margin:18px 0 0 0;}

@media (max-width: 720px){
  .pcd-desc-desktop{display:none;}
  .pcd-desc-mobile{display:block;}
}

.pcd-field-row { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 6px 0; }
@media (max-width: 980px){ .pcd-field-row{ grid-template-columns: 1fr; } }
.pcd-field-row.pcd-no-label{ grid-template-columns: 1fr; }
.pcd-field-row.pcd-no-label .pcd-value{ grid-column: 1 / -1; }
.pcd-label { font-weight: 600; }
/* If labels are rendered as semantic headings, neutralize default heading sizing/margins so typography follows theme/body settings. */
h3.pcd-label{font-size:inherit;line-height:inherit;margin:0;padding:0;}
.pcd-value { font-weight: 400; }
.pcd-life-dates { opacity: .8; font-size: .95em; }
.pcd-person { margin-bottom: 2px; }
.pcd-role { opacity: .9; margin-right: 6px; }

.pcd-gallery-wrap { width: 100%; max-height: var(--pcd-gallery-max-height, 95vh); }
.pcd-gallery-main-img { display: block; width: 100%; height: auto; max-height: calc(var(--pcd-gallery-max-height, 95vh) - 200px); object-fit: contain; }
.pcd-gallery-main-caption { font-size: 0.85rem; margin-top: 8px; text-align: center; }

.pcd-gallery-thumbs { margin-top: 0; display: flex; gap: 10px; flex-wrap: nowrap; justify-content: flex-start; flex-direction: row; overflow-x: auto; scroll-behavior: smooth; }
.pcd-thumb-wrap { display: inline-flex; flex-direction: column; align-items: center; width: 150px; }
.pcd-gallery-thumb { display: block; width: 150px; height: 150px; object-fit: cover; cursor: pointer; border: 1px solid rgba(0,0,0,.15); }
.pcd-gallery-thumb.is-active { outline: 2px solid rgba(0,0,0,.5); outline-offset: 1px; }
.pcd-thumb-caption { font-size: 0.75rem; margin-top: 4px; text-align: center; max-width: 150px; }

/* Object pages: ensure the gallery wrapper can grow with multi-line thumbnail captions.
   The main image itself is already constrained by --pcd-gallery-max-height.
   Removing max-height here prevents captions from overflowing and visually overlapping
   the Rights & Usage link below across breakpoints.
*/
.pcd-layout-v3 .pcd-gallery-wrap{max-height:none !important;height:auto;}

.pcd-rights-usage{display:block;clear:both;position:static !important;top:auto !important;left:auto !important;right:auto !important;bottom:auto !important;float:none !important;margin-top:14px;margin-bottom:0;padding-top:6px;font-size:0.85rem;line-height:1.25;text-align:left;opacity:.85;}
.pcd-rights-usage-link{text-decoration:underline;text-underline-offset:2px;}

.pcd-sec-c{margin-top:22px;border-top:1px solid rgba(0,0,0,.12);padding-top:16px;}
.pcd-sec-d { margin-top: 22px; border-top: 1px solid rgba(0,0,0,.12); padding-top: 16px; }

.pcd-search .pcd-search-row { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-bottom: 14px; width:100%; }
.pcd-search .pcd-search-q { min-width: 240px; flex: 1 1 auto; }

/* Search page layout (two rows)
   Row 1: [search][art only][search button]
   Row 2: [classification][culture][period][sort]
*/
.pcd-search .pcd-search-row-top .pcd-art-only{flex:0 0 auto;}
.pcd-search .pcd-search-row-top .pcd-search-btn{flex:0 0 auto;}

.pcd-search .pcd-search-row-bottom select{flex:1 1 220px; min-width: 200px;}

@media (max-width: 720px){
	.pcd-search .pcd-search-row-top .pcd-search-q{min-width: 0; flex: 1 1 100%;}
	.pcd-search .pcd-search-row-top .pcd-art-only{flex: 0 0 auto;}
	.pcd-search .pcd-search-row-top .pcd-search-btn{flex: 0 0 auto;}
	.pcd-search .pcd-search-row-bottom select{flex:1 1 100%; min-width: 0;}
}

.pcd-date-filter { display:flex; align-items:center; gap:8px; }
.pcd-date-toggle { padding: 6px 10px; cursor:pointer; }
.pcd-date-panel { gap:8px; align-items:center; }

.pcd-grid-results { display:grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.pcd-card { display:block; text-decoration:none; border: none; padding: 0; }
.pcd-card-img { width: 100%; aspect-ratio: 1 / 1; background: rgba(0,0,0,.04); display:flex; align-items:center; justify-content:center; overflow:hidden; }
.pcd-card-img img { max-width: 100%; max-height: 100%; width: auto; height: auto; display:block; object-fit: contain; }
.pcd-card-title { margin-top: 10px; font-size: 1rem; font-weight: 700; color: #000; text-decoration: underline; text-underline-offset: 3px; }
.pcd-card:hover .pcd-card-title { text-decoration: none; }

.pcd-card-artist, .pcd-card-date { font-size: .9rem; color: rgba(0,0,0,.72); margin-top: 4px; }


@media (max-width: 720px){ .pcd-lightbox-panel { width: 94vw; height: 90vh; margin: 5vh auto; } }

.pcd-thumbs-nav{display:flex;align-items:center;gap:8px;margin-top:10px;}
.pcd-thumbs-btn{cursor:pointer;padding:6px 10px;border:1px solid rgba(0,0,0,.2);background:#fff;}
.pcd-thumbs-btn:disabled{display:none !important;}
.pcd-thumbs-btn.is-hidden{display:none;}
.pcd-thumbs-viewport{overflow:hidden;flex:1;}
.pcd-gallery-thumbs{flex-wrap:nowrap;overflow-x:auto;scroll-behavior:smooth;gap:10px;}
.pcd-thumb-wrap{flex:0 0 auto;}

body.admin-bar .pcd-lightbox-panel{ margin-top: calc(5vh + 32px); }
@media (max-width: 782px){ body.admin-bar .pcd-lightbox-panel{ margin-top: calc(4vh + 46px);} }

.pcd-lightbox-panel{display:flex;flex-direction:column;}
.pcd-lightbox-stage{flex:1;height:auto;}
.pcd-lightbox-toolbar{order:2;border-top: 1px solid rgba(255,255,255,.15);border-bottom:0;}

.pcd-section-d{grid-column: 1 / -1;}
.pcd-section-d .pcd-field-row{max-width:100%;}

.pcd-thumbs-btn{background:transparent;}
.pcd-thumbs-nav{width:100%;}
.pcd-thumbs-btn.is-hidden{display:none;}

@media (max-width:720px){ .pcd-section-c{width:100%;} }

/* Object layout (A/B/C/D) */
.pcd-object{width:100%;}
.pcd-sec-a{margin-bottom:16px;}
.pcd-sec-bc{display:grid;grid-template-columns:2fr 3fr;gap:24px;align-items:start;}
.pcd-sec-b{min-width:0;}
.pcd-sec-c{min-width:0;}
.pcd-sec-d{margin-top:22px;}
@media (max-width:720px){
  .pcd-sec-bc{grid-template-columns:1fr;}
  .pcd-sec-c{order:1;}
  .pcd-sec-b{order:2;}
}

/* Rights & Usage placement tuning (stable across breakpoints)
   - Keep it comfortably separated from multi-line thumbnail captions
   - Keep it close to the Section C rule on wide screens
   - Prevent it from crowding the tombstone title on small screens
*/
.pcd-layout-v3 .pcd-sec-a{margin-bottom:0 !important;}
.pcd-layout-v3 .pcd-sec-c{margin-top:14px;}
@media (max-width: 720px){
  .pcd-rights-usage{margin-top:12px;margin-bottom:18px;}
}

/* Lightbox (viewer 80% of screen, top space for bars) */
.pcd-no-scroll { overflow: hidden; }
.pcd-lightbox { position: fixed; inset: 0; z-index: 99999; display: none; }
.pcd-lightbox.is-open { display: block; }
.pcd-lightbox-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.78); }
.pcd-lightbox-panel {
  position: relative;
  width: 80vw;
  height: 80vh;
  margin: 6vh auto 0;
  background: #111;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.admin-bar .pcd-lightbox-panel { margin-top: calc(5vh + 32px); height: calc(90vh - 32px); }
@media (max-width: 782px){ body.admin-bar .pcd-lightbox-panel { margin-top: calc(5vh + 46px); height: calc(90vh - 46px); } }
@media (max-width: 720px){
  .pcd-lightbox-panel { width: 94vw; height: 82vh; margin-top: 4vh; }
}

.pcd-lightbox-stage { flex: 1; display:flex; align-items:center; justify-content:center; overflow:hidden; cursor: grab; touch-action: none; }
.pcd-lightbox-stage:active { cursor: grabbing; }
.pcd-lightbox-img { max-width:none; max-height:none; will-change: transform; transform-origin: center center; user-select:none; -webkit-user-drag:none; touch-action: none; }

.pcd-lightbox-bar{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  color:#fff;
  font-size:14px;
  border-top: 1px solid rgba(255,255,255,.15);
}
.pcd-bar-left{display:flex;align-items:center;gap:8px; flex: 0 0 auto;}
.pcd-bar-left button{cursor:pointer; padding:6px 10px;}
.pcd-bar-left .pcd-zoom-reset{
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: 0;
  border-radius: 0;
  color: inherit;
  font: inherit;
}
.pcd-bar-caption{flex: 1 1 auto; text-align:center; padding:0 8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.pcd-bar-right{flex: 0 0 auto;}
.pcd-open-original{color:#fff; text-decoration: underline;}

/* Lightbox caption on narrow screens: center above controls and allow wrapping */
@media (max-width: 560px){
  .pcd-lightbox-bar{ flex-wrap: wrap; justify-content: center; }
  .pcd-bar-caption{
    flex: 0 0 100%;
    width: 100%;
    text-align: center;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    padding: 0 8px;
  }
  .pcd-bar-left{ flex: 1 1 auto; justify-content: center; flex-wrap: wrap; }
  .pcd-lightbox-close{ margin-left: 0; }
}

/* Remove unexpected left vertical line */
.pcd-object, .pcd-sec-a, .pcd-sec-b, .pcd-sec-c, .pcd-sec-d, .pcd-sec-bc, .pcd-gallery-wrap, .pcd-thumbs-nav {
  border-left: 0 !important;
  box-shadow: none !important;
}
.pcd-object:before, .pcd-object:after { display:none !important; content:none !important; }

/* Section D should align with full container */
.pcd-sec-d { width: 100%; }
.pcd-sec-d .pcd-field-row { width: 100%; max-width: none; }

.pcd-lightbox-close{
  margin-left:12px;
  font-size:22px;
  line-height:22px;
  padding:6px 10px;
  cursor:pointer;
  background:none;
  border:0;
  color:#fff;
}

/* Lightbox caption layout on narrow screens: caption centered above controls */
@media (max-width: 560px){
  .pcd-lightbox-bar{flex-wrap:wrap; justify-content:center;}
  .pcd-bar-caption{
    flex: 0 0 100%;
    order: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    padding: 0;
    margin-bottom: 6px;
    text-align: center;
  }
  .pcd-bar-left{order: 1; flex: 1 1 auto; justify-content:center; flex-wrap:wrap;}
  .pcd-lightbox-close{order: 2; margin-left: 0;}
}

.pcd-place{white-space:nowrap}

/* Gallery viewport constraint (A section: main + thumbs <= 95% of screen height) */
.pcd-sec-a .pcd-gallery-wrap { max-height: var(--pcd-gallery-max-height, 95vh); }
.pcd-sec-a .pcd-gallery-main-img { max-height: calc(var(--pcd-gallery-max-height, 95vh) - 200px); width: 100%; object-fit: contain; }
.pcd-sec-a .pcd-gallery-thumbs { max-height: 190px; overflow-y: auto; }

/* Collection Database / Search results cards */
.pcd-grid-results{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:22px;}

/* Card wrapper (do NOT force the whole card to a square; only the image box is 1:1) */
.pcd-card{display:flex;flex-direction:column;overflow:hidden;text-decoration:none;border:0;padding:0;background:transparent;}

/* Image box: 1:1 light gray square, no cropping (contain) */
.pcd-card-img{aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.04);transition:background-color .2s ease;}
.pcd-card-img img{width:100%;height:100%;object-fit:contain;display:block;}

/* Hover: light gray box becomes transparent */
.pcd-card:hover .pcd-card-img{background:transparent;}

/* Typography */
.pcd-card-meta{flex:0 0 auto;padding:14px 12px 14px;background:transparent;}
.pcd-card-title{color:#000;font-size:1rem;line-height:1.25;margin:0 0 10px 0;text-decoration:none;font-style:italic;font-weight:700;}
.pcd-card-artist,.pcd-card-date{font-size:.92rem;line-height:1.25;margin:2px 0;color:rgba(0,0,0,.6);} 
.pcd-card-title,.pcd-card-artist,.pcd-card-date{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;}
.pcd-card-title{-webkit-line-clamp:2;}
.pcd-card-artist,.pcd-card-date{-webkit-line-clamp:1;}
/* Section B: Series line */
.pcd-sec-b .pcd-head-series { margin-top: 0.15em; }
.pcd-sec-b .pcd-head-series .pcd-term-link { text-decoration: underline; }

/* Search-page taxonomy context (heading + description box) */
.pcd-search-term-context { margin: 0 0 18px 0; }
.pcd-search-term-title{
	font-size:1.5rem;
	line-height:1.25;
	margin:0 0 6px 0;
	font-weight:700;
	color:#000;
	font-style:normal;
}
.pcd-search-term-subtitle{
	margin:0 0 10px 0;
	font-size:1.5rem;
	line-height:1.25;
	font-weight:700;
	color:#000;
	font-style:normal;
}
.pcd-search-term-context .pcd-ctx-line{margin:0 0 8px 0;}
.pcd-tax-desc{margin:12px 0 0 0;padding:0;border:0;border-radius:0;}

/* Constituents: description should be plain body text (no box) */
.pcd-ctx-desc{margin:12px 0 0 0;}

/* Citation titles: do not italicize CJK runs inside <em> */
.pcd-no-italics{font-style:normal;}

/* More artwork (bottom of object page) */
.pcd-more-artwork{margin:34px 0 0 0;}
.pcd-more-artwork-heading{margin:0 0 14px 0;font-size:1.6rem;line-height:1.2;}
.pcd-more-artwork-group{margin:0 0 22px 0;}
.pcd-more-artwork-title{margin:0 0 10px 0;font-size:1.15rem;line-height:1.2;}
.pcd-more-artwork-wrap{position:relative;display:flex;align-items:stretch;gap:10px;}
.pcd-more-artwork-carousel{overflow-x:auto;scrollbar-width:thin;flex:1 1 auto;}
.pcd-more-artwork-row{display:flex;flex-wrap:nowrap;gap:22px;}
/* Match the search results card row: 4 items visible, equal widths, centered thumbs */
.pcd-more-artwork-row .pcd-card{flex:0 0 calc((100% - (22px * 3)) / 4);max-width:calc((100% - (22px * 3)) / 4);}
.pcd-more-artwork-arrow{flex:0 0 auto;align-self:center;border:1px solid rgba(0,0,0,0.2);background:#fff;border-radius:999px;width:34px;height:34px;line-height:30px;font-size:22px;cursor:pointer;}
.pcd-more-artwork-arrow:focus{outline:2px solid rgba(0,0,0,0.35);outline-offset:2px;}

@media (max-width: 900px){
	.pcd-more-artwork-row{gap:18px;}
	.pcd-more-artwork-row .pcd-card{flex-basis:calc((100% - (18px * 1)) / 2);max-width:calc((100% - (18px * 1)) / 2);}
}

@media (max-width: 520px){
	.pcd-more-artwork-row .pcd-card{flex-basis:100%;max-width:100%;}
}
