/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  background-color: #000;
  overflow: auto;
  border-radius: 4px;
}

.modal-content.image {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000;
  max-height: 90vh;
}

.modal-image-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.modal-image-wrapper img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  user-select: none;
}

/* Modal UI (Close button - fixed top-right) */
.modalUI {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10001;
  display: flex;
  gap: 10px;
}

.modalUI i {
  cursor: pointer;
  font-size: 32px;
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
  transition: all 0.2s ease;
  user-select: none;
  line-height: 1;
}

.modalUI i:hover {
  color: #ccc;
  transform: scale(1.1);
}

/* Prev / Next navigation buttons */
.modal-nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: #fff;
  font-size: 48px;
  line-height: 1;
  padding: 10px 16px;
  cursor: pointer;
  z-index: 10001;
  transition: background 0.2s ease;
  user-select: none;
  border-radius: 4px;
}

.modal-nav-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.modal-prev {
  left: 16px;
}

.modal-next {
  right: 16px;
}

@media (max-width: 768px) {
  .modal-prev { left: 6px; }
  .modal-next { right: 6px; }
  .modal-nav-btn { font-size: 36px; padding: 8px 12px; }
}

/* Dialog, Alert, Confirm styles */
.modal-content.dialog,
.modal-content.alert,
.modal-content.confirm {
  background-color: #f5f5f5;
  padding: 30px;
  min-width: 300px;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  color: #333;
}

.modal-content p {
  margin: 0 0 20px 0;
  line-height: 1.6;
  font-size: 16px;
}

.modal-content button {
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.2s ease;
}

.modal-content button:hover {
  background-color: #0056b3;
}

.modal-content div {
  display: flex;
  justify-content: center;
  gap: 10px;
  /*margin-top: 20px;*/
}

/* System messages in modal */
.modal-sysmsg {
  min-height: 20px;
  margin-bottom: 10px;
  color: #d9534f;
  font-size: 14px;
}

/* Video styles */
.modal-content video {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

/* iframe styles */
.modal-content iframe {
  border: none;
  border-radius: 4px;
}
