/* style.css - clean, polished gallery with labels and dark theme */

/* --- Body & Typography --- */
body { 
    font-family: Arial, sans-serif; 
    background: #111; 
    color: #eee; 
    text-align: center; 
    margin: 0; 
    padding: 20px;
}

h1 { margin-top: 1em; }

/* --- Gallery container --- */
.gallery {
    display: flex;
    flex-wrap: wrap;          /* allows multiple rows */
    gap: 15px;                /* spacing between items */
    justify-content: center;  /* center the gallery */
}

/* --- Image card container --- */
.image-container {
    position: relative;   /* ADD THIS */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 23%;
    min-width: 150px;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

/* --- Card hover effect (zoom + shadow) --- */
.image-container:hover {
    transform: scale(1.05); 
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
}

/* --- Label top left corner each image --- */
.image-label {
    position: absolute;
    top: 8px;
    left: 8px;

    background: rgba(0, 0, 0, 0.2); /* readable overlay */
    color: #FDDA0D;

    padding: 4px 8px;
    font-size: 0.85em;
    border-radius: 4px;

    pointer-events: none; /* prevents blocking clicks */
}

/* --- Anchor/link styling --- */
.image-container a {
    width: 100%;
    display: block;
    text-decoration: none; /* remove underline if any */
}

/* --- Image styling --- */
.image-container img {
    width: 100%;
    height: auto;
    border: 1px solid #aaa;
    border-radius: 6px;
    display: block;
    /* no transition here; container handles hover scaling */
}


/* ------------------------ BEGINNING OFCATEGORY BAR ------------------------ */

.category-bar {
    margin: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.category-button {
    background: #222;
    color: #FDDA0D;
    border: 1px solid #FDDA0D;

    padding: 6px 6px;
    border-radius: 6px;
    cursor: pointer;

    width: 95px;             /* tighten this */
    min-height: 48px;

    display: flex;             /* center text nicely */
    align-items: center;
    justify-content: center;

    text-align: center;
    line-height: 1.2;
    white-space: normal;       /* allow wrapping */
}

.category-button:hover {
    background: #FDDA0D;
    color: #111;
}

.category-button.active {
    background: #FDDA0D;
    color: #111;
}

.info-btn {
  position: absolute;
  bottom: 5px;
  left: 5px;
  z-index: 10;

  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 14px;
  cursor: pointer;
}

.info-box {
  position: absolute;
  bottom: 30px;
  left: 5px;
  z-index: 10;

  background: rgba(0,0,0,0.85);
  color: white;
  padding: 6px;
  font-size: 10px;
  border-radius: 4px;
  width: 150px;
  text-align: left;
}

.identifiers-list {
  padding-left: 10px;
}

.extended-info-list {
  padding-left: 10px;
}

container.style.position = "relative";


.viewer-body {
  margin: 20px;
  font-family: Arial, sans-serif;
}

.viewer-container {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* LEFT IMAGE PANEL */
.viewer-image-panel img {
  max-width: 1000px;
  height: auto;
  cursor: pointer;
  border-radius: 4px;
}

/* RIGHT INFO PANEL */
.viewer-info-panel {
  min-width: 320px;
  color: #111;            /* dark text for contrast */
  text-align: left;       /* force left alignment */

  background: #f7f7f7;
  padding: 10px;
  border-left: 1px solid #ddd;
}

/* META BOX (your buildInfoHtml output container) */
.viewer-meta-block {
  padding: 12px;
  border: 1px solid #ccc;
  margin-bottom: 12px;
  background: #fafafa;
  color: #111;
  text-align: left;
}

.viewer-meta-block div {
  margin: 4px 0;
  line-height: 1.3;
}

/* FUTURE EXTENSION AREA */
.viewer-extra-block {
  padding: 12px;
  border: 1px dashed #aaa;
  background: #fff;
}

/* OPTIONAL: improve info formatting from buildInfoHtml */
.identifiers-list div,
.extended-info-list div {
  margin-left: 8px;
  font-size: 0.9em;
}


/* ------------------------ ENDING OFCATEGORY BAR ------------------------ */


/* --- Responsive adjustments --- */
@media (max-width: 1000px) {
    .image-container { width: 31%; } /* 3 per row */
}

@media (max-width: 700px) {
    .image-container { width: 48%; } /* 2 per row */
}

@media (max-width: 600px) {
    .category-button {
        min-width: 60px;
        max-width: 100px;
        padding: 4px 4px;
        font-size: 0.8em;
    }

    .category-bar {
        gap: 4px;
    }
}
@media (max-width: 450px) {
    .image-container { width: 100%; } /* 1 per row */
}
