/* ============================================================
   Disky Fun — Apps (About + Notes)
   ============================================================ */


/* ─── About.exe ─────────────────────────────────── */

.about-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--c-bg);
  padding: var(--pad-5);
  font-family: var(--font-system);
}

.about-app__hero {
  text-align: center;
  margin-bottom: var(--pad-5);
}

.about-app__logo {
  margin-bottom: var(--pad-3);
}

.about-app__logo svg {
  display: inline-block;
}

.about-app__title {
  font-family: var(--font-bold);
  font-size: var(--fs-lg, 18px);
  color: var(--c-content-text);
  margin-bottom: var(--pad-1);
}

.about-app__title strong {
  color: var(--c-accent);
}

.about-app__version {
  font-size: var(--fs-xs);
  color: var(--c-bg-dark);
}


.about-app__info {
  background: var(--c-content-bg);
  border-top: 1px solid var(--c-bg-dark);
  border-left: 1px solid var(--c-bg-dark);
  border-right: 1px solid var(--c-white);
  border-bottom: 1px solid var(--c-white);
  box-shadow: inset 1px 1px 0 var(--c-bg-darker);
  padding: var(--pad-3);
  margin-bottom: var(--pad-4);
  font-size: var(--fs-sm);
}

.about-app__row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
}

.about-app__label {
  font-family: var(--font-bold);
  font-weight: bold;
  color: var(--c-content-text);
}

.about-app__value {
  color: var(--c-content-text);
  text-align: right;
}


.about-app__footer {
  flex: 1;
  text-align: center;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--c-content-text);
  margin-bottom: var(--pad-3);
}

.about-app__credit {
  font-size: var(--fs-xs);
  color: var(--c-bg-dark);
  margin-top: var(--pad-2);
}


.about-app__buttons {
  text-align: center;
}


/* ─── Notes.exe ─────────────────────────────────── */

.notes-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--c-bg);
  font-family: var(--font-system);
}


/* Menu bar */
.notes-app__menubar {
  display: flex;
  align-items: center;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-bg-dark);
  padding: 2px;
  user-select: none;
  flex-shrink: 0;
}

.notes-app__menu {
  position: relative;
}

.notes-app__menu-label {
  padding: 2px 8px;
  font-size: var(--fs-sm);
  cursor: default;
  display: block;
}

.notes-app__menu-label u {
  text-decoration: underline;
}

.notes-app__menu.is-open > .notes-app__menu-label,
.notes-app__menu:hover > .notes-app__menu-label {
  background: var(--c-accent);
  color: var(--c-accent-text);
}

.notes-app__menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background: var(--c-bg);
  border-top: 2px solid var(--c-white);
  border-left: 2px solid var(--c-white);
  border-right: 2px solid var(--c-black);
  border-bottom: 2px solid var(--c-black);
  box-shadow:
    inset 1px 1px 0 var(--c-bg-light),
    inset -1px -1px 0 var(--c-bg-dark),
    2px 2px 0 var(--c-black);
  z-index: 10;
  padding: 2px;
}

.notes-app__menu.is-open .notes-app__menu-dropdown {
  display: block;
}

.notes-app__menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 16px 3px 8px;
  font-size: var(--fs-sm);
  cursor: default;
  white-space: nowrap;
}

.notes-app__menu-item:hover {
  background: var(--c-accent);
  color: var(--c-accent-text);
}

.notes-app__menu-item-shortcut {
  margin-left: 24px;
  opacity: 0.7;
  font-size: var(--fs-xs);
}

.notes-app__menu-divider {
  height: 0;
  margin: 2px 4px;
  border-top: 1px solid var(--c-bg-dark);
  border-bottom: 1px solid var(--c-white);
}


