/* App-Specific Styles for Explorer, Notepad, Photo Viewer */

/* Explorer Toolbar & Address Bar */
.explorer-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  background-color: var(--win-bg);
  border-bottom: 1px solid var(--win-shadow-dark);
}

.explorer-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 2px 10px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}

.explorer-address-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  background-color: var(--win-bg);
  border-bottom: 1px solid var(--win-shadow-dark);
}

.explorer-address-label {
  font-size: 11px;
  color: var(--win-shadow-dark);
}

.explorer-address-input {
  flex: 1;
  height: 20px;
  padding: 1px 4px;
  font-size: 11px;
  font-family: var(--font-win);
}

/* Explorer Body */
.explorer-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  background-color: #ffffff;
}

.explorer-sidebar {
  width: 160px;
  background-color: #f0f0f0;
  border-right: 1px solid var(--win-shadow-dark);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.explorer-sidebar h3 {
  margin: 0;
  font-size: 13px;
  color: #000080;
  border-bottom: 1px solid #000080;
  padding-bottom: 4px;
}

.explorer-sidebar p {
  margin: 0;
  font-size: 11px;
  color: #555;
  line-height: 1.4;
}

.explorer-file-grid {
  flex: 1;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  grid-auto-rows: max-content;
  gap: 12px;
  overflow-y: auto;
  align-content: start;
}

.file-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6px;
  cursor: pointer;
  border: 1px transparent solid;
  border-radius: 2px;
}

.file-item:hover {
  background-color: rgba(0, 0, 128, 0.1);
}

.file-item.selected {
  background-color: var(--win-selected);
  color: var(--win-selected-text);
}

.file-item img {
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
}

.file-name {
  font-size: 11px;
  word-break: break-word;
  line-height: 1.2;
}

/* Notepad Viewer */
.notepad-editor {
  flex: 1;
  margin: 2px;
  padding: 8px 12px;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  line-height: 1.5;
  color: #000000;
  background-color: #ffffff;
  overflow-y: auto;
  white-space: pre-wrap;
  user-select: text;
  -webkit-user-select: text;
}

.notepad-editor h1, .notepad-editor h2, .notepad-editor h3 {
  font-family: var(--font-win);
  margin-top: 8px;
  margin-bottom: 4px;
  color: #000080;
}

/* Photo Viewer */
.photo-viewer-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #202020;
  overflow: hidden;
}

.photo-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  background-color: var(--win-bg);
  border-bottom: 1px solid var(--win-shadow-dark);
}

.photo-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  overflow: auto;
  position: relative;
}

.photo-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  border: 2px solid #ffffff;
}

.photo-details-panel {
  padding: 8px 12px;
  background-color: var(--win-bg);
  border-top: 1px solid var(--win-shadow-dark);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.photo-details-panel strong {
  color: #000080;
}

/* System Dialog Modal */
.win-dialog-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  overflow: hidden;
}

.win-dialog-body {
  flex: 1;
  padding: 16px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  overflow-y: auto;
}

.win-dialog-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.win-dialog-message {
  flex: 1;
  font-size: 12px;
  line-height: 1.4;
}

.win-dialog-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background-color: var(--win-bg);
  border-top: 1px solid var(--win-shadow-dark);
  flex-shrink: 0;
}

.win-dialog-footer .win-btn {
  min-width: 75px;
  height: 24px;
  padding: 2px 12px;
  font-family: var(--font-win);
  font-size: 11px;
}

@media (max-width: 768px) {
  .explorer-toolbar {
    padding: 4px 6px;
    gap: 4px;
    flex-wrap: wrap;
  }

  .explorer-tool-btn {
    height: 26px;
    padding: 2px 8px;
    font-size: 11px;
    flex-shrink: 0;
  }
}

