/* Ketogenic Research Library icons — layout-safe patch
   Keeps embedded area icons without overriding the Library grid geometry. */

.library-folder .folder-icon.kr-area-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  max-width: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
}

.library-folder .folder-icon.kr-area-icon .kr-inline-img {
  width: 20px;
  height: 20px;
  max-width: 20px;
  max-height: 20px;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
}

/* Preserve the existing open-state treatment without changing dimensions. */
.library-folder[open] > summary .folder-icon.kr-area-icon {
  background: #f2f8fc;
  border-color: #b7d0df;
}

/* The mobile Library grid reserves 34px for the icon column, so the icon
   remains 30px wide and cannot overlap the title column. */
@media (max-width: 640px) {
  .library-folder .folder-icon.kr-area-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    max-width: 30px;
    flex-basis: 30px;
  }

  .library-folder .folder-icon.kr-area-icon .kr-inline-img {
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
  }
}
