/* TELEGRAM FEED */
.telegram-feed-container {
  padding: 10px;
  border: 1px solid #333;
  border-radius: 6px;
  margin-top: 10px;
  font-family: var(--terminal-font, 'SourceCode', monospace);
  font-size: 0.95em;
}

.telegram-feed-container strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.1em;
  color: var(--terminal-accent, #00FF00);
}

hr.tight-hr {
  border: 0;
  border-top: 1px solid #444;
  margin-top: 5px;
  margin-bottom: 15px;
}

.telegram-message-item {
  margin-bottom: 15px;
  padding-bottom: 10px;
}

.telegram-message-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.telegram-message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.telegram-user {
  color: var(--terminal-accent-dim, #00aa00);
  font-weight: bold;
}

.telegram-date {
  font-size: 0.8em;
  color: #777;
}

.telegram-message-text {
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.5;
  color: var(--terminal-foreground-dim, #ccc);
}

.telegram-message-media {
  margin-top: 8px;
}

.telegram-message-media img,
.telegram-message-media video {
  max-width: 100%;
  height: auto;
  max-height: 300px;
  border-radius: 4px;
  display: block;
  margin-top: 5px;
}

hr.faint-hr {
  border: 0;
  border-top: 1px solid #2f2f2f;
  margin-top: 10px;
  margin-bottom: 10px;
}

.telegram-message-text a {
  color: var(--terminal-link-color, #61dafb);
  text-decoration: underline;
}

.telegram-message-text a:hover {
  text-decoration: none;
}

.chat-header>div {
  min-width: 100%;
}




/* NEWS & FEEDS */

.news-output {
  white-space: normal;
  line-height: 1.5;
  font-family: var(--terminal-font);
}

.news-article {
  display: block;
  text-decoration: none;
  margin-bottom: 6px;
}

.news-article:hover {
  color: var(--color-secondary);
}

.news-article .source {
  display: block;
  font-size: 0.9em;
  opacity: 0.7;
  margin-top: 2px;
}

.news-separator {
  border-bottom: 1px dashed #444;
  margin: 10px 0;
  opacity: 0.4;
}

.weather-info {
  white-space: none;
  color: var(--color-text);
}

.archive-entry {
  margin-bottom: 10px;
  white-space: normal;
}

.archive-output a,
.concerts-output a {
  color: #33ff33;
  text-decoration: underline;
}

.events-container {
  color: var(--color-text);
}

.event-item {
  padding-bottom: 20px;
  border-bottom: 0px dashed #ccc;
}

.concert-entry {
  margin-bottom: 12px;
  white-space: normal;
}

.artist-output {
  white-space: normal;
  color: #888888;
}



/* INBOX / CHAT */

.inbox {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.msg {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-family: var(--terminal-font, monospace);
  transition: background 0.2s ease;
  white-space: normal;
}

.msg:hover {
  background: rgba(255, 255, 255, 0.08);
}

.msg-content {
  flex: 1;
  overflow: hidden;
  padding-left: 2px;
}

.msg-header {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 4px;
  color: #ccc;
}

.username {
  font-weight: bold;
  color: #fff;
  text-transform: lowercase;
}

.time {
  font-size: 0.8rem;
  color: #777;
}

.msg-body {
  color: #ddd;
  line-height: 1.4;
}

.msg-actions {
  margin-left: 10px;
}

.inline-thread-content {
  padding-left: 10px;
  font-size: 0.9em;
  margin-bottom: 12px;
}

.thread-messages-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.thread-status-indicators {
  display: inline-flex;
  align-items: center;
  margin-right: 3px;
}

.read-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 6px;
  flex-shrink: 0;
}

.read-status-dot.green {
  background-color: lime;
}

.read-status-dot.red {
  background-color: #dc3545;
}

.read-status-dot.grey {
  background-color: #adb5bd;
}

/* Bubbles */
.message-bubble-wrapper {
  display: flex;
  align-items: center;
  max-width: 90%;
}

.message-bubble-wrapper.message-other {
  align-self: flex-start;
}

.message-bubble-wrapper.message-self {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-bubble-container {
  display: flex;
  flex-direction: column;
}

.message-bubble-wrapper.message-self .message-bubble-container {
  align-items: flex-end;
}

.message-bubble-inline {
  padding: 8px 12px;
  border-radius: 18px;
  background-color: rgba(255, 255, 255, 0.08);
  word-break: break-word;
  text-align: left;
}

.message-bubble-wrapper.message-self .message-bubble-inline {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.message-footer {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 5px;
  padding: 0 5px;
}

.message-bubble-wrapper.message-self .message-footer {
  text-align: right;
}

.message-bubble-wrapper.message-other .message-footer {
  text-align: left;
}

.reply-btn,
.delete-msg-btn {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.reply-btn {
  color: #fff;
}

.delete-msg-btn {
  color: #ff5555;
}

.delete-msg-btn:hover {
  color: #ff0404;
}

.delete-inline-msg-btn {
  opacity: 0;
  width: 0;
  overflow: hidden;
  transition: width 0.2s ease, opacity 0.2s ease;
  margin: auto 0;
  cursor: pointer;
  height: 18px;
  line-height: 18px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}

.message-bubble-wrapper:hover .delete-inline-msg-btn {
  opacity: 1;
  width: 18px;
  margin: auto 5px;
}

.thread img,
.thread video,
.thread audio {
  max-width: 100%;
  display: block;
  margin-top: 8px;
  border: 1px solid #444;
  border-radius: 4px;
}

.hide-preview {
  display: none;
}

.new-message-alert {
  padding: 0px;
  margin-bottom: 5px;
  border-left: 0px solid #00ff66;
  background-color: transparent;
}

.new-message-alert .important {
  color: var(--color-important);
  font-weight: bold;
  padding: 10px;
  border-radius: 8px;
  /* 
  background-color: var(--opacity-10);
  box-shadow: var(--shadow-md);
  */
}

.new-message-alert .fa-bell {
  color: var(--color-important);
  margin-right: 8px;
  animation: notification-shake 0.82s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes notification-shake {

  10%,
  90% {
    transform: translateX(-1px);
  }

  20%,
  80% {
    transform: translateX(2px);
  }

  30%,
  50%,
  70% {
    transform: translateX(-4px);
  }

  40%,
  60% {
    transform: translateX(4px);
  }
}

.notification-shake {
  animation: notification-shake 0.82s cubic-bezier(.36, .07, .19, .97) both;
}




/* --- CLI Explore --- */

.explore-search-wrapper {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: monospace;
  font-size: 1.05em;
  transition: all 0.2s ease;
  background: #0000001f;
  box-shadow: inset 1px 1px 10px rgba(0, 0, 0, 0.3);
  color: #888;
  font-weight: normal;
}

.explore-directory-container {
  font-family: var(--terminal-font);
  width: 100%;
  white-space: normal;
}

.explore-directory-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--terminal-border);
  padding-bottom: 10px;
}

.explore-dir-title {
  color: var(--color-secondary);
  font-weight: bold;
  font-size: 1.1em;
}

.explore-dir-sub {
  color: var(--color-primary);
  font-size: 0.9em;
  margin-top: 4px;
}

.explore-dir-sort {
  background: var(--color-secondary);
  color: #111;
  padding: 4px 12px;
  font-weight: bold;
  font-size: 0.9em;
  cursor: pointer;
  border-radius: 2px;
}

.explore-tag-text {
  color: var(--color-secondary);
  font-weight: bold;
  font-family: var(--terminal-font);
  font-size: 1.1em;
  margin-bottom: 4px;
}

.explore-tag-count {
  color: var(--color-primary);
  font-size: 0.85em;
  font-family: var(--terminal-font);
}


/* --- CLI Post Container --- */
.cli-journal-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feed-filter-container {
  display: inline-flex;
  background: var(--opacity-white-05);
  border: 1px solid var(--terminal-border);
  padding: 4px;
  border-radius: 25px;
  gap: 2px;
  flex-wrap: wrap;
}

.feed-filter-btn {
  font: var(--terminal-font);
  margin-right: 15px;
  cursor: pointer;
  color: var(--color-secondary);
}

.feed-filter-btn:hover {
  color: var(--color-secondary);
}

.cli-post-card {
  border: 1px solid var(--terminal-border);
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 20px;
}

.cli-post-card:hover {
  border: 2px solid var(--color-secondary);
}

.cli-post-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--terminal-border);
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.cli-post-body {
  line-height: 1.6;
  color: var(--color-text);
  word-wrap: break-word;
}

.cli-post-footer {
  color: var(--color-text);
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--terminal-border);
  padding-top: 15px;
  margin-top: 15px;
  font-size: 0.9em;
}

/* --- Author Actions --- */
.action-toggle-pin {
  color: var(--color-primary);
  text-decoration: none;
  margin-right: 15px;
  cursor: pointer;
  visibility: show;
}

.action-toggle-private {
  color: var(--color-primary);
  text-decoration: none;
  margin-right: 15px;
  cursor: pointer;
  display: none;
}

.action-edit {
  color: var(--color-primary);
  text-decoration: none;
  margin-right: 15px;
  cursor: pointer;
  display: none;
}

.action-delete {
  color: var(--color-primary);
  text-decoration: none;
  margin-right: 15px;
  cursor: pointer;
  display: none;
}

.action-delete:hover {
  color: #ff5555;
}

/* --- Global Actions --- */
.action-view-comments {
  color: var(--color-primary);
  text-decoration: none;
  margin-right: 15px;
  cursor: pointer;
}

.action-comment-toggle {
  color: var(--color-text);
  text-decoration: none;
  cursor: pointer;
}

.action-mute-post {
  color: var(--color-primary);
  text-decoration: none;
  margin-right: 15px;
  cursor: pointer;
  display: none;
}

.action-unwatch-post {
  color: var(--color-primary);
  text-decoration: none;
  margin-right: 15px;
  cursor: pointer;
  display: none;
}

.action-toggle-watch {
  color: var(--color-primary);
  text-decoration: none;
  margin-right: 15px;
  cursor: pointer;
  display: none;
}

.action-toggle-save {
  color: var(--color-magenta);
  text-decoration: none;
  margin-right: 15px;
  cursor: pointer;
  display: show;
}

.action-report {
  color: var(--color-primary);
  text-decoration: none;
  margin-right: 15px;
  cursor: pointer;
  display: none;
}

.action-report:hover {
  color: #ff5555;
}


/* --- Metadata & Labels --- */
.cli-post-meta {
  color: var(--color-text);
}

.cli-post-user {
  color: var(--color-secondary);
  font-weight: bold;
}

.cli-post-tags {
  margin-top: 15px;
  color: var(--color-secondary);
  font-size: 0.85em;
}

.cli-post-tag {
  margin-right: 10px;
  padding: 2px 6px;
  background: transparent;
  border-radius: 16px;
  border: 1px solid var(--color-secondary);
}


/* --- Comments & Inputs --- */
.cli-post-comments {
  display: none;
  margin-top: 15px;
  border-top: 1px dashed #444;
  padding-top: 15px;
}

.cli-post-comment-list {
  margin-bottom: 12px;
  padding: 10px;
  background: var(--opacity-white-05);
  border-left: 0px solid #555;
  border-radius: 4px;
}

.cli-inline-comment {
  display: none;
  margin-top: 15px;
  border-top: 1px dashed var(--terminal-border);
  padding-top: 15px;
}

.cli-comment-input {
  width: 98%;
  background: var(--opacity-10);
  color: var(--color-text);
  border: 1px solid var(--terminal-border);
  padding: 8px;
  border-radius: 4px;
  font-family: var(--terminal-font);
  resize: vertical;
  min-height: 60px;
}

.cli-comment-list {
  display: none;
  margin-top: 15px;
  border-top: 1px dashed var(--terminal-border);
  padding-top: 15px;
}

.cli-post-reply {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--terminal-border);
}

.cli-reply-input {
  width: 98%;
  background: var(--opacity-10);
  color: #eee;
  border: 1px solid var(--terminal-border);
  padding: 6px;
  border-radius: 4px;
  font-family: var(--terminal-font);
  resize: vertical;
  min-height: 40px;
  font-size: 0.9em;
}

.cli-comment-item {
  margin-bottom: 12px;
  padding: 10px;
  background: var(--opacity-white-05);
  border-left: 0px solid #555;
  border-radius: 0px;

  margin-bottom: 12px;
  border-left: 2px solid var(--color-secondary);
  padding-left: 10px;
}



/* --- Buttons --- */
.cli-submit-btn {
  background: var(--color-secondary);
  color: #000;
  border: 0px solid #555;
  padding: 6px 14px;
  cursor: pointer;
  border-radius: 6px;
}

.reply-submit-btn {
  background: var(--color-secondary);
  color: #000;
  border: 0px solid #555;
  padding: 6px 14px;
  cursor: pointer;
  border-radius: 6px;
}

/* Container that acts as the pill outline */
.edit-button-pill {
  display: inline-flex;
  align-items: center;
  background-color: var(--color-secondary);
  /* Matches the beige in your image */
  border: 0px solid #000;
  border-radius: 6px;
  overflow: hidden;
  /* Keeps the hover effect inside the rounded corners */
}

/* Base styling for both buttons inside the pill */
.edit-button-pill button {
  background: transparent;
  border: none;
  color: #000;
  font-family: monospace;
  /* Matches the retro/typewriter font in the image */
  font-size: 0.9em;
  padding: 6px 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

/* Subtle hover effect */
.edit-button-pill button:hover {
  background-color: rgba(0, 0, 0, 0.08);
}

/* The vertical separator line */
.edit-button-pill .pill-divider {
  width: 1px;
  height: 18px;
  /* Slightly shorter than the button to look like a separator */
  background-color: rgba(255, 255, 255, 0.2);
}

/* WHOIS OUTPUT */

.whois {
  padding-left: 2px;
  margin: 0px;
}

.whois-card {
  background: var(--terminal-bg);
  white-space: normal;
  color: var(--terminal-output);
  padding: 15px;
  font-family: var(--terminal-font);
  border-radius: 4px;
  max-width: 100%;
  margin: 10px 0;
}

.whois-card pre {
  white-space: pre-wrap;
}

.whois-card button {
  color: var(--terminal-output);
  background: none;
  border: 1px solid var(--terminal-output);
  padding: 4px 12px;
  cursor: pointer;
  font-family: var(--terminal-font);
  font-weight: bold;
  border-radius: 26px;
}

.whois-card button:hover {
  color: var(--color-secondary);
  border: 1px solid var(--color-secondary);
}

.whois-badge {
  background: var(--color-secondary);
  color: #000;
  padding: 0 5px;
  font-size: 0.8em;
  font-weight: bold;
  margin-left: 1px;
  border-radius: 2px;
}

.user-card {
  background: red;
}

/* ==========================================================================
    SPINNERS
   ========================================================================== */

.export-spinner-wrapper {
  display: flex;
  /* inline-flex hugs the content better than block flex */
  align-items: center;
  gap: 8px;
  /* Tightened the gap from 12px to match standard icon spacing */
  margin-top: 0px;
  margin-bottom: 0px;
  padding-left: 0px;
  white-space: nowrap;
  line-height: 1;
}

/* Text Styling */
.processing-text {
  color: inherit;
  /* Inherit your terminal's native text color */
  font-family: inherit;
  /* Inherit your terminal's native font */
  font-size: inherit;
  /* Fixes the oversized text */
  letter-spacing: normal;
  /* Removes the stretched look */
  animation: pulse 1.5s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* Scaled down tightly to match standard terminal text cap-height (8px wide x 13px tall) */
.dot-spinner {
  position: relative;
  width: 8px;
  height: 13px;
  transform: translateY(1px);
  /* Slight nudge down to perfectly align with text center */
}

.dot-spinner::after {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  width: 3px;
  /* Tiny, crisp dots to match terminal pixels */
  height: 3px;
  border-radius: 50%;
  background-color: transparent;
  --on: var(--color-secondary);
  --off: transparent;
  /* 12 frames at ~80ms per frame = 0.96s total duration */
  animation: block-spin 0.96s step-end infinite;
}

/* Tighter grid coordinates:
  Left Column: 10px   Right Column: 15px
  Top Row: 10px       Mid Row: 15px      Bot Row: 20px */
@keyframes block-spin {
  0% {
    /* 3 dots left */
    box-shadow:
      10px 10px var(--on), 15px 10px var(--off),
      10px 15px var(--on), 15px 15px var(--off),
      10px 20px var(--on), 15px 20px var(--off);
  }

  8.33% {
    /* Stretch to Top-Right */
    box-shadow:
      10px 10px var(--on), 15px 10px var(--on),
      10px 15px var(--on), 15px 15px var(--off),
      10px 20px var(--on), 15px 20px var(--off);
  }

  16.66% {
    /* Pull tail up */
    box-shadow:
      10px 10px var(--on), 15px 10px var(--on),
      10px 15px var(--on), 15px 15px var(--off),
      10px 20px var(--off), 15px 20px var(--off);
  }

  25% {
    /* Stretch to Mid-Right */
    box-shadow:
      10px 10px var(--on), 15px 10px var(--on),
      10px 15px var(--on), 15px 15px var(--on),
      10px 20px var(--off), 15px 20px var(--off);
  }

  33.33% {
    /* Pull tail up */
    box-shadow:
      10px 10px var(--on), 15px 10px var(--on),
      10px 15px var(--off), 15px 15px var(--on),
      10px 20px var(--off), 15px 20px var(--off);
  }

  41.66% {
    /* Stretch to Bot-Right */
    box-shadow:
      10px 10px var(--on), 15px 10px var(--on),
      10px 15px var(--off), 15px 15px var(--on),
      10px 20px var(--off), 15px 20px var(--on);
  }

  50% {
    /* 3 dots right */
    box-shadow:
      10px 10px var(--off), 15px 10px var(--on),
      10px 15px var(--off), 15px 15px var(--on),
      10px 20px var(--off), 15px 20px var(--on);
  }

  58.33% {
    /* Stretch to Bot-Left */
    box-shadow:
      10px 10px var(--off), 15px 10px var(--on),
      10px 15px var(--off), 15px 15px var(--on),
      10px 20px var(--on), 15px 20px var(--on);
  }

  66.66% {
    /* Pull tail down */
    box-shadow:
      10px 10px var(--off), 15px 10px var(--off),
      10px 15px var(--off), 15px 15px var(--on),
      10px 20px var(--on), 15px 20px var(--on);
  }

  75% {
    /* Stretch to Mid-Left */
    box-shadow:
      10px 10px var(--off), 15px 10px var(--off),
      10px 15px var(--on), 15px 15px var(--on),
      10px 20px var(--on), 15px 20px var(--on);
  }

  83.33% {
    /* Pull tail down */
    box-shadow:
      10px 10px var(--off), 15px 10px var(--off),
      10px 15px var(--on), 15px 15px var(--off),
      10px 20px var(--on), 15px 20px var(--on);
  }

  91.66% {
    /* Stretch to Top-Left */
    box-shadow:
      10px 10px var(--on), 15px 10px var(--off),
      10px 15px var(--on), 15px 15px var(--off),
      10px 20px var(--on), 15px 20px var(--on);
  }

  100% {
    /* Loop back to start */
    box-shadow:
      10px 10px var(--on), 15px 10px var(--off),
      10px 15px var(--on), 15px 15px var(--off),
      10px 20px var(--on), 15px 20px var(--off);
  }
}

/* Circle Spinner */
.circle-spinner {
  width: 14px;
  height: 14px;
  background-color: transparent;
  border: 2px solid rgba(0, 255, 204, 0.2);
  border-top-color: #00ffcc;
  border-right-color: #00ffcc;
  border-radius: 50%;
  animation: spin-ring 0.8s linear infinite;
}

@keyframes spin-ring {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}
