/* Dedicated CSS file for Notes and Logs - Override all inheritance */

.notes-logs-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.notes-logs-single {
  margin: 0 0 2rem;
}

.notes-logs-container .note-box,
.notes-logs-container .log-box,
.notes-logs-single .note-box,
.notes-logs-single .log-box {
  background: var(--text-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notes-logs-container .note-box,
.notes-logs-container .log-box {
  height: 500px;
}

.notes-logs-single .note-box,
.notes-logs-single .log-box {
  min-height: 320px;
}

.notes-logs-container h3,
.notes-logs-single h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  color: var(--read-text);
}

.notes-logs-container .note-content,
.notes-logs-container .log-content,
.notes-logs-single .note-content,
.notes-logs-single .log-content {
  flex: 1;
  overflow: hidden;
  text-indent: 0 !important;
  margin: 0 0 1rem 0 !important;
  padding: 0 !important;
  position: relative;
}

/* Add fade effect at bottom */
.notes-logs-container .note-content::after,
.notes-logs-container .log-content::after,
.notes-logs-single .note-content::after,
.notes-logs-single .log-content::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3rem;
  background: linear-gradient(to bottom, transparent, var(--text-bg));
  pointer-events: none;
}

.notes-logs-container .note-content p,
.notes-logs-container .log-content p,
.notes-logs-single .note-content p,
.notes-logs-single .log-content p {
  text-indent: 0 !important;
  margin-bottom: 1em;
}

/* List styling to make bullets visible */
.notes-logs-container .note-content ul,
.notes-logs-container .log-content ul,
.notes-logs-single .note-content ul,
.notes-logs-single .log-content ul {
  list-style-type: disc !important;
  padding-left: 1.5rem !important;
  margin-bottom: 1em;
}

.notes-logs-container .note-content ol,
.notes-logs-container .log-content ol,
.notes-logs-single .note-content ol,
.notes-logs-single .log-content ol {
  list-style-type: decimal !important;
  padding-left: 1.5rem !important;
  margin-bottom: 1em;
}

.notes-logs-container .note-content li,
.notes-logs-container .log-content li,
.notes-logs-single .note-content li,
.notes-logs-single .log-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Center images and constrain size */
.notes-logs-container .note-content img,
.notes-logs-container .log-content img,
.notes-logs-single .note-content img,
.notes-logs-single .log-content img {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 100% !important;
  max-height: 200px !important;
  width: auto !important;
  height: auto !important;
  text-indent: 0 !important;
}

/* Avatar images should NOT be centered */
.notes-logs-container .avatar,
.notes-logs-single .avatar {
  display: inline-block !important;
  margin: 0 !important;
}

