#chat-container {
    max-width: 910px;
    margin: 0px auto;
    background: #000;
    margin-bottom: 10px;
}

#chat-shortcuts {
    background-color: #ff512b;
    padding: 10px;
	display: flex;
	align-items: center;
	gap: 5px;
	height: 36px;
	color:#fff;
	font-family: "Roboto", sans-serif;
  font-weight: bold;
  font-size: 14px;
}

#chat-shortcuts button,
#chat-shortcuts a {
    display: inline-block;
	color: yellow;
}

#chat-input-area {
    display: flex;
}
#chat-input-area-wrap {
background: #000;
  padding: 10px;
}
#chat-shortcuts #scroll-to-top-chat {display:none;}
#chat-shortcuts #scroll-to-top-chat.active {
  display: inline-block;
  color: #fff;
  text-align: center;
  font-size: 18px;
  cursor: pointer;
  font-weight: bold;
  border-radius: 5px;
}
#chat-shortcuts #scroll-to-top-chat.active:hover { color:yellow;}
#chat-input {
    flex-grow: 1;
    padding: 10px;
}
#chat-input-area input {border:0px;background: #202020;}
#send-message.filter-disabled { display:none; }
#send-message {
background: #434343;
  padding: 0px 10px 0px 10px;
  color: #fff;
}
#send-message:hover {background:#1a9800;}
#chat-output {
    height: 75vh;
    overflow-y: auto;
}
#emoticon-picker {
    padding: 5px 5px 2px 5px;
    background: #151515;
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    border: 2px solid #FFFF00;
}
#emoticon-picker img {height:24px;}
#emoticon-picker img:hover {filter: brightness(1.2);}
.emoticon-image {
  height: 24px;
}
.emoticon-image.big-emot {height:30px;}
.message {
    display: flex;
    align-items: stretch;
	padding: 5px;
	background: #151515;
  margin-bottom: 10px;
  border-top: 1px solid #303030;
  border-bottom: 1px solid #303030;
     transition: opacity 0.6s ease-out;  
}
#active-agreement-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.agreement-content {
    background: #151515;
    padding: 20px;
    border-radius: 5px;
    color: #fff;
    font-family: "Roboto", sans-serif;
    max-width: 400px;
    text-align: center;
}

.agreement-content h2 {
    margin-top: 0;
    color: #ff512b;
}

.agreement-content p {
    margin: 10px 0;
}

.agreement-content a {
    color: #fffb00;
    text-decoration: none;
}

.agreement-content a:hover {
    color: #ffe970;
}

#agree-active, #disagree-active {
    background: #434343;
    color: #fff;
    border: none;
    padding: 8px 16px;
    margin: 5px;
    border-radius: 4px;
    cursor: pointer;
}

#agree-active:hover {
    background: #1a9800;
}

#disagree-active:hover {
    background: #ff2626;
}

.message-meta {
    max-width: 300px;
    display: flex;
    flex-direction: column;
min-width: 160px;
  text-align: center;
}

.chatavatar img {
  width: 50px;
  height: 50px;
  border-radius: 50px;
  box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
}
.chatavatar {
margin-top:5px;
margin-bottom:5px; 
}
.timestamp.new-message-timestamp {
    color: #FFFF00; 
}

.message-content {
    flex-grow: 1;
    font-family: "Roboto", sans-serif;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
	word-break: break-word;
	overflow-y: hidden;
}
.message-content a {
  color: #00ff40;
    word-break: break-all;
    overflow-wrap: break-word; 
    display: inline-block;
    max-width: 100%; 
    white-space: normal; 
}
.message-content a:hover {
   color: #ffe970;
}
.message-content p {
    margin: 0 5px 10px 0;
	color: #fff;
	font-weight: normal;
}
.ghost-emoji {font-size: 0.9em;
  color: #ff2626;
  white-space: nowrap;
  margin-bottom: -20px;
  margin-right: 1px;}
  
.message-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
}
.action-buttons {
    display: flex;
    gap: 5px;
}

.controversial-timer {
    font-size: 0.9em;
    color: #ff2626;
    white-space: nowrap;
	margin-bottom: -20px;
	margin-right: 1px;
}

.display-name {
    font-weight: bold;
    color: #fff;
	margin-bottom: 2px;
}
.chat-images .lazy-fade {min-width:unset;min-height:unset; transition: opacity 0.5s ease-in-out 0.1s, background-color 0.5s ease-in-out 0.1s;}
.timestamp {
font-size: 12px;
  color: #0ff;
  font-family: "Roboto", sans-serif;
  font-weight: bold;
}

