/* opium-item.css - shared styles for the O.P.I.U.M. gallery (/gallery/) and item pages (/gallery/N/) */

/* Shrinks to the width of the header and centers it. Item pages wrap everything; the gallery wraps just the header.
   On item pages the image breakpoints below keep the card within it */
.opiumCentered {
width: fit-content;
max-width: 100%;
margin: 0 auto;
}

/* Tighter vertical spacing than the rest of the site (styles.css). Set on <body> */
.opiumPage .container, .opiumPage .wrapper {
padding: 0 5px;
}

/* Breadcrumb bar on item pages: Home > Gallery > O.P.I.U.M. #N. A quiet bar instead of the bright heading style */
/* It's wider than the card below it: up to 1410px, centered on the card, about 16px clear of the screen
   edges (100vw includes the scrollbar, hence 48px). Negative side margins, not a transform, so it never
   widens the page */
.itemTitle {
--crumbWidth: min(1410px, calc(100vw - 48px));
text-align: center;
margin-top: 21px;
margin-bottom: 0;
box-sizing: border-box;
width: var(--crumbWidth);
margin-left: calc((100% - var(--crumbWidth)) / 2);
color: #000;
font-size: 23px;
background-color: #c0b9a6;
border: 2px solid black;
text-shadow: none;
}

.itemTitleSep {
margin: 0 6px;
}

.itemTitle a:link, .itemTitle a:visited {
color: inherit;
text-decoration: underline;
}

.itemTitle a:hover {
text-decoration: none;
color: yellow;
}

.itemCard {
width: fit-content;
max-width: 100%;
box-sizing: border-box;
margin: 18px auto 20px;
background: #1c14ff;
border: solid 5px black;
box-shadow: 5px 5px 10px rgba(0,0,0,0.5);
color: #fff;
padding: 20px 23px 6px;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: flex-start;
gap: 30px;
}

.itemImage {
min-width: 0;
max-width: 100%;
}

/* Fixed 3x / 2x / 1x steps, never fluid. Breakpoints are where image + traits still fit side by side */
.itemImage img {
display: block;
width: 768px;
max-width: 100%;
height: auto;
box-sizing: border-box;
image-rendering: pixelated;
border: solid 3px black;
}

.itemInfo {
width: 400px;
max-width: 100%;
}

/* White serif title like the gallery lightbox header (.showcaseHeader), sized for the 400px column */
.itemCardTitle {
text-align: center;
font-size: 30px;
line-height: 1.2;
color: #fff;
margin-bottom: 11px;
}

.itemStats {
border: solid 2px #FF69B4;
padding: 12px 10px;
display: grid;
grid-template-columns: 150px 1fr;
column-gap: 10px;
row-gap: 6px;
font-size: 22px;
}

.itemStatLabel {
text-align: right;
font-family: 'Comic Sans MS', 'Chalkboard SE', 'Marker Felt';
color: #FF69B4;
text-shadow: 1px 1px black;
font-weight: bold;
}

.itemStatValue {
padding-top: 3px;
word-wrap: break-word;
}


.itemActions {
margin-top: 14px;
text-align: center;
}

/* Same look as the gallery lightbox close button (a.closeShowcaseButton) */
a.itemInscriptionLink:link, a.itemInscriptionLink:visited {
display: block;
text-align: center;
margin-bottom: 17px;
padding: 4px 6px;
font-size: 22px;
color: #fff;
background-color: #551a8b;
text-decoration: none;
}

a.itemInscriptionLink:hover {
color: #000;
}

/* Same look as the site menu links (.menu a) minus the hover scale */
a.itemShareLink:link, a.itemShareLink:visited {
display: inline-block;
padding: 1% 4%;
font-size: 26px;
color: #1c14ff;
background-color: aquamarine;
border-radius: 5px;
text-decoration: none;
transition: color 0.3s ease;
}

a.itemShareLink:hover {
color: #00FF00;
}

/* Lightbox only: link to the item's full page, under Share on X */
a.itemFullPageLink:link, a.itemFullPageLink:visited {
display: block;
margin-top: 22px;
font-size: 26px;
color: #fff;
text-decoration: underline;
}

a.itemFullPageLink:hover {
text-decoration: none;
}

/* Inline X logo; fill follows the link color so it goes green on hover too */
.xIcon {
width: 0.8em;
height: 0.8em;
fill: currentColor;
vertical-align: -0.05em;
}

.itemActions a, .itemTitle a, .menuToggleButton {
cursor: pointer !important;
}

