.layer-popup {
  position: absolute;
  z-index: 99999;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  border: 1px solid #333;
  background: #fff;
  display: flex;
  flex-direction: column;
  max-width: 90vw;
  max-height: 90vh;
}

.layer-popup-header {
  background: #222;
  color: #fff;
  padding: 8px 15px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  cursor: move;
  flex-shrink: 0;
}

.layer-popup-header .header-close-btn {
  color: #fff;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  line-height: 1;
}

.layer-popup-content {
  display: block;
  overflow: hidden;
  flex: 1 1 auto;
}

.layer-popup-content a {
  display: block;
}

.layer-popup-content img {
  display: block;
  max-width: 100%;
  max-height: calc(90vh - 85px);
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.layer-popup-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #000;
  color: #fff;
  padding: 10px 15px;
  font-size: 13px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.layer-popup-footer a,
.layer-popup-footer label {
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  margin: 0;
  line-height: 1;
}

.layer-popup-footer .layer-popup-close a {
  font-weight: bold;
}

.layer-popup-footer .layer-popup-today input {
  vertical-align: middle;
  margin: -2px 5px 0 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .layer-popup {
    max-width: 90vw;
  }

  .layer-popup-content img {
    width: 100%;
    height: auto;
  }

  .layer-popup-footer {
    padding: 12px 10px;
    font-size: 14px;
  }
}
