#photos img {
  cursor: pointer;
}

#image-dialog {
  /* Force exact viewport centering */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0; /* Reset default dialog margins to prevent conflicts with transform */
  
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  max-width: 90vw;
  max-height: 90vh;
}

/* Ensure the dialog behaves properly as a flex column when open */
#image-dialog[open] {
  display: flex;
  flex-direction: column;
}

#image-dialog::backdrop {
  background: #00326d88;
}

.dialog-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #00326d;
  padding: 1rem;
  border-radius: 8px 8px 0 0;
}

#dialog-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
}

#image-dialog button {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  transition: background 0.2s ease;
}

#image-dialog button:hover {
  background: rgba(255, 255, 255, 0.3);
}

#close-dialog {
  top: 10px;
  right: 10px;
  font-size: 1.5rem;
  padding: 0.25rem 0.75rem;
}

#prev-img {
  left: 10px;
}

#next-img {
  right: 10px;
}

#image-dialog footer {
  background: #00326d;
  color: #eee;
  padding: 1rem;
  padding-top: 0;
  text-align: center;
  border-radius: 0 0 8px 8px;
  margin: 0;
  font-family: sans-serif;
}

#dialog-caption {
  margin: 0;
}