/* =============================================
   academic.css
   Purpose: File explorer styles for
   Academic Projects window.
============================================= */


/* ----------------------------
   EXPLORER CONTAINER
   ---------------------------- */
.explorer-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  position: relative;
  /*
    position: relative so the context menu
    and modal can position against it.
  */
}


/* ----------------------------
   TOOLBAR — path + count
   ---------------------------- */
.explorer-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: linear-gradient(
    to bottom,
    #FFB6C1,
    #FF6EB4
  );
  border-bottom: 1px solid var(--pixel-dark);
  color: white;
  font-size: 0.55rem;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.explorer-count {
  opacity: 0.8;
}


/* ----------------------------
   COLUMN HEADERS
   ---------------------------- */
.explorer-header {
  display: grid;
  grid-template-columns: 2fr 0.8fr 0.8fr 0.9fr 2fr 0.6fr 1fr;
  /*
    Each column gets a proportional width.
    2fr = twice as wide as 1fr.
    Name and Vibe get more space since they have longer text.
  */
  padding: 5px 10px;
  background: #f0e8e8;
  border-bottom: 2px solid var(--pixel-dark);
  color: #888;
  letter-spacing: 1px;
  font-size: 0.5rem;
  flex-shrink: 0;
}


/* ----------------------------
   FILE ROWS
   ---------------------------- */
.explorer-files {
  flex: 1;
  overflow-y: auto;
}

.explorer-row {
  display: grid;
  grid-template-columns: 2fr 0.8fr 0.8fr 0.9fr 2fr 0.6fr 1fr;
  /*
    Must match .explorer-header exactly —
    same columns, same widths.
  */
  padding: 7px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  align-items: center;
  cursor: pointer;
  transition: background 0.1s;
  color: var(--pixel-dark);
}

.explorer-row:hover {
  background: rgba(255, 110, 180, 0.08);
}

.explorer-row.selected {
  background: rgba(255, 110, 180, 0.18);
  color: #880E4F;
}


/* ----------------------------
   FILE ICON
   ---------------------------- */
.file-icon {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

.col-name {
  display: flex;
  align-items: center;
}


/* ----------------------------
   STATUS BADGES
   ---------------------------- */
.status-complete {
  color: #2D6A2D;
}

.status-wip {
  color: #C2185B;
}


/* ----------------------------
   DIFFICULTY BAR
   ---------------------------- */
.diff-bar {
  width: 60px;
  height: 8px;
  background: #e0d0d0;
  border: 1px solid #ccc;
  display: block;
  overflow: hidden;
}

.diff-fill {
  height: 100%;
  background: linear-gradient(
    to right,
    #FF6EB4,
    #FF1493
  );
  display: block;
  /*
    Width is set inline in HTML per project.
    40% = 2 stars, 60% = 3 stars,
    80% = 4 stars, 100% = 5 stars.
  */
}


/* ----------------------------
   CONTEXT MENU
   Right-click popup menu.
   ---------------------------- */
.context-menu {
  position: fixed;
  background: #fffdf7;
  border: 2px solid var(--pixel-dark);
  box-shadow: 3px 3px 0px var(--pixel-dark);
  display: none;
  flex-direction: column;
  z-index: 9000;
  min-width: 160px;
  /*
    position: fixed so it positions relative
    to the viewport, not the window content.
    Means it won't get clipped by overflow.
  */
}

.context-menu.visible {
  display: flex;
}

.context-item {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--pixel-dark);
  padding: 8px 12px;
  text-align: left;
  letter-spacing: 1px;
  transition: background 0.1s;
  cursor: pointer;
}

.context-item:hover {
  background: rgba(255, 110, 180, 0.15);
  color: #880E4F;
}

.context-divider {
  height: 1px;
  background: #ddd;
  margin: 2px 0;
}


/* ----------------------------
   PROPERTIES MODAL
   ---------------------------- */
.properties-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9500;
}

.properties-modal.visible {
  display: flex;
}

.properties-box {
  background: #fffdf7;
  border: 3px solid var(--pixel-dark);
  box-shadow: 4px 4px 0px var(--pixel-dark);
  width: 260px;
  font-family: var(--font-pixel);
}

.properties-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: linear-gradient(135deg, #FF6EB4, #FF1493);
  color: white;
  font-size: 0.65rem;
  letter-spacing: 2px;
  border-bottom: 2px solid var(--pixel-dark);
}

.properties-close {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: white;
  cursor: pointer;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.5);
  padding: 2px 6px;
}

.properties-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prop-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
  padding-bottom: 6px;
  font-size: 0.55rem;
}

.prop-label {
  color: #888;
  letter-spacing: 1px;
}

.prop-value {
  color: var(--pixel-dark);
  text-align: right;
}

/* ----------------------------
   README WINDOW
   Project detail view.
   ---------------------------- */
.readme-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.readme-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--pixel-dark);
  padding-bottom: 10px;
}

.readme-title {
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  color: var(--pink-primary);
  letter-spacing: 2px;
}

.readme-section h3 {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: #888;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.readme-section p {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--pixel-dark);
  line-height: 1.8;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-tag {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  background: rgba(255, 110, 180, 0.15);
  border: 1px solid var(--pink-primary);
  color: var(--pink-primary);
  padding: 3px 8px;
  letter-spacing: 1px;
}

.dev-note {
  font-style: italic;
  border-left: 3px solid var(--pink-primary);
  padding-left: 10px;
  color: #555 !important;
}

.vibe-text {
  color: var(--pink-primary) !important;
  font-style: italic;
}

.readme-buttons {
  display: flex;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #eee;
}

.readme-btn {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  padding: 6px 14px;
  border: 2px solid var(--pixel-dark);
  background: var(--cream);
  cursor: pointer;
  letter-spacing: 1px;
  transition: background 0.1s;
}

.readme-btn:hover:not([disabled]) {
  background: rgba(255, 110, 180, 0.15);
}

.readme-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}