/* =========================================================
   SHARED: Global Resets & Layout
   ========================================================= */
* { box-sizing: border-box; }

.streams-layout {
  display: flex;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  margin: 20px auto;
  gap: 20px;
  padding: 0 20px;
}

.streams-main {
  flex: 1;
  min-width: 0; /* Prevents flex overflow */
}

/* =========================================================
   SHARED: Sidebar Navigation
   ========================================================= */
.streams-sidebar {
  width: 200px;
  background: #111;
  border-radius: 10px;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 70px;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-group-title {
  padding: 10px 16px 4px;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #777;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-item {
  background: transparent;
  border: none;
  color: #eee;
  text-align: left;
  padding: 10px 16px;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.sidebar-item:hover { background: #1d1d1d; }
.sidebar-item.active { background: #007bff; color: #fff; }

/* Toggle button (Mobile) */
.sidebar-toggle {
  display: none;
  width: 100%;
  background: #111;
  color: #eee;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
  justify-content: space-between;
  align-items: center;
}
.sidebar-toggle .chev { opacity: 0.8; transition: transform 0.15s ease; }

/* =========================================================
   SHARED: Tabs & Tools
   ========================================================= */
.notes-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}



.notes-tab {
  background: transparent;
  border: none;
  color: #eee;
  text-align: left;
  padding: 10px 16px;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.notes-tab:hover { background: #1d1d1d; }
.notes-tab.active { background: #007bff; color: #fff; }


.notes-tabs-tools { margin-left: auto; display: flex; gap: 8px; }
.notes-tab-tool {
  width: 46px; height: 34px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: inherit; font-weight: 800; cursor: pointer; line-height: 1;
}
.notes-tab-tool:hover { background: rgba(255,255,255,0.10); }

.notes-tab-desc {
  text-align: center; margin: 0 0 18px; color: #cfcfcf; font-size: 14px;
}
#notes-status {
  text-align: center; margin: 10px 0 18px; color: #ccc; font-size: 14px;
}

/* =========================================================
   SHARED: Composer
   ========================================================= */
.notes-compose {
  background: #111;
  border: 1px solid #222;
  border-radius: 10px;
  padding: 12px;
  margin: 0 auto 18px;
  max-width: 820px;
}

.notes-compose textarea {
  width: 100%; min-height: 80px; resize: vertical; padding: 10px;
  border-radius: 8px; border: 1px solid #333; background: #000; color: #fff; outline: none;
}

.notes-compose-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.notes-publish-btn {
  background: #0a84ff; border: none; color: #fff; padding: 8px 12px;
  border-radius: 8px; cursor: pointer;
}
.notes-publish-btn:hover { filter: brightness(1.05); }

.notes-compose-status { color: #bbb; font-size: 13px; }
.notes-compose-hint { margin-top: 8px; color: #aaa; font-size: 12px; }

.notes-compose-panel {
  margin: 10px 0 14px; padding: 10px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10); background: rgba(255,255,255,0.04);
}
.notes-compose-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 8px;
}
.notes-compose-panel-title { font-weight: 700; opacity: 0.9; }
.notes-compose-close {
  border: none; background: transparent; color: inherit;
  opacity: 0.7; cursor: pointer; font-size: 16px;
}
.notes-compose-close:hover { opacity: 1; }

/* =========================================================
   SHARED: Note Cards & Feed
   ========================================================= */
.notes-feed {
  max-width: 820px; display: flex; flex-direction: column;
  gap: 12px; padding-bottom: 30px;
}

.note-card {
  background: #111; border: 1px solid #222; border-radius: 10px; padding: 12px;
}

.note-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.note-avatar {
  width: 44px; height: 44px; border-radius: 999px; object-fit: cover;
  background: #222; border: 1px solid #333;
}
.note-avatar[data-copy], .note-name[data-copy], .meta-id { cursor: pointer; }

.note-who { display: flex; flex-direction: column; line-height: 1.1; }
.note-name {
  font-weight: 600; color: #fff; font-size: 14px;
  display: inline-block; padding: 2px 6px; border-radius: 8px;
}
.note-name:hover, .meta-id:hover { background: rgba(255,255,255,0.06); }

.note-meta { display: flex; align-items: center; gap: 8px; color: #aaa; font-size: 12px; flex-wrap: wrap; }
.meta-id { display: inline-block; padding: 2px 6px; border-radius: 8px; opacity: 0.85; }
.meta-id:hover { opacity: 1; text-decoration: underline; }

/* Body */
.note-body {
  color: #eee; font-size: 14px; line-height: 1.45;
  word-break: break-word;
}
.note-line { margin: 2px 0; }
.note-line-empty { height: 8px; }

/* DMs arrows */
.note-body dm-arrow { color: #eee; }
.dm-arrow {
  text-align: center; opacity: 0.75; font-size: 14px; padding: 6px 0;
}
.note-body .zap-sats { color: #f7931a; font-weight: 800; }

/* Actions */
.note-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.note-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border-radius: 999px; font-size: 13px; text-decoration: none;
  background: #222; color: #eee; border: 1px solid #444; cursor: pointer;
}
.note-pill:hover { background: #333; border-color: #ff9900; color: #fff; }

/* Stats */
.note-stats {
  display: flex; gap: 6px; margin-top: 10px; padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 17px; opacity: 0.95;
}
.note-stat { white-space: nowrap; }
.sats-symbol { color: #f7931a; font-weight: 800; margin-right: 2px; }
.note-stat-sats { font-weight: 600; letter-spacing: 0.1px; }

.video-stats .note-stats,
.note-inline-video .note-stats {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.note-time-bottom { margin-top: 6px; font-size: 13px; opacity: 0.75; text-align: right; }

/* Images */
.note-inline-img { margin: 10px 0; line-height: 0; }
.note-img {
  max-width: 420px; width: 100%; height: auto;
  border-radius: 10px; display: block;
}

.note-img-source{
  margin: 6px 0 0 0;
  font-size: 12px;
  opacity: 0.85;
  line-height: 1.2;
  word-break: break-all;
  text-align: left;
}
.note-source-link{
  text-decoration: underline;
}

.note-img-source a { color: inherit; text-decoration: none; }
.note-img-source a:hover { text-decoration: underline; }
.note-img-click { display: inline-block; text-decoration: none !important; border: 0 !important; outline: 0 !important; }

/* Embeds */
.note-embed {
  margin-top: 10px; padding: 10px; border-radius: 10px;
  border: 1px solid #333; background: #0b0b0b;
}
.note-embed-missing { color: #aaa; font-size: 13px; }
.note-embed-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.note-embed-avatar {
  width: 34px; height: 34px; border-radius: 999px; object-fit: cover;
  background: #222; border: 1px solid #333;
}
.note-embed-name { font-weight: 600; color: #fff; font-size: 13px; }
.note-embed-meta { font-size: 12px; color: #aaa; }
.note-embed-body { color: #eee; font-size: 13px; line-height: 1.4; 
  
  
  word-break: break-word; }
.note-embed-headline, .note-embed-title { margin: 0 0 4px 0; }
.note-embed-by { margin: 0; opacity: 0.9; }
.note-embed-actions { margin-top: 8px; }

/* =========================================================
   SHARED: Mobile / Tablet
   ========================================================= */
@media (max-width: 900px) {
  .streams-layout { flex-direction: column; padding: 10px; margin: 10px auto; }
  
  .streams-sidebar {
    width: 100%; position: static; top: auto; padding: 8px;
    border-radius: 10px; overflow: visible;
  }
  
  .streams-main { width: 100%; }

  .sidebar-toggle { display: flex; }
  .sidebar-list {
    display: none; margin-top: 8px; max-height: 55vh; overflow-y: auto; padding-right: 4px;
  }
  .streams-sidebar.open .sidebar-list { display: flex; }
  .streams-sidebar.open .sidebar-toggle .chev { transform: rotate(180deg); }
  
  .sidebar-item { width: 100%; padding: 10px 14px; white-space: normal; }
}


.nostr-mention-profile{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  text-decoration:none;
  font-size:0.9em;
  opacity:0.9;
  border:1px solid rgba(106,103,103);
  background-color: #393939;
}
.nostr-mention-profile:hover{
  opacity:1;
}


/* Prevent embed cards from getting too tall */
.note-embed-body-snipped {
  max-height: 320px;
  overflow: hidden;
}


/* ---------- VIDEO ---------- */

.note-inline-video {
  margin: 10px 0;
  line-height: 0;   /* removes baseline gaps without breaking layout */
}

.note-video-click {
  display: block;
  border-radius: 10px;
  overflow: hidden; /* clips white seams on edges */
    background:#000;     /* ensure the wrapper is black too */
  padding:0;
  border:0;
}

.note-video {
  width: 100%;
  max-height: 420px;
  background: #000;

  display: block;
  border: none;
  outline: none;

  pointer-events: none;
    margin:0;
  background:#000;

  transform: translateZ(0);        /* kills the 1px seam on some GPUs/browsers */
  backface-visibility: hidden;     /* extra seam killer */
}

.note-video-source {
  line-height: 1.3;  /* restore normal text layout */
  margin-top: 6px;
  font-size: 12px;
  opacity: .8;
  word-break: break-all;
  text-align: left;
}



/* --- kill the 1px/white seams + weird extra gaps on YT cards --- */
.note-embed-youtube {
  padding: 0;                 /* remove embed padding for this type */
  border: 0;                  /* remove border if it shows as a line */
  background: transparent;    /* remove background that can peek through */
}

.note-embed-youtube .note-youtube-thumb {
  display: block;
  line-height: 0;             /* BIG one: removes baseline gap */
  border-radius: 78px;
  overflow: hidden;
}

.note-embed-youtube .note-img {
  display: block;             /* BIG one: prevents inline-image gap */
  line-height: 0;
  margin: 0;
  border: 0;
}

/* tighten spacing between thumbnail and the source line */
.note-embed-youtube .note-img-source {
  margin-top: 6px;
  line-height: 1.2;
}


.note-embed-youtube .note-youtube-thumb,
.note-embed-youtube .note-img,
.note-embed-youtube .note-img-source {
  white-space: normal;
}

.note-embed-youtube,
.note-embed-youtube * {
  white-space: normal !important;
}



/* =========================================================
   NOTES: Upload + Publish row tweaks
   ========================================================= */

/* Upload button should not be the tiny "tool" square */
#uploadBtn.notes-tab-tool{
  width: auto;
  height: auto;
  padding: 8px 12px;
  border-radius: 8px;
  line-height: normal;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}


/* one row: upload left, publish right */
.notes-compose-actions{
  justify-content: space-between;
}

.notes-compose-actions #uploadStatus{
  margin-left: 8px;
  margin-right: auto; /* pushes Publish to the far right */
}




/* ---------- RUMBLE EMBED ---------- */

.note-embed-rumble {
  padding: 0;
  border: 0;
  background: transparent;
}

/* anchor container */
.note-embed-rumble .note-rumble-thumb{
  display: block;
  position: relative;
  line-height: 0;
  border-radius: 14px;
  overflow: hidden;
}

/* image behaves like youtube thumbnail */
.note-embed-rumble .note-img{
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  border: 0;
}

/* centered play icon */
.note-embed-rumble .note-rumble-play{
  position: absolute;
  inset: 0;                /* fill container */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  color: white;
  text-shadow: 0 2px 12px rgba(0,0,0,.85);
  pointer-events: none;
}

/* spacing like youtube */
.note-embed-rumble .note-img-source{
  margin-top: 6px;
  line-height: 1.2;
}


/* Rumble thumb wrapper should size to the image, like your .note-img-click does */
.note-embed-rumble .note-rumble-thumb{
  display: inline-block;
  text-decoration: none !important;
  border: 0 !important;
  outline: 0 !important;
}


/* ensure overlay is centered over the actual image width */
.note-embed-rumble .note-img{
  max-width: 420px;          /* keep your global limit */
  width: 100%;
}
