/* === [ PROJECTS EXPLORER GRID DAN PREVIEW ] === */

/* >>> explorer navigation top toolbar <<< */
.explorer-toolbar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  background-color: var(--win-gray);
  border-bottom: 1px solid var(--win-gray-dark);
}

.btn-tool {
  height: 24px;
  padding: 0 6px;
  font-size: 11px;
}

.toolbar-sep {
  width: 1px;
  height: 20px;
  border-left: 1px solid var(--win-gray-dark);
  border-right: 1px solid var(--win-white);
  margin: 0 4px;
}

/* address bar path input wrapper */
.explorer-address-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 6px;
  background-color: var(--win-gray);
  border-bottom: 1px solid var(--win-gray-dark);
}

.address-label {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--win-black);
  flex-shrink: 0;
}

.address-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  height: 22px;
  background-color: var(--win-white);
}

.address-input-wrapper img {
  width: 14px;
  height: 14px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.address-input {
  border: none;
  background: transparent;
  width: 100%;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--win-black);
  outline: none;
  cursor: default;
}

/* main explorer split body layout */
.explorer-body {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch;
  gap: 6px;
  padding: 6px;
  background-color: var(--win-gray);
  flex: 1;
  min-height: 280px;
  box-sizing: border-box;
}

/* >>> preview sidebar selected project <<< */
.explorer-sidebar {
  width: 210px;
  flex-shrink: 0;
  padding: 12px;
  background-color: #f6f6f6;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-folder-icon {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.sidebar-folder-icon img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.preview-title {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: bold;
  color: var(--win-navy);
  text-align: center;
  word-break: break-word;
}

.preview-summary {
  font-family: var(--font-ui);
  font-size: 11px;
  line-height: 1.4;
  color: var(--win-black);
}

.preview-meta {
  padding: 6px 8px;
  background-color: var(--win-white);
  font-family: var(--font-mono);
  font-size: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.meta-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-line strong {
  color: var(--win-gray-dark);
}

#btn-open-detail {
  margin-top: auto;
  width: 100%;
}

/* >>> dynamic projects card grid <<< */
.explorer-grid {
  flex: 1;
  padding: 12px;
  background-color: var(--win-white);
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  grid-auto-rows: max-content;
  gap: 12px;
  align-content: flex-start;
}

/* >>> individual project item card <<< */
.project-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 6px;
  gap: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  user-select: none;
  transition: background-color 0.1s ease;
}

.project-card:hover {
  border: 1px dotted var(--win-gray-dark);
}

.project-card.selected {
  background-color: var(--win-highlight);
  color: var(--win-highlight-text);
  outline: 1px dotted #ffffff;
  outline-offset: -2px;
}

.card-icon {
  width: 36px;
  height: 36px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.card-name {
  font-family: var(--font-ui);
  font-size: 11px;
  word-break: break-word;
  line-height: 1.25;
  color: inherit;
}

/* >>> responsive layout mobile viewport <<< */
@media (max-width: 768px) {
  .explorer-body {
    flex-direction: column;
    height: auto;
  }
  .explorer-sidebar {
    width: 100%;
  }
  .filter-tabs {
    flex-wrap: wrap;
  }
}
