.file-item-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.05em;
  font-size: 1em;
  line-height: 1;
  opacity: 1;
  transition: none;
}

.file-item-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 1.74em;
  height: 1.74em;

  padding: 0;
  margin: 0;
  border: none;
  background: transparent;

  font-size: 1em;
  line-height: 1;

  color: inherit;
  cursor: pointer;
  position: relative;
  flex: 0 0 auto;

  opacity: 0.56;
  transition: opacity 0.18s ease, transform 0.18s ease, filter 0.18s ease;
}

.file-item-action-btn:hover,
.file-item-action-btn:focus-visible {
  opacity: 1;
  transform: translateY(-0.03em);
  filter: brightness(1.14);
  outline: none;
}

.file-item-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 1.40em;
  height: 1.40em;

  line-height: 1;
}

.file-item-action-btn svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Download визуально тоньше, поэтому можно оставить обычный размер */
.file-item-action-btn[data-action="download"] .file-item-action-icon {
  width: 1.42em;
  height: 1.42em;
}

/* Copy обычно выглядит мелковато — чуть усиливаем */
.file-item-action-btn[data-action="copy"] .file-item-action-icon {
  width: 1.44em;
  height: 1.44em;
}

/* Info в круге визуально крупнее — немного уменьшаем */
.file-item-action-btn[data-action="properties"] .file-item-action-icon {
  width: 1.34em;
  height: 1.34em;
  transform: none;
}

.file-action-more-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.13em;
  width: 1.34em;
  height: 1.34em;
}

.file-action-more-icon span {
  display: block;
  width: 0.68em;
  height: 0.2em;
  border-radius: 999px;
  background: currentColor;
}

.file-item-action-btn[data-action="download"] {
  color: #61d8ee;
}

.file-item-action-btn[data-action="copy"] {
  color: #e5c96a;
}

.file-item-action-btn[data-action="properties"] {
  color: #b78aff;
}

.file-item-action-btn.is-copied {
  opacity: 1;
  filter: brightness(1.18);
}

.file-item-action-btn.is-menu-open {
  opacity: 1;
  transform: translateY(-0.03em);
  filter: brightness(1.14);
}

.file-item-action-btn.is-copied::after {
  content: attr(data-copied-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.32em);
  transform: translateX(-50%);
  padding: 0.22em 0.48em;
  border-radius: 0.45em;
  background: rgba(18, 25, 34, 0.94);
  color: rgba(244, 248, 252, 0.92);
  font-size: 0.72em;
  line-height: 1.1;
  white-space: nowrap;
  pointer-events: none;
}

.icon-tile.has-file-actions .file-item-actions {
  margin-top: 0.45em;
  font-size: var(--grid-font-size);
}

.media-grid.list-view .icon-tile.has-file-actions .file-item-actions {
  margin-top: 0;
  margin-left: auto;
  flex: 0 0 auto;
  font-size: var(--list-font-size);
}

.media-grid.list-view .icon-tile.has-file-actions .icon-title {
  min-width: 0;
}

.media-card.has-file-actions .file-item-actions {
  margin-top: 0.45em;
  font-size: var(--grid-font-size);
}

.media-grid.list-view .media-card.has-file-actions .file-item-actions {
  margin-top: 0;
  margin-left: auto;
  align-self: center;
  font-size: var(--list-font-size);
}

.media-grid.list-view .media-card.has-file-actions .media-meta {
  width: 100%;
}

.media-grid.list-view .media-card.has-file-actions .card-footer {
  flex-direction: row;
  align-items: center;
  gap: 0.7em;
}

.media-grid.list-view .media-card.has-file-actions .media-title {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.media-grid.list-view .media-card.has-file-actions .card-year {
  display: none;
}

.file-properties-open {
  overflow: hidden;
}

.file-properties-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
}

.file-properties-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 14, 0.74);
  backdrop-filter: blur(5px);
}

.file-properties-modal__panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(34rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1rem 1rem 0.9rem;
  border: 1px solid rgba(125, 142, 168, 0.26);
  border-radius: 0.9rem;
  background: #131a22;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  color: rgba(232, 238, 245, 0.92);
}

.file-properties-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.file-properties-modal__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
}

