/* =========================================
   Galerie – Zusatzstyles (Basis in site.css)
   Fix: Select/Option Rendering in Firefox/Windows
   ========================================= */

.gallery-lead{
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.gallery-controls{
  display:flex;
  gap: 12px;
  flex-wrap:wrap;
  align-items:flex-end;
  margin: 14px 0 16px;
}

.field-inline{
  display:flex;
  flex-direction:column;
  gap: 8px;
  min-width: 220px;
}

.field-inline .label{
  font-weight: 800;
  color: rgba(245,255,252,0.90);
}

/* --- SELECTS (Fix cross-browser) --- */
.gallery-controls select{
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);

  /* Keep your translucent look */
  background-color: rgba(255,255,255,0.03);
  color: rgba(245,255,252,0.92);

  outline: none;

  /* helps some browsers keep consistent rendering */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Ensure the dropdown list (options) is readable on Windows/Firefox */
.gallery-controls select option{
  /* Windows dropdown is typically light -> force readable colors */
  background-color: #ffffff;
  color: #000000;
}

/* Focus state */
.gallery-controls select:focus{
  border-color: rgba(50,214,198,0.35);
  box-shadow: 0 0 0 3px rgba(50,214,198,0.10);
}

/* Extra: Firefox-specific hardening (keeps select readable even if OS UI overrides) */
@supports (-moz-appearance: none){
  .gallery-controls select{
    /* Firefox sometimes mixes system colors with translucent backgrounds;
       a slightly more solid background improves consistency */
    background-color: rgba(12, 24, 32, 0.85);
  }
}

.gallery-meta{
  margin-left: auto;
  color: rgba(245,255,252,0.70);
  font-size: 13px;
}

.gallery-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.gallery-item{
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.02);
  overflow:hidden;
  box-shadow: 0 14px 50px rgba(0,0,0,0.35);
  transition: transform .15s ease, border-color .2s ease;
}

.gallery-item:hover{
  transform: translateY(-2px);
  border-color: rgba(50,214,198,0.22);
}

.gallery-btn{
  display:block;
  width:100%;
  text-align:left;
  padding:0;
  border:0;
  background: transparent;
  color: inherit;
  cursor:pointer;
}

.gallery-thumb{
  width:100%;
  height: 180px;
  object-fit: cover;
  display:block;
  background: rgba(255,255,255,0.03);
}

.gallery-caption{
  padding: 10px 12px 12px;
  color: rgba(245,255,252,0.85);
  font-weight: 750;
  font-size: 13.5px;
  line-height: 1.35;
}

.gallery-caption .sub{
  display:block;
  margin-top: 4px;
  color: rgba(245,255,252,0.62);
  font-weight: 650;
  font-size: 12.5px;
}

.empty{
  margin-top: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.02);
  padding: 14px;
  color: var(--muted);
}

/* Lightbox */
.lightbox{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,0.82);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index: 3000;
  padding: 18px;
}

.lightbox[hidden]{ display:none; }

.lightbox-inner{
  width: min(1050px, 100%);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(10,28,36,0.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 22px 90px rgba(0,0,0,0.60);
  padding: 12px;
  position:relative;
}

.lb-close{
  position:absolute;
  top: 12px;
  right: 12px;
}

.lb-figure{
  margin:0;
  padding: 34px 8px 8px;
}

#lbImg{
  width:100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.25);
}

#lbCap{
  margin-top: 10px;
  color: rgba(245,255,252,0.80);
  font-size: 14px;
  line-height: 1.5;
}

.lb-actions{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  padding: 8px;
}

@media (max-width: 640px){
  .field-inline{ min-width: 100%; }
  .gallery-meta{ margin-left: 0; }
  .gallery-thumb{ height: 160px; }
}