/*
 * File explorer — ui-explorer.
 */

ui-explorer,
.ui-explorer {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--Window);
  color: var(--WindowText);
}

.ui-explorer__toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--ButtonFace);
  border-bottom: 1px solid var(--ButtonShadow);
}

.ui-explorer__btn {
  width: 28px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ButtonFace);
  border: 1px solid;
  border-color: var(--ButtonHilight) var(--ButtonShadow) var(--ButtonShadow) var(--ButtonHilight);
  cursor: pointer;
  font-size: 11px;
  color: var(--ButtonText);
}

.ui-explorer__btn:disabled {
  color: var(--GrayText);
  cursor: default;
}

.ui-explorer__btn:hover:not(:disabled) {
  background: var(--ButtonLight);
}

.ui-explorer__address {
  flex: 1;
  padding: 3px 6px;
  background: var(--Window);
  border: 2px solid;
  border-color: var(--ButtonShadow) var(--ButtonHilight) var(--ButtonHilight) var(--ButtonShadow);
  color: var(--WindowText);
  font-size: 12px;
}

.ui-explorer__status {
  padding: 4px 8px;
  background: var(--ButtonFace);
  border-top: 1px solid var(--ButtonShadow);
  font-size: 11px;
  color: var(--ButtonText);
}

/* File Picker */
.file-picker {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--Window);
}

.file-picker__nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: var(--ButtonFace);
  border-bottom: 1px solid var(--ButtonShadow);
}

.file-picker__btn {
  padding: 3px 10px;
  background: var(--ButtonFace);
  border: 2px solid;
  border-color: var(--ButtonHilight) var(--ButtonDkShadow) var(--ButtonDkShadow) var(--ButtonHilight);
  cursor: pointer;
  font-size: 11px;
  color: var(--ButtonText);
}

.file-picker__path {
  flex: 1;
  font-size: 12px;
  color: var(--WindowText);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-picker__list {
  flex: 1;
  overflow-y: auto;
  padding: 4px;
}

.file-picker__item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  cursor: pointer;
  font-size: 12px;
}

.file-picker__item:hover {
  background: var(--Hilight);
  color: var(--HilightText);
}

.file-picker__item.selected {
  background: var(--Hilight);
  color: var(--HilightText);
}

.file-picker__item.is-dir .file-picker__name {
  font-weight: bold;
}

.file-picker__footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: var(--ButtonFace);
  border-top: 1px solid var(--ButtonShadow);
}

.file-picker__filename {
  flex: 1;
  padding: 3px 6px;
  background: var(--Window);
  border: 2px solid;
  border-color: var(--ButtonShadow) var(--ButtonHilight) var(--ButtonHilight) var(--ButtonShadow);
  color: var(--WindowText);
}

.file-picker__filter {
  padding: 3px;
  background: var(--Window);
  border: 2px solid;
  border-color: var(--ButtonShadow) var(--ButtonHilight) var(--ButtonHilight) var(--ButtonShadow);
  color: var(--WindowText);
  font-size: 11px;
}

.file-picker__ok,
.file-picker__cancel {
  padding: 4px 16px;
  background: var(--ButtonFace);
  border: 2px solid;
  border-color: var(--ButtonHilight) var(--ButtonDkShadow) var(--ButtonDkShadow) var(--ButtonHilight);
  cursor: pointer;
  color: var(--ButtonText);
}

.file-picker__error {
  padding: 12px;
  color: var(--error, #ef4444);
}