.notes-logs-container .metadata,
.notes-logs-single .metadata {
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.notes-logs-container .date,
.notes-logs-single .date {
  display: block;
  font-size: 0.9em;
  margin-bottom: 0.5rem;
  color: var(--body-txt);
}

.notes-logs-container .syndicate,
.notes-logs-single .syndicate {
  margin-bottom: 0.5rem;
  font-size: 0.9em;
}

.notes-logs-container .syndicate i,
.notes-logs-single .syndicate i {
  margin-right: 0.5rem;
}

.notes-logs-container .syndicate span,
.notes-logs-single .syndicate span {
  margin-right: 0.5rem;
}

.notes-logs-container .tags,
.notes-logs-single .tags {
  margin-bottom: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  overflow: visible;
}

.notes-logs-container .tags span,
.notes-logs-single .tags span {
  background: var(--tag-bg-color);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.85em;
  white-space: nowrap;
}

.notes-logs-container .view-share,
.notes-logs-single .view-share {
  font-size: 0.9em;
  text-align: right;
}

.notes-logs-container .small-link,
.notes-logs-single .small-link {
  color: #00d9ff;
  text-decoration: none;
}

.notes-logs-container .small-link-button,
.notes-logs-single .small-link-button {
  color: #00d9ff;
  text-decoration: none;
}

.notes-logs-container .small-link:hover,
.notes-logs-single .small-link:hover {
  text-decoration: underline;
}

.notes-logs-container .small-link-button:hover,
.notes-logs-single .small-link-button:hover {
  text-decoration: underline;
}

/* Transmission widget in note slot */
.notes-logs-container .transmission-content {
  overflow: hidden;
}

.notes-logs-container .transmission-mode {
  margin: 0 0 0.6rem 0;
  font-family: "Fira Mono", "VT323", monospace;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  color: var(--feed-text);
}

.notes-logs-container .transmission-body {
  margin: 0;
  max-width: 100%;
  height: calc(100% - 3rem);
  overflow: hidden;
  padding: 0.75rem 0.85rem;
  box-sizing: border-box;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  text-indent: 0 !important;
  line-height: 1.55;
  font-family: "Fira Mono", "VT323", monospace;
  font-size: 1rem;
  color: var(--body-txt);
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(8, 8, 8, 0.2);
}

.notes-logs-container .transmission-seed {
  margin: 0.6rem 0 0 0;
  font-size: 0.82rem;
  color: var(--excerpt-text);
  opacity: 0.9;
  font-family: "Fira Mono", monospace;
}

.notes-logs-container .transmission-box .tags {
  gap: 0.4rem;
}

/* Light Mode Support */
.light-mode .notes-logs-container .note-box,
.light-mode .notes-logs-container .log-box,
.light-mode .notes-logs-single .note-box,
.light-mode .notes-logs-single .log-box {
  background: #f5f5f5;
  border: 1px solid #ccc;
  color: #000;
}

.light-mode .notes-logs-container h3,
.light-mode .notes-logs-single h3 {
  color: #333;
}

.light-mode .notes-logs-container .date,
.light-mode .notes-logs-single .date {
  color: #555;
}

.light-mode .notes-logs-container .metadata,
.light-mode .notes-logs-single .metadata {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.light-mode .notes-logs-container .note-content::after,
.light-mode .notes-logs-container .log-content::after,
.light-mode .notes-logs-single .note-content::after,
.light-mode .notes-logs-single .log-content::after {
  background: linear-gradient(to bottom, transparent, #f5f5f5);
}

.light-mode .notes-logs-container .tags span,
.light-mode .notes-logs-single .tags span {
  background: #e0e0e0;
  color: #555;
}

.light-mode .notes-logs-container .small-link,
.light-mode .notes-logs-single .small-link {
  color: #000;
  text-decoration: underline;
}

.light-mode .notes-logs-container .transmission-mode {
  color: #2b6f9a;
}

.light-mode .notes-logs-container .transmission-body {
  color: #111;
  border-color: rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.45);
}

.light-mode .notes-logs-container .transmission-seed {
  color: #666;
}

@media (max-width: 768px) {
  .notes-logs-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .notes-logs-container .note-box,
  .notes-logs-container .log-box {
    height: auto;
    max-height: 500px;
    min-height: 300px;
  }

  .notes-logs-container .note-content img,
  .notes-logs-container .log-content img {
    max-width: 100% !important;
    max-height: 180px !important;
  }

  .notes-logs-container h3 {
    font-size: 1.1rem;
  }

  .notes-logs-container .syndicate span {
    display: inline-block;
    margin-bottom: 0.3rem;
  }

  .notes-logs-single .note-box,
  .notes-logs-single .log-box {
    height: auto;
    min-height: 260px;
  }
}

/* Custom Emoji Styling - Fix for Akkoma emojis displaying too large */
/* Highest specificity to override main.css .combined-post-content p img rule */
.combined-post-content p img.emoji,
.note-content p img.emoji,
.log-content p img.emoji,
.combined-post-content img.emoji,
.note-content img.emoji,
.log-content img.emoji,
img.emoji.emoji,
img[src*="/text_media/emojis/"],
img[alt^=":"][alt$=":"] {
  display: inline !important;
  height: 1.2em !important;
  width: 1.2em !important;
  max-height: 1.2em !important;
  max-width: 1.2em !important;
  vertical-align: -0.1em !important;
  margin: 0 0.15em !important;
  object-fit: contain !important;
  border: none !important;
  background: none !important;
  padding: 0 !important;
  float: none !important;
  clear: none !important;
  line-height: 1 !important;
  opacity: 1 !important;
  visibility: visible !important;
}