/* "Open in Notes" button (widget mode menubar, right-aligned) */
.notes-app__open-in-notes {
  margin-left: auto;
  padding: 2px 10px;
  font-family: var(--font-system);
  font-size: var(--fs-sm);
  background: var(--c-bg);
  color: var(--c-content-text);
  border-top: 1px solid var(--c-white);
  border-left: 1px solid var(--c-white);
  border-right: 1px solid var(--c-black);
  border-bottom: 1px solid var(--c-black);
  cursor: default;
}

.notes-app__open-in-notes:active {
  border-top: 1px solid var(--c-black);
  border-left: 1px solid var(--c-black);
  border-right: 1px solid var(--c-white);
  border-bottom: 1px solid var(--c-white);
}


/* Body: sidebar + editor (library mode only) */
.notes-app__body {
  flex: 1;
  display: flex;
  overflow: hidden;
  border-top: 1px solid var(--c-bg-dark);
}


/* Sidebar */
.notes-app__sidebar {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--c-bg);
  border-right: 1px solid var(--c-bg-dark);
  overflow: hidden;
}

.notes-app__sidebar-section {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.notes-app__sidebar-section--folders {
  flex-shrink: 0;
  border-bottom: 1px solid var(--c-bg-dark);
  max-height: 45%;
}

.notes-app__sidebar-section--memos {
  flex: 1;
  min-height: 0;
}

.notes-app__sidebar-title {
  padding: 4px 8px;
  font-family: var(--font-bold);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--c-bg-dark);
  color: var(--c-white);
  flex-shrink: 0;
}

.notes-app__folder-list,
.notes-app__memo-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  background: var(--c-content-bg);
  flex: 1;
  min-height: 0;
}

.notes-app__folder-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: var(--fs-sm);
  color: var(--c-content-text);
  cursor: default;
  user-select: none;
}

.notes-app__folder-item:hover {
  background: rgba(0, 0, 128, 0.08);
}

.notes-app__folder-item.is-active {
  background: var(--c-accent);
  color: var(--c-accent-text);
}

.notes-app__folder-icon {
  flex-shrink: 0;
}

.notes-app__folder-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notes-app__folder-count {
  font-size: var(--fs-xs);
  opacity: 0.7;
  flex-shrink: 0;
}

.notes-app__folder-divider {
  height: 0;
  margin: 4px 6px;
  border-top: 1px solid var(--c-bg-dark);
  border-bottom: 1px solid var(--c-white);
  list-style: none;
}

.notes-app__sort-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-bg-dark);
  font-size: var(--fs-xs);
  flex-shrink: 0;
}

.notes-app__sort-row select {
  flex: 1;
  font-family: var(--font-system);
  font-size: var(--fs-xs);
  background: var(--c-content-bg);
  color: var(--c-content-text);
  border: 1px solid var(--c-bg-dark);
  padding: 1px 2px;
}

.notes-app__memo-item {
  display: block;
  padding: 6px 8px;
  border-bottom: 1px dotted var(--c-bg-light);
  cursor: default;
  user-select: none;
  color: var(--c-content-text);
}

.notes-app__memo-item:hover {
  background: rgba(0, 0, 128, 0.08);
}

.notes-app__memo-item.is-active {
  background: var(--c-accent);
  color: var(--c-accent-text);
}

