/* Модальный проводник материалов для ОГЭ-13.1 Impress */
.oge-impress-materials-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.oge-impress-materials-modal[hidden] {
  display: none !important;
}

.oge-impress-materials-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
}

.oge-impress-materials-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(82vh, 640px);
  display: flex;
  flex-direction: column;
  border-radius: 0.625rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #1e293b;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  color: #f1f5f9;
  overflow: hidden;
}

.oge-impress-materials-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.oge-impress-materials-modal__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.oge-impress-materials-modal__close {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
}

.oge-impress-materials-modal__close:hover,
.oge-impress-materials-modal__close:focus-visible {
  color: #f1f5f9;
  background: rgba(148, 163, 184, 0.15);
}

.oge-impress-materials-explorer {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}

.oge-impress-materials-explorer__toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.oge-impress-materials-explorer__nav-btn {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.375rem;
  background: rgba(30, 41, 59, 0.85);
  color: #f1f5f9;
  cursor: pointer;
}

.oge-impress-materials-explorer__nav-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.oge-impress-materials-explorer__address {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.45rem 0.65rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.65);
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oge-impress-materials-explorer__list-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.35rem 0.5rem;
}

.oge-impress-materials-explorer__file-list-inner {
  list-style: none;
  margin: 0;
  padding: 0;
}

.oge-impress-materials-explorer__file-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.oge-impress-materials-explorer__file-item:hover {
  background: rgba(96, 165, 250, 0.12);
}

.oge-impress-materials-explorer__file-item--selected {
  background: rgba(96, 165, 250, 0.24);
  border-color: #60a5fa;
}

.oge-impress-materials-explorer__file-icon {
  flex: 0 0 auto;
  width: 1.25rem;
  text-align: center;
}

.oge-impress-materials-explorer__file-meta {
  min-width: 0;
  flex: 1 1 auto;
}

.oge-impress-materials-explorer__file-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oge-impress-materials-explorer__file-type {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
}

.oge-impress-materials-explorer__footer {
  padding: 0.65rem 0.85rem 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.oge-impress-materials-explorer__hint {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.oge-impress-materials-explorer__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.oge-impress-materials-explorer__btn {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.375rem;
  background: rgba(30, 41, 59, 0.85);
  color: #f1f5f9;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  font: inherit;
}

.oge-impress-materials-explorer__btn--primary {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(37, 99, 235, 0.45);
}

.oge-impress-materials-explorer__btn--primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.oge-impress-materials-explorer__empty {
  margin: 1rem 0.5rem;
  color: #94a3b8;
  font-size: 0.875rem;
}

.libreoffice-impress-slide-document img.libreoffice-impress-slide-image {
  display: inline-block;
  max-width: 45%;
  height: auto;
  vertical-align: middle;
  margin: 0.25rem;
}
