/* components.css — Reusable widgets used across pages: framed panel, raised/sunken
   borders, progress bar, buttons, context menu, tooltip, divider, section label,
   notifications, remote cursors, placeholder text. */

/* ===== CONTENT LINKS =====
   Every markdown link in authored content renders as .content-link (see
   window.mdLinks in shared.js), so links look the same everywhere. */
.content-link {
  color: #000080;
  text-decoration: none;
  border-bottom: 1px dotted #000080;
  cursor: pointer;
}
.content-link:hover { color: #1084d0; border-bottom-color: #1084d0; }

/* ===== PANEL COMPONENT (projects only) ===== */
.panel {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #dfdfdf #404040 #404040 #dfdfdf;
  margin-bottom: 8px;
  box-shadow: 1px 1px 0 #000;
}

.panel-bar {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  
  font-size: var(--font-body);
  padding: 2px 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  height: 18px;
}

.panel-bar-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-left: 2px;
}

.panel-bar-buttons {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.panel-btn {
  width: 16px;
  height: 14px;
  background: #c0c0c0;
  border: 1px solid;
  border-color: #dfdfdf #404040 #404040 #dfdfdf;
  font-size: var(--font-body);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  font-family: regular;
  padding: 0;
  
}

.panel-btn:active {
  border-color: #404040 #dfdfdf #dfdfdf #404040;
}

.panel-body { padding: 6px; }

/* ===== RAISED / SUNKEN BORDERS ===== */
.raised {
  border: 2px solid;
  border-color: #dfdfdf #404040 #404040 #dfdfdf;
}

.sunken {
  border: 2px solid;
  border-color: #808080 #dfdfdf #dfdfdf #808080;
}

.field {
  border: 2px solid;
  border-color: #808080 #dfdfdf #dfdfdf #808080;
  background: #fff;
  padding: 4px;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  height: 16px;
  background: #fff;
  border: 2px solid;
  border-color: #808080 #dfdfdf #dfdfdf #808080;
  position: relative;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #000080;
  transition: width 0.3s;
}

.progress-text {
  position: absolute;
  top: 0; left: 0; right: 0;
  text-align: center;
  font-size: var(--font-body);
  line-height: 14px;
  color: #000;
  mix-blend-mode: difference;
  filter: invert(1);
}

/* ===== REMOTE CURSORS ===== */
.remote-cursor {
  position: absolute;
  pointer-events: none;
  z-index: 600;
}

.remote-cursor .cursor-img {
  width: 11px; height: 19px;
  image-rendering: pixelated;
}

.remote-cursor .cursor-name {
  font-size: var(--font-body);
  background: #ffff00;
  color: #000;
  padding: 1px 3px;
  border: 1px solid #000;
  margin-left: 10px;
  margin-top: -2px;
  white-space: nowrap;
  font-family: regular;
}

/* ===== CONTEXT MENU ===== */
#context-menu {
  display: none;
  position: absolute;
  z-index: 10000;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #dfdfdf #404040 #404040 #dfdfdf;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
  padding: 2px;
  min-width: 160px;
  font-family: regular;
  font-size: var(--font-body);
}

#context-menu.visible { display: block; }

.ctx-item {
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
}

.ctx-dynamic { display: none; }

.ctx-item:hover { background: #000080; color: #fff; }

.ctx-item.disabled { color: #808080; cursor: default; }
.ctx-item.disabled:hover { background: none; color: #808080; }

.ctx-separator {
  height: 2px;
  background: #808080;
  border-bottom: 1px solid #dfdfdf;
  margin: 2px;
}

/* Inline name entry — revealed below "Set Name…" when the menu is naming. */
.ctx-name-entry { display: none; padding: 3px 6px 4px; }
#context-menu.naming .ctx-name-entry { display: flex; gap: 4px; align-items: stretch; }
#ctx-name-input {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  border: 2px solid;
  border-color: #808080 #dfdfdf #dfdfdf #808080;  /* sunken field bevel */
  background: #fff;
  font-family: regular;
  font-size: var(--font-body);
  padding: 1px 3px;
  color: #000;
  outline: none;
}
#ctx-name-ok {
  flex: 0 0 auto;
  box-sizing: border-box;
  border: 2px solid;
  border-color: #dfdfdf #404040 #404040 #dfdfdf;  /* raised button bevel */
  background: #c0c0c0;
  font-family: regular;
  font-size: var(--font-body);
  padding: 0 8px;
  color: #000;
  cursor: pointer;
}
#ctx-name-ok:active { border-color: #404040 #dfdfdf #dfdfdf #404040; }  /* pressed = sunken */

/* ===== TOOLTIP ===== */
.tooltip {
  position: absolute;
  z-index: 10001;
  background: #ffffe1;
  border: 1px solid #000;
  padding: 0 4px;            /* tight — a slim label, not a padded box */
  font-family: regular;
  font-size: var(--font-body);
  line-height: 1.45;
  color: #000;
  white-space: nowrap;
  pointer-events: none;
  /* Always laid out so it can be measured/positioned, but invisible until shown.
     The transition lives on .visible (below), so it fades IN when shown and
     snaps away instantly when hidden. */
  opacity: 0;
}

.tooltip.visible {
  opacity: 1;
  transition: opacity 0.15s ease;
}

/* ===== DIVIDER ===== */
.divider {
  height: 2px;
  background: #808080;
  border-bottom: 1px solid #dfdfdf;
  margin: 8px 0;
}

/* ===== SECTION LABEL ===== */
.section-label {
  font-family: heading;
  font-size: var(--font-heading);
  
  color: #000080;
  margin-bottom: 4px;
}

/* ===== BUTTONS ===== */
.btn-98 {
  padding: 4px 12px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #dfdfdf #404040 #404040 #dfdfdf;
  cursor: pointer;
  font-family: regular;
  font-size: var(--font-body);
}

.btn-98:active { border-color: #404040 #dfdfdf #dfdfdf #404040; }

/* ===== PLACEHOLDER TEXT ===== */
.coming-soon {
  color: #808080;
}

.no-results {
  color: #808080;
  padding: 12px;
}

/* ===== PROGRESS SEGMENT EMPTY ===== */
.progress-segment.empty {
  background: transparent;
}

/* ===== NOTIFICATIONS (minecraft-style) ===== */
#notification-container {
  /* Lives in #cursor-layer (fixed, full window), so this is window-relative: the toasts
     float just above the footer and hug the content column's right edge, at any scroll. */
  position: absolute;
  bottom: calc(var(--bar-height) + 8px);
  left: calc(50% - var(--width) / 2);
  width: calc(var(--width) - var(--scrollbar-width));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding-right: 8px;
  z-index: 900;
  pointer-events: none;
}

.notification-toast {
  background: rgba(26, 26, 46, 0.8);
  color: #fff;
  font-family: regular;
  font-size: var(--font-body);
  padding: 3px 8px;
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
}

.notification-toast.visible {
  opacity: 1;
}

.notification-toast.fading {
  opacity: 0;
  transition: opacity 0.5s;
}
         