/* Zoom label shows the step that matches the image size breakpoints below.
   Scoped to .itemImage so it doesn't touch the gallery lightbox's own .zoomLabel */
.itemImage .zoomLabel {
text-align: center;
color: #fff;
font-size: 20px;
text-transform: uppercase;
margin-top: 6px;
}

.itemImage .zoomLabelX {
text-transform: none;
}

.zoom2, .zoom1 {
display: none;
}

@media only screen and (max-width: 1400px) {

.itemImage img {
width: 512px;
}

.zoom3 {
display: none;
}

.zoom2 {
display: inline;
}

}

@media only screen and (max-width: 1079px) {

.itemImage img {
width: 256px;
}

.zoom2 {
display: none;
}

.zoom1 {
display: inline;
}

}

/* Hamburger for the site menu (menu is commented out in the item pages for now) */
.menuToggleInput, .menuToggleButton {
display: none;
}

@media only screen and (max-width: 992px) {

.menuToggleButton {
display: block;
width: fit-content;
margin: 10px;
font-family: 'Comic Sans MS', 'Chalkboard SE', 'Marker Felt';
font-size: 22px;
font-weight: bold;
color: #1c14ff;
background-color: aquamarine;
border: solid 3px black;
border-radius: 5px;
padding: 4px 14px;
}

.menuToggleInput:checked + .menuToggleButton {
background-color: #FFFF00;
}

.siteMenu {
display: none;
}

.menuToggleInput:checked ~ .siteMenu {
display: block;
}

}

@media only screen and (max-width: 900px) {

.itemCard {
padding: 15px 10px 20px;
gap: 20px;
}

.itemStats {
grid-template-columns: 110px 1fr;
font-size: 18px;
}

}

/* Gallery: number search (center) and Sort menu (right) on one line at the top of the yellow filter box,
   then a dashed line above the filters */
.galleryTools {
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
gap: 12px 20px;
margin: 4px 10px 0;
}

.idSearch {
grid-column: 2;
box-sizing: border-box;
height: 40px;
width: 340px;
max-width: 100%;
padding: 2px 6px;
font-family: 'Comic Sans MS', 'Chalkboard SE', 'Marker Felt';
font-size: 20px;
font-weight: bold;
color: #1c14ff;
text-align: center;
background: #fff;
border: solid 3px black;
border-radius: 6px;
}

.idSearch::placeholder {
color: #8f8bd6;
}

.sortBox {
grid-column: 3;
justify-self: end;
display: flex;
align-items: center;
gap: 8px;
}

/* Sort menu dressed like the search box: same border, font and height. Lavender text (close to the search placeholder) */
.sortSelect {
box-sizing: border-box;
height: 40px;
padding: 2px 6px;
font-family: 'Comic Sans MS', 'Chalkboard SE', 'Marker Felt';
font-size: 20px;
font-weight: bold;
color: #928bd4;
background: #fff;
border: solid 3px black;
border-radius: 6px;
cursor: pointer;
}

.sortSelect option {
color: #928bd4;
}

hr.galleryToolsLine {
border: none;
border-top: 3px dashed #FF69B4;
margin: 16px 0 12px;
}

/* Each thumbnail sits on a dark card so the grid reads clearly in front of the puppet parade */
#galleryList .thumbnail {
background: #160d0f;
border: solid 3px black;
box-shadow: 5px 5px 10px rgba(0,0,0,0.6);
padding: 6px 6px 3px;
}

/* Hover: the dark card flips to orange-red. Only the card changes, never the image */
#galleryList .thumbnail:hover, #galleryList .thumbnail:focus-within {
background: #FF4500;
border-color: #FF4500;
}

#galleryList .thumbnail img {
display: block;
}

#galleryList .thumbnail > div:last-child {
padding-top: 3px;
font-family: Arial, sans-serif;
font-size: 15px;
}

/* Narrow screens: search, then Sort, centered */
@media only screen and (max-width: 900px) {
.galleryTools { grid-template-columns: 1fr; justify-items: center; }
.idSearch, .sortBox { grid-column: auto; justify-self: center; }
}

/* "No matches": the crying puppet and message on a dark card, centered over the parade */
#galleryListWawa {
width: fit-content;
max-width: 90%;
margin: 10px auto;
text-align: center;
background: #160d0f;
border: solid 3px black;
box-shadow: 5px 5px 10px rgba(0,0,0,0.6);
padding: 12px 24px;
}

#galleryListWawa img {
display: block;
margin: 0 auto 6px;
max-width: 100%;
}