.notes-app__memo-row1 {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.notes-app__memo-title {
  flex: 1;
  font-family: var(--font-bold);
  font-size: var(--fs-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notes-app__memo-pin {
  flex-shrink: 0;
  font-size: var(--fs-xs);
  opacity: 0.85;
}

.notes-app__memo-date {
  flex-shrink: 0;
  font-size: var(--fs-xs);
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

.notes-app__memo-row2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 1px;
}

.notes-app__memo-preview {
  flex: 1;
  font-size: var(--fs-xs);
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.notes-app__memo-folder-label {
  flex-shrink: 0;
  font-size: 10px;
  opacity: 0.6;
  white-space: nowrap;
}

.notes-app__memo-empty {
  padding: 12px 8px;
  font-size: var(--fs-xs);
  color: var(--c-bg-dark);
  font-style: italic;
  text-align: center;
}

.notes-app__sidebar-button {
  flex-shrink: 0;
  padding: 4px 8px;
  font-family: var(--font-system);
  font-size: var(--fs-xs);
  background: var(--c-bg);
  color: var(--c-content-text);
  border: 0;
  border-top: 1px solid var(--c-bg-dark);
  cursor: default;
  text-align: center;
}

.notes-app__sidebar-button:hover {
  background: var(--c-accent);
  color: var(--c-accent-text);
}

.notes-app__sidebar-button:active {
  background: var(--c-bg-dark);
}


/* Editor pane */
.notes-app__editor-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--c-content-bg);
}

.notes-app__editor-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--c-content-bg);
  border-bottom: 1px solid var(--c-bg-dark);
  padding-right: 12px;
}

.notes-app__title-input {
  flex: 1;
  min-width: 0;
  background: var(--c-content-bg);
  color: var(--c-content-text);
  border: 0;
  font-family: var(--font-bold);
  font-size: 16px;
  padding: 8px 12px;
  outline: none;
}

.notes-app__title-input:focus {
  outline: none;
  background: var(--c-content-bg);
}

.notes-app__title-input:disabled {
  background: var(--c-bg);
  color: var(--c-bg-dark);
}

.notes-app__editor-date {
  flex-shrink: 0;
  font-size: var(--fs-sm);
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
  color: var(--c-content-text);
}

.notes-app__editor {
  flex: 1;
  width: 100%;
  background: var(--c-content-bg);
  color: var(--c-content-text);
  border: 0;
  outline: none;
  resize: none;
  padding: 8px 12px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  line-height: 1.5;
}

.notes-app__editor:focus {
  outline: none;
}

.notes-app__editor:disabled {
  background: var(--c-bg);
}


/* Status bar */
.notes-app__statusbar {
  flex-shrink: 0;
  display: flex;
  background: var(--c-bg);
  border-top: 1px solid var(--c-bg-dark);
  padding: 2px;
  font-size: var(--fs-xs);
  color: var(--c-content-text);
  user-select: none;
}

.notes-app__status-segment {
  border-top: 1px solid var(--c-bg-dark);
  border-left: 1px solid var(--c-bg-dark);
  border-right: 1px solid var(--c-white);
  border-bottom: 1px solid var(--c-white);
  padding: 2px 8px;
  min-width: 80px;
}

.notes-app__status-segment + .notes-app__status-segment {
  margin-left: 2px;
}

.notes-app__status-segment:last-child {
  flex: 1;
}


/* Widget mode — single note window */
.notes-app--widget {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.notes-app--widget .notes-app__editor-header {
  border-top: 1px solid var(--c-bg-dark);
}

.notes-app__widget-error {
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  background: var(--c-content-bg);
  color: var(--c-content-text);
  text-align: center;
  font-size: var(--fs-sm);
}

.notes-app__widget-error p {
  margin: 0;
}


/* Notes context-menu add-ons (base styles come from .context-menu) */
.context-menu__item--has-submenu {
  position: relative;
}

.context-menu__item.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}


/* ─── Notes — embedded desktop widget ────────────── */

.notes-widget {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--c-content-bg);
  padding: 8px;
  cursor: pointer;
}

.notes-widget__title {
  font-family: var(--font-bold);
  font-size: var(--fs-sm);
  color: var(--c-content-text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notes-widget__content {
  flex: 1;
  overflow: hidden;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  line-height: 1.4;
  color: var(--c-content-text);
  white-space: pre-wrap;
  word-break: break-word;
}

.notes-widget__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: var(--fs-sm);
  color: var(--c-content-text);
  opacity: 0.6;
  text-align: center;
  padding: 8px;
}

.notes-widget--unconfigured,
.notes-widget--missing {
  background: var(--c-bg);
}
