/* Clean Minimalist Journal Styles */

/* Common Elements */
* {
  box-sizing: border-box;
}

#atl_container, .atl_container {
  width: 512px;
  height: 512px;
  background-color: rgb(0, 26, 53);
  z-index: 200;
  aspect-ratio: 1/1;
  position: relative;
  margin-top: 100px;
  transition: width 0.3s ease, height 0.3s ease, margin 0.3s ease;
  margin: 100px auto;
  /* Base font-size: 16px for 512px container = 3.125% of container height */
  font-size: 16px;
}

#atl_container.fullscreen, .atl_container.fullscreen {
  width: auto;
  height: calc(100vh - 130px);
  margin-top: 30px;
  margin-left: auto;
  margin-right: auto;
  /* Scale font proportionally: (height / 512) * 16px */
  font-size: calc((100vh - 130px) * 0.03125);
}

.atl_container .text-content {
  margin:0;
  padding: 0;
  max-width: 100%;
  height: 100%;
  overflow-y: scroll;
  width: fit-content;
  font-family: 'twoup', monospace;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: pre-wrap;
  font-size: 1em;
  border-radius: 0;
  transition: font-size 0.3s ease;
  color: #fff;
}

.atl_container .text-content h1 {
  font-size: 1em;
  margin: 0;
  padding: 0;
}

.atl_container .text-content p {
  font-size: 1em;
  margin: 0;
  padding: 0;
}

.fullscreen-chat {
  position: absolute;
  right: -30px;
  top: 0;
  cursor: pointer;
  transition: transform 0.3s ease;
  pointer-events: auto;
}

.fullscreen-chat:hover {
  transform: scale(1.1);
}

.fullscreen-chat.active {
  transform: rotate(45deg);
}

.fullscreen-chat.active:hover {
  transform: rotate(45deg) scale(1.1);
}
.journal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.journal-header > div {
  flex: 1;
}

.journal-header .previous_date {
  text-align: left;
}

.journal-header .date-meta {
  text-align: center;
}

.journal-header .next_day {
  text-align: right;
}

/* Archive Table */
.journal-archive {
  margin-bottom: 3vw;
  margin-left: -16px;
  margin-right: -16px;
}

.archive-header {
  padding: 1vw;
}

.journal-table {
  width: 70ch;
  /* margin: 0 auto; */
  font-size: clamp(16px, 1.25vw, 30px);
  margin: 4vw 1vw;
  border-collapse: collapse;
}

.journal-table th {
  text-align: left;
  padding: 16px;
  border-bottom: 1px solid #000;
  font-weight: normal;
  text-transform: uppercase;
  font-size: 16px;
  font-family: "routed-gothic--narrow";
  /* background-color: #f5f9f8; */
}

.journal-table td {
  padding: 8px;
  border-bottom: 1px solid #000;
}

/* Table styles with alternating rows using nth-child */
/* .journal-table tr:nth-child(odd) {
  background-color: #e2eceb;
}

.journal-table tr:nth-child(even) {
  background-color: #f5f9f8;
} */

/* Make sure the hover state works correctly */
.journal-row:hover {
  background-color: rgba(255, 255, 255, 0.7) !important; /* Override the nth-child background */
}

.journal-row {
  cursor: pointer;
  transition: background 0.2s ease;
}

.journal-row:hover {
  background: #fff;
}

.journal-date {
  width: 23%;
  /* font-size: 19px; */
}

.journal-title {
  width: 65%;
  text-transform: uppercase;
  /* font-size: 19px; */
}

.journal-metrics {
  width: 15%;
}

.metrics-badge {
  display: inline-block;
  /* background: #f0f0f0; */
  /* padding: 0.3em 0.6em; */
  margin-left: 8px;
  border-radius: 3px;
}

.metrics-badge i {
  margin-right: 0.4em;
  opacity: 0.7;
}

/* Timeline Navigation */
.journal-timeline {
  margin-top: 3vw;
}

.year-group {
  margin-bottom: 3vw;
}

.year-header {
  font-size: 1.3em;
  font-weight: normal;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5vw;
  margin-bottom: 1.5vw;
}

.month-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5vw;
}

.month-card {
  border: 1px solid #eee;
  margin-bottom: 1.5vw;
}

.month-header {
  padding: 0.8vw 1vw;
  background: #f9f9f9;
  border-bottom: 1px solid #eee;
}

.month-header h4 {
  font-size: 1em;
  font-weight: normal;
  margin: 0;
}

.entry-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.entry-item {
  border-bottom: 1px solid #eee;
}

.entry-item:last-child {
  border-bottom: none;
}

.entry-link {
  display: flex;
  align-items: center;
  padding: 0.8vw 1vw;
  text-decoration: none;
  color: #333;
  transition: background 0.2s ease;
}

.entry-link:hover {
  background: #f5f5f5;
  color: #000;
}

.day-badge {
  display: inline-block;
  background: #f0f0f0;
  width: 2em;
  height: 2em;
  line-height: 2em;
  text-align: center;
  margin-right: 0.8vw;
  font-family: 'Courier New', monospace;
  font-weight: normal;
}

.entry-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Journal Entry Page */
.back-link {
  display: inline-block;
  margin-bottom: 2vw;
  text-decoration: none;
  color: #555;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: #000;
}

.back-link i {
  margin-right: 0.5em;
}



@media screen and (max-width: 768px) {
  .journal-layout {
    grid-template-columns: 1fr;
  }

  .journal-table {
    width: 100%;
  }

  .journal-header {
    display: block;    
  }
  .journal-header .hide-mobile {
    display: none;
  }

  .journal-header .date-meta {
    text-align: center;
  }

  .journal-header div { 
    margin-bottom: 1vw;
  }

  .next_day {
    text-align: right;
  }

  #atl_container, .atl_container {
    margin-top: 50px;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1/1 !important;
    font-size: 18px;    
  }

  .atl_container .text-content {
    font-size: 18px;
  }

  .atl_container .text-content h1 {
    font-size: 18px;
  }

  .atl_container .text-content p {
    font-size: 18px;
  }
  
}