span.replyingtoname {
  color: #fffb00;
  font-weight:bold;
}
.chat-text {
    margin: 5px 0;
    display: block;
}

.chat-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
	margin-bottom:5px;
}
.reply-link .chat-images {margin-bottom:0px; margin-top: 10px;}
.reply-link .chat-text {margin-top:10px;margin-bottom:0px;}
.reply-indicator {
background-color: #202020;
  padding: 8px 0px 8px 8px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
}
.reply-indicator .cancel-reply {
cursor: pointer;
  color: #fffb00;
  font-weight: bold;
  margin-right: 5px;
}
.reply-indicator .cancel-reply:hover {
    color: #50ff00;
}
.chat-image {
    max-width: 160px;
    height: auto;
}

.reply-link {
color: #fff;
  background: #2b2b2b;
  padding: 7px;
  border-radius: 4px;
  position: relative; /* For positioning the arrow */
  border: 1px solid #3f3f3f;
}
.reply-arrow {
    position: absolute;
bottom: 3px;
right: 2px;
    color: #ffef00;
    cursor: pointer;
    font-size: 1.2em;
}
.reply-arrow:hover {color: #00ff1e;}
.user-likes {
    font-size: 12px;
    color: #fff;
    margin-top: 2px;
    text-align: center;
	display: block;
}

.reply-message {
    margin-top: 10px;
}


.like-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
	margin-top: 8px;
}

.like-btn.liked {
    color: yellow;
}
#chat-input.dragover {
border: 2px dashed #00ff04;
 background: #0d6c00;
}
.like-btn:disabled {
    cursor:unset;
	margin-top: 8px;
}

.reply-btn {
background: #404040;
  border: none;
  color: #fff;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  margin-top: 10px;
}
.reply-btn:hover {background: #636363;}
#scroll-to-top-chat {
    display: none;
	margin-left: auto; /* Pushes button to the far right */
}

#scroll-to-top-chat:hover {
    opacity: 1;
}

/* Admin table styling */
#chat-messages-table .message-content {
    max-width: 400px;
    word-wrap: break-word;
}

#chat-messages-table .edit-content {
    margin-bottom: 5px;
}

#chat-messages-table .button {
    margin-right: 5px;
}
#lightbox-prev:hover,
#lightbox-next:hover,
#lightbox-prev:focus,
#lightbox-next:focus {
    background: rgba(0, 0, 0, 0.7);
    outline: none;
}

#chat-image-preview {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: flex-start;
	margin-left: 10px;
}
.message-loading {
    text-align: center;
    padding: 10px;
    background: #f0f0f0;
    color: #333;
}
.message-error {
    text-align: center;
    padding: 10px;
    background: #ffe6e6;
    color: #d00;
    border: 1px solid #d00;
    border-radius: 4px;
}
.preview-item {
    width: 80px;
    margin: 0;
    padding: 0;
    position: relative;
}

.preview-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    display: block;
}

.preview-item:hover img {
    opacity: 0.5;
    border: 1px solid #f03;
}

.preview-item:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 80px;
    background: rgba(255, 0, 0, 0.5);
    border-radius: 4px;
    z-index: 1;
    pointer-events: none; /* Prevent blocking clicks */
}

.preview-item:hover::after {
    content: '✖';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    z-index: 2;
    pointer-events: none; /* Prevent blocking clicks */
}

.preview-error {
    color: #ff4444;
    font-size: 14px;
}

#chat-input-area.uploading #send-message {
    opacity: 0.5;
    cursor: not-allowed;
}

#chat-input-area.upload-success {
    position: relative;
}

#chat-upload-btn {
	font-weight:bold;
    border: none;
    cursor: pointer;
    border-radius: 3px;
    font-size: 14px;
}

#chat-input-area.controversial-enabled {
    border: 2px dashed #fff; /* Subtle gray border */
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

.highlighted-message {
    border-top: 1px solid #ffcc00; /* Bright yellow for visibility */
    border-bottom: 1px solid #ffcc00;
    animation: blink-border 1s ease-in-out infinite; /* Blinking border animation */
}

@keyframes blink-border {
    0% { border-color: #ffcc00; } /* Visible border color */
    50% { border-color: transparent; } /* Hide border */
    100% { border-color: #ffcc00; } /* Restore border color */
}

@media (max-width: 599px) {
  #chat-shortcuts {
    height: 54px;
  }
}