.file-properties-modal__close {
  border: none;
  background: transparent;
  color: rgba(235, 240, 247, 0.72);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.file-properties-modal__body {
  display: grid;
  gap: 0.65rem;
}

.file-properties-modal__row {
  display: grid;
  grid-template-columns: minmax(6.5rem, 8rem) 1fr;
  gap: 0.8rem;
  align-items: start;
}

.file-properties-modal__label {
  color: rgba(190, 199, 211, 0.58);
  font-size: 0.9rem;
}

.file-properties-modal__value {
  color: rgba(235, 241, 247, 0.88);
  font-size: 0.92rem;
  line-height: 1.4;
  word-break: break-word;
}

.file-actions-menu {
  position: fixed;
  z-index: 1310;
  display: grid;
  gap: 0.14rem;
  min-width: 12rem;
  padding: 0.32rem;
  border: 1px solid rgba(125, 142, 168, 0.24);
  border-radius: 0.82rem;
  background: rgba(14, 20, 29, 0.97);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(10px);
  color: rgba(234, 240, 247, 0.92);
  font-size: 0.86rem;
  font-weight: 300;
}

.file-actions-menu[hidden] {
  display: none;
}

.file-actions-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  width: 100%;
  padding: 0.5rem 0.62rem;
  border: none;
  border-radius: 0.58rem;
  background: transparent;
  color: rgba(220, 228, 238, 0.64);
  font: inherit;
  text-align: left;
  cursor: pointer;
  outline: none;
  box-shadow: none;
  text-shadow: none;
  filter: none;
}

.file-actions-menu__item:focus {
  background: transparent;
  color: rgba(220, 228, 238, 0.64);
  box-shadow: none;
  text-shadow: none;
  filter: none;
  outline: none;
}

.file-actions-menu__item:hover,
.file-actions-menu__item:focus-visible {
  background: transparent;
  color: rgba(220, 228, 238, 0.64);
  box-shadow: none;
  outline: none;
  text-shadow: none;
  filter: none;
}

.file-actions-menu__item.is-disabled,
.file-actions-menu__item:disabled {
  background: transparent;
  color: rgba(182, 190, 202, 0.5);
  cursor: default;
}

.file-actions-menu__item.is-disabled:hover,
.file-actions-menu__item:disabled:hover,
.file-actions-menu__item.is-disabled:focus-visible,
.file-actions-menu__item:disabled:focus-visible {
  background: transparent;
  color: rgba(182, 190, 202, 0.5);
}

.file-actions-menu__label {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: inherit;
  transition: color 0.14s ease, text-shadow 0.14s ease, opacity 0.14s ease;
}

.file-actions-menu__item:not(:disabled):not(.is-disabled):hover .file-actions-menu__label,
.file-actions-menu__item:not(:disabled):not(.is-disabled):focus-visible .file-actions-menu__label {
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 0 0.28em rgba(183, 138, 255, 0.32);
}

.file-actions-menu__hint {
  display: inline-flex;
  align-items: center;
  color: rgba(184, 192, 203, 0.44);
  font-size: 0.74em;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.file-info-popup {
  position: fixed;
  z-index: 1320;
  width: min(28rem, calc(100vw - 1rem));
  max-height: calc(100vh - 1rem);
  overflow: auto;
  padding: 0.82rem 0.86rem 0.78rem;
  border: 1px solid rgba(125, 142, 168, 0.24);
  border-radius: 0.92rem;
  background: rgba(14, 20, 29, 0.98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
  color: rgba(234, 240, 247, 0.92);
}

.file-info-popup[hidden] {
  display: none;
}

.file-info-popup__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.file-info-popup__title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 400;
  color: rgba(242, 246, 252, 0.94);
}

.file-info-popup__close {
  border: none;
  background: transparent;
  color: rgba(221, 228, 238, 0.62);
  font-size: 1.28rem;
  line-height: 1;
  cursor: pointer;
}

.file-info-popup__close:hover,
.file-info-popup__close:focus-visible {
  color: rgba(248, 251, 255, 0.9);
  outline: none;
}

.file-info-popup__body {
  display: grid;
  gap: 0.72rem;
}

.file-info-popup__item-title {
  color: rgba(243, 247, 252, 0.92);
  font-size: 0.94rem;
  line-height: 1.35;
  word-break: break-word;
}

.file-info-popup__rows {
  display: grid;
  gap: 0.62rem;
}