.list-card-row { display: flex; align-items: center; position:relative;width: var(--percent-100); }
.list-card-row > .list-card { flex: var(--number-1); min-width: var(--number-0); }
.list-card__more {
  color: var(--black060);
  flex-shrink: var(--number-0);
  margin-right: var(--size-12);
  font-size: var(--size-26);
  position: absolute;
  right: var(--number-0);
  /* To do: Заменить на иконку Dots */
}
.list-actions-menu {
  position: fixed;
  z-index: var(--layer-150);
  width: var(--size-160);
  border-radius: var(--border-radius);
  background: var(--white100);
  box-shadow: var(--shadow-4);
  overflow: hidden;
  gap: var(--space-1);
  background-color:var(--gray100);
}
.list-actions-menu button {
  display: flex;
  align-items: center;
  gap: var(--size-8);
  width: var(--percent-100);
  min-width: var(--size-60);
  height: var(--percent-100);
  min-height: var(--size-60);
  padding: var(--size-12) var(--size-16);
  text-align: left;
  background: transparent;
  border: var(--number-0);
  color: var(--black060);
  cursor: pointer;
  border-bottom: var(--size-1) solid var(--black010);
}
.list-actions-menu button:last-child { border-bottom: var(--number-0); }
.list-actions-menu button:is(:hover, :focus-visible) { background: var(--black010); }
.list-actions-menu__icon {
  width: var(--size-24);
  height: var(--size-24);
  flex: var(--number-0) var(--number-0) var(--size-24);
  background-color: currentColor;
  mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
}
.list-actions-menu .list-actions-menu__delete { color: var(--alert100); }
.list-edit-dialog [hidden] { display: none !important; }


/*Tabs*/
.list-edit-tabs { 
  display: flex; 
  background: var(--black010);
  border-radius: var(--radius-16);
  overflow: hidden;
  padding: var(--size-4);
  max-height: var(--size-48);
}


.list-edit-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: var(--number-1);
  width: var(--percent-100);
  padding: var(--size-12);
  background: transparent;
  border-radius: var(--radius-12);
  border: var(--number-0);
  color: var(--black100);
  cursor: pointer;
  text-align: center;
}

.list-edit-tabs [aria-selected="true"] {
  background: var(--white100);

}

.list-edit-cover { width: var(--percent-100); aspect-ratio: var(--number-16) / var(--number-7); object-fit: cover; border-radius: var(--radius-8); margin-bottom: var(--size-12); }
.list-edit-colors { display: flex; flex-wrap: wrap; gap: var(--size-10); padding: var(--size-4); margin-bottom: var(--size-16); }
.list-edit-colors button { width: var(--size-28); height: var(--size-28); min-width: var(--size-28); min-height: var(--size-28); max-width: var(--size-28); max-height: var(--size-28); padding: var(--number-0); border: var(--number-0); border-radius: var(--radius-percent-50); cursor: pointer; flex: var(--number-0) var(--number-0) var(--size-28); }
.list-edit-colors [aria-pressed="true"] { outline: var(--size-2) solid var(--black100); outline-offset: var(--size-3); }


#list-image-panel{
  display: flex;
  flex-direction: column;
  gap: var(--size-12);
  width: var(--percent-100);
  min-height: 156px;
  max-height: var(--size-216);
  overflow-y: auto;
  padding: var(--size-4);
}

/* .list-edit-icons */
.list-edit-icons {
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(var(--size-44), var(--fr-1)));
  gap: var(--size-4);
  min-height: var(--size-44);
  max-height: var(--size-216);
  overflow: auto;
  padding: var(--size-4); 
}

.list-edit-icons button img {
  width: var(--size-48);
  height: var(--size-48);
  object-fit: cover;
}


.list-edit-icons button {
  display: grid;
  place-items: center;
  width: var(--size-44);
  height: var(--size-44);
  border-radius: var(--radius-6);
  cursor: pointer;
  background:transparent;
}

.list-edit-icons [aria-pressed="true"]{
  background: var(--black010);
}

.list-icon {
  display: inline-block;
  width: var(--size-24);
  height: var(--size-24);
  mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
}

.list-edit-error { color: var(--red100); margin: var(--number-0); }
.list-card.list-card--illustrated { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: var(--size-12); }
.list-card__thumbnail { width: var(--size-40); height: var(--size-40); flex: var(--number-0) var(--number-0) var(--size-40); display: grid; place-items: center; overflow: hidden; border-radius: var(--radius-6); }
.list-card__thumbnail img { width: var(--percent-100); height: var(--percent-100); object-fit: cover; }
.list-card__copy { display: flex; flex-direction: column; min-width: var(--number-0); text-align: left; }
.list-header-cover { display: block; width: var(--percent-100); max-height: var(--size-180); aspect-ratio: var(--number-16) / var(--number-7); object-fit: cover; }
.list-header-description { margin: var(--number-0); white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--size-14); }
.trash-list-icon { display: block; background: var(--black060); mask-image: url('/static/img/icons/trash.svg'); -webkit-mask-image: url('/static/img/icons/trash.svg'); }
#places .list-card-row { width: var(--percent-100); }
#places .list-card-row > .list-card { padding-right: var(--size-56); }
.list-edit-preview {
  width: var(--size-80);
  height: var(--size-80);
  display: grid;
  place-items: center;
  align-self: center;
  overflow: hidden;
  border-radius: var(--radius-8);
  background: var(--black010);
}
.list-edit-preview .list-icon { width: var(--size-48); height: var(--size-48); }
.list-edit-preview img { width: var(--percent-100); height: var(--percent-100); object-fit: cover; }
.trash-dialog__delete-all { display: inline-flex; gap: var(--size-8); align-items: center; color: var(--alert100); }
.trash-dialog__delete-all .trash-list-icon { background: currentColor; }
.trash-dialog__list { min-height: var(--size-320); overflow-y: auto; }
/* Mobile: horizontal swipe reveals icon-only list actions. */
body[data-platform="mobile"] .list-card-row--swipe { --swipe-actions-width: var(--number-0); overflow: hidden; touch-action: pan-y; }
body[data-platform="mobile"] .list-card-row--swipe > .list-card { transition: transform var(--ms-200) ease; position: relative; z-index: var(--layer-1); }
body[data-platform="mobile"] .list-card-row--swipe.is-actions-open > .list-card { transform: translateX(calc(var(--swipe-actions-width) * var(--number-negative-1))); }
body[data-platform="mobile"] .list-card-row--swipe > .list-card__more:not(:focus-visible) { width: var(--size-1); height: var(--size-1); clip-path: inset(50%); overflow: hidden; padding: var(--number-0); }
body[data-platform="mobile"] .list-card-row--swipe > .list-card__more:focus-visible { z-index: var(--layer-2); }
body[data-platform="mobile"] .list-card-row--swipe > .list-actions-menu {
  position: absolute; inset: var(--number-0) var(--number-0) var(--number-0) auto;
  display: flex; align-items: stretch; width: var(--swipe-actions-width);
  box-shadow: none; border-radius: var(--number-0); z-index: auto;
  padding-right: var(--space-4);
}
body[data-platform="mobile"] .list-card-row--swipe .list-actions-menu button { width: var(--size-44); padding: var(--number-0); justify-content: center; border: none; }
body[data-platform="mobile"] .list-card-row--swipe .list-actions-menu__label { display: none; }
@media (prefers-reduced-motion: reduce) {
  body[data-platform="mobile"] .list-card-row--swipe > .list-card { transition: none; }
}
