.kjv-modal.hidden {
  display: none;
}

.kjv-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.kjv-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.kjv-modal-dialog {
  position: relative;
  margin: 6vh auto;
  width: min(900px, 92vw);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  padding: 18px 18px 16px;
}

.kjv-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 28px;
  background: transparent;
  border: 0;
  cursor: pointer;
  line-height: 1;
}

.kjv-modal-header {
  display: flex;
  gap: 14px;
  align-items: center;
}

.kjv-modal-image {
  width: 70px;
  height: 50px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
}

.kjv-modal-meta {
  margin: 4px 0;
  opacity: 0.9;
}

.kjv-modal-desc {
  margin: 14px 0 10px;
  line-height: 1.45;
}

.kjv-modal-link {
  display: inline-block;
  margin: 6px 0 14px;
  text-decoration: underline;
}

.kjv-modal-files {
  display: grid;
  gap: 12px;
  margin: 16px 0 14px;
}

.kjv-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #f4f4f0;
}

.kjv-file-row__info {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.kjv-file-row__icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #4d5b53;
  background: #dfe4df;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.kjv-file-row__icon svg {
  width: 22px;
  height: 22px;
}

.kjv-file-row__text {
  min-width: 0;
}

.kjv-file-row__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2421;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kjv-file-row__meta {
  margin-top: 4px;
  font-size: 0.94rem;
  color: rgba(0, 0, 0, 0.62);
}

.kjv-file-row__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.kjv-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  text-decoration: none;
  font-weight: 600;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.kjv-file-btn:hover {
  transform: translateY(-1px);
}

.kjv-file-btn--primary {
  color: #fff;
  background: #1f6a3b;
  border-color: #1f6a3b;
}

.kjv-file-btn--primary:hover {
  background: #18552f;
  border-color: #18552f;
}

.kjv-file-btn--ghost {
  color: #1f2421;
  background: #fff;
}

.kjv-file-btn--ghost:hover {
  background: #f4f4f4;
}

.kjv-modal-map iframe {
  width: 100%;
  height: 360px;
  border: 0;
  border-radius: 12px;
}

@media (max-width: 760px) {
  .kjv-file-row {
    flex-direction: column;
    align-items: stretch;
  }

  .kjv-file-row__actions {
    width: 100%;
    justify-content: stretch;
  }

  .kjv-file-btn {
    flex: 1 1 100%;
  }
}
