/* Dialog Styles */
dialog {
  border: none;
  border-radius: 8px;
  padding: 0;
  max-width: 90vw;
  max-height: 90vh;
  background: transparent;
  overflow: hidden;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

.dialog-container {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  width: fit-content;
  max-width: 100%;
  max-height: 90vh;
}

.dialog-content {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #000;
  min-height: 200px;
}

.dialog-image {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.dialog-caption {
  padding: 15px;
  color: #333;
  overflow-y: auto;
  max-height: 20vh;
  background: #fff;
  font-family: 'Georgia', serif;
}

.dialog-caption h4 {
  margin-top: 10px;
  font-size: 0.9em;
  color: #666;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.dialog-close:hover, .dialog-close:focus {
  background: rgba(0, 0, 0, 0.8);
}

.dialog-prev, .dialog-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3);
  color: white;
  border: none;
  font-size: 24px;
  padding: 15px 10px;
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s;
}

.dialog-prev:hover, .dialog-prev:focus,
.dialog-next:hover, .dialog-next:focus {
  background: rgba(0, 0, 0, 0.6);
}

.dialog-prev {
  left: 0;
}

.dialog-next {
  right: 0;
}
