body {
	margin: 0;
	padding: 0;
	font-family: Arial, sans-serif;
	background-color: #121212;
	color: #ddd;
}

a {
    color: #90caf9;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/*
img {
	max-width: 300px;
	display: block;
	margin-bottom: 5px;
	cursor: pointer;
}*/

/*
audio, video {
	max-width: 300px;
	display: block;
	margin-bottom: 5px;
}*/

hr {
	border: 0;
	height: 1px;
	background: #333;
	margin: 20px 0;
}

button {
	background-color: #1e1e1e;
	color: #ddd;
	border: 1px solid #333;
	border-radius: 4px;
	padding: 2px 4px;
	font-size: 14px;
	cursor: pointer;
	transition: background-color 0.3s ease, box-shadow 0.3s ease;
	margin-right: 3px;
	font-size: small;
}

button:hover {
  background-color: #333;
  box-shadow: 0 0 4px rgba(144, 202, 249, 0.7);
}

.container {
	display: flex;
}

.sidebar {
	width: 250px;
	min-width: 250px;
	background-color: #1e1e1e;
	border-right: 1px solid #333;
	padding: 20px;
	padding-top: 0px;
	padding-left: 15px;
	overflow-y: auto;
	font-size: small;
}

.sidebar h1 {
	font-size: medium;
}

.sidebar h2 {
	font-size: small;
}

.sidebar ul {
	padding-left: 0px;
	list-style-type: none;
}

.sidebar.hidden {
	display: none;
}

#toggleSidebarBtn {
	background: transparent;
	border: none;
	font-size: 20px;
	cursor: pointer;
	padding: 5px;
	color: inherit;
	border-radius: 0px;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}

.channel-category {
  margin-bottom: 1rem;
}

.channel-category summary {
  cursor: pointer;
  font-weight: bold;
  padding-top: 5px;
  padding-bottom: 5px;
  background: #2e2e2e;
  /*color: white;*/
  border-radius: 4px;
  margin-bottom: 5px;
}

.channel-category ul {
  margin: 0;
  /*margin-top: 5px;*/
  /*padding-left: 1.5rem; /* or whatever you prefer */
  list-style: none;
  font-size: smaller;
}

.ws-status {
	position: fixed;
	bottom: 0;
	left: 0;
	z-index: 9999;
	padding: 6px;
}

.content {
	display: flex;
	background-color: #121212;
	padding: 0px;
}

.messages {
	width: 350px;
	padding: 10px;
	padding-right: 0px;
	padding-top: 0px;
	font-size: medium;
}

#newMessages, #pinnedMessages {
	padding: 0px;
	box-sizing: border-box;
}

.pinned-messages {
	width: 350px;
	padding: 10px;
	padding-right: 0px;
	padding-top: 0px;
	font-size: medium;
}

.message-header p {
	margin: 0;
}
.message-box {
	background-color: #1e1e1e;
	border: 1px solid #333;
	margin-bottom: 10px;
	/*padding: 10px;*/
	font-size: smaller;
	border-radius: 10px;
	scroll-margin-top: 50px;
}

.message-header,
.message-text {
	padding-left: 10px;
	padding-right: 10px;
	font-size: inherit;
}

.messages h1,
.pinned-messages h1,
.message-box h1 {
	font-size: medium;
}

.messages h2,
.pinned-messages h2,
.message-box h2 {
	font-size: small;
}

.messages h3,
.pinned-messages h3,
.message-box h3 {
	font-size: smaller;
}

.message-header {
	font-size: small;
	color: #bbb;
	margin-bottom: 8px;
	padding-top: 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid #555; 
}

.message-id-deleted {
	color: orangered;
}

.channel-title div {
	display: block;
	padding-right: 5px;
}

.channel-item,
.channel-item-pinned,
.filter-item {
	margin-bottom: 10px;
}

.buttons {
	text-align: right;
	float: right;
}

.quoted {
	border-left: 3px solid #90caf9;
	padding-left: 10px;
	margin-left: 10px;
	margin-top: 10px;
	font-style: italic;
	color: #bbb;
	font-size: small;
}

.media img {
	cursor: pointer;
}


/* ─── Media Container ───────────────────────────────────────── */
.media {
  display: grid;
  gap: 4px;        /* space between thumbnails */
  width: calc(100% - 20px); /* remove 20px for margin left+right */
  margin: 0;       /* no extra offsets */
  padding: 0;      /* remove any extra inset */
  margin: 10px;
}

/* ─── Single image: no grid, just a block that fills the parent ─── */
.media[data-count="1"] {
  display: block;
}

/* ─── Grid layouts ─────────────────────────────────────────────── */
/* 2 images → 2 columns */
.media[data-count="2"] {
  grid-template-columns: repeat(2, 1fr);
}
/* 3 or more → 3 columns */
.media[data-count="3"],
.media[data-count]:not([data-count="1"]):not([data-count="2"]) {
  grid-template-columns: repeat(3, 1fr);
}

/* ─── Image sizing ─────────────────────────────────────────────── */
/* default: each image fills its grid cell (or the entire block for single) */
.media img,
.media audio,
.media video {
  display: block;
  width: 100%;
  height: auto;
  padding: 0;    /* absolutely no padding on the IMG itself */
}

/* for galleries only: force square/thumbs & crop overflow */
.media:not([data-count="1"]) img,
.media:not([data-count="1"]) video {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.modal {
	display: none;
	position: fixed;
	z-index: 100;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0,0,0,0.9);
}

.modal-link {
	margin-top: 5%;
	margin-left: 5%;
	margin-bottom: 5px;
}

.modal-content {
	margin: 5% auto;
	margin-top: 0;
	display: block;
	max-width: 90%;
}

.channel-text {
	cursor: pointer;
	display: inline-block;
	color: #90caf9;
	text-decoration: none;
}

.channel-text:hover {
	text-decoration: underline;
}

.channel-popup {
	display: none;
	position: absolute;
	background: #1e1e1e;
	border: 1px solid #333;
	padding: 10px;
	margin-top: 5px;
	border-radius: 5px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.15);
	z-index: 100;
}

.channel-popup.show {
	display: block;
}

.wrapper {
	position: relative;
	display: inline-block;
}

.hide-message.disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
  }
  
.hide-message.enabled {
	opacity: 1;
	cursor: pointer;
  }