/* ../../../../../../Views/Files/Files.css */
.page:has(> .card.files) {
  max-width: 760px;
}
.card.files {
  padding: 8px 0;
}
.files-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px 8px;
  border-bottom: 1px solid var(--card-border);
}
.files-bar button.icon {
  flex: none;
}
.files-bar button.icon.on {
  color: var(--accent);
}
.crumbs {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.crumbs > svg.i {
  flex: none;
  width: 14px;
  height: 14px;
}
.crumbs .crumb {
  flex: 0 3 auto;
  min-width: 0;
  padding: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: inherit;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: 6px;
}
.crumbs .crumb svg.i {
  vertical-align: -5px;
}
.crumbs .crumb svg.i + span {
  margin-left: 6px;
}
.crumbs button.crumb:hover:not(:disabled) {
  color: var(--text);
  background: var(--hover-bg);
}
.crumbs .crumb.current {
  flex-shrink: 1;
  color: var(--text);
  font-weight: 650;
}
.files-search {
  display: block;
  width: calc(100% - 24px);
  margin: 10px 12px 2px;
}
.files .message {
  margin: 10px 12px 0;
}
.files-list {
  list-style: none;
  margin: 0;
  padding: 4px 0 0;
}
.file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 400;
  text-align: left;
  color: var(--text);
  background: none;
  border: none;
  border-radius: 0;
}
button.file-row:hover:not(:disabled) {
  background: var(--hover-bg);
}
.file-icon {
  flex: none;
  display: inline-flex;
  color: var(--text-muted);
}
.file-icon svg.i {
  width: 24px;
  height: 24px;
  stroke-width: 1.7;
}
.file-icon.folder {
  color: var(--tag-warning);
}
.file-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.file-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.file-row > svg.i {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}
.files-empty {
  margin: 0;
  padding: 24px 16px;
  text-align: center;
}
.files-empty svg.i {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: -4px;
}
.file-item {
  position: relative;
  display: flex;
  align-items: center;
}
.file-item .file-row {
  flex: 1;
  min-width: 0;
}
.file-row:has(+ .file-more) {
  padding-right: 4px;
}
.file-item .file-more {
  flex: none;
  margin-right: 8px;
}
.action-menu {
  position: relative;
  flex: none;
}
.file-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  min-width: 170px;
  padding: 6px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.file-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  color: var(--text);
  background: none;
  border: none;
  border-radius: 8px;
}
.file-menu button:hover {
  background: var(--hover-bg);
}
.file-menu svg.i {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}
.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  color: #eef2f9;
  background: rgba(8, 11, 18, 0.94);
}
.viewer-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 8px 8px 16px;
}
.viewer-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.viewer-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.viewer-meta {
  font-size: 0.8rem;
  color: #94a3b8;
}
.viewer .icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: #cbd5e1;
  background: none;
  border: none;
  border-radius: 50%;
}
.viewer .icon:hover:not(:disabled) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}
.viewer-body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 64px 16px;
}
.viewer-body > svg.spin {
  width: 32px;
  height: 32px;
  color: #cbd5e1;
}
.viewer-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}
.viewer-image.loading {
  position: absolute;
  opacity: 0;
}
.viewer-pdf {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 4px;
  background: #ffffff;
}
.viewer .viewer-prev,
.viewer .viewer-next {
  position: absolute;
  top: calc(50% - 20px);
  background: rgba(255, 255, 255, 0.08);
}
.viewer .viewer-prev {
  left: 12px;
}
.viewer .viewer-next {
  right: 12px;
}
.viewer-prev svg.i {
  transform: rotate(180deg);
}
.viewer-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0;
  text-align: center;
  color: #cbd5e1;
}
.viewer-note svg.i {
  width: 48px;
  height: 48px;
  stroke-width: 1.4;
}
.viewer-note p {
  margin: 0;
}
@media (max-width: 600px) {
  .viewer-body {
    padding: 0 0 8px;
  }
  .viewer .viewer-prev,
  .viewer .viewer-next {
    background: rgba(8, 11, 18, 0.6);
  }
  .viewer .viewer-prev {
    left: 6px;
  }
  .viewer .viewer-next {
    right: 6px;
  }
}
.file-menu button.remove,
.file-menu button.remove svg.i {
  color: var(--error-text);
}
.file-menu button.remove:hover {
  background: var(--error-bg);
}
.modal.file-dialog {
  max-width: 420px;
  margin-top: 10vh;
}
.file-dialog-text {
  margin: 4px 0 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.file-dialog-actions {
  justify-content: flex-end;
  margin-top: 18px;
}
.file-dialog-actions button.danger {
  padding: 12px 20px;
}
.file-dialog-actions button.submit {
  padding: 12px 20px;
}
.file-menu button span {
  white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  .file-menu .touch-only {
    display: none;
  }
}
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.files-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 12px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.files-progress-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.files-progress-bar {
  display: block;
  height: 4px;
  overflow: hidden;
  background: var(--card-border);
  border-radius: 2px;
}
.files-progress-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.2s ease;
}
.file-chips {
  flex-wrap: nowrap;
  align-items: center;
  margin: 16px 0;
  padding: 4px 0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.file-chips-label {
  flex: none;
  margin-right: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.file-chips .chip {
  flex: none;
  white-space: nowrap;
}
.file-chip {
  padding: 9px 8px 9px 12px;
}
.file-chip button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}
.file-chip button.remove {
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
}
.file-chip button.remove:hover:not(:disabled) {
  background: color-mix(in srgb, var(--tag) 28%, transparent);
}
.file-chip button.remove svg.i {
  width: 12px;
  height: 12px;
}
.file-chips button.icon {
  flex: none;
  width: 30px;
  height: 30px;
}
