#messagebox {
  border: 1px solid var(--border-color);
  padding: 15px; 
  width: 100%;
  max-width: 1200px;
  height: 40vh; 
  overflow-y: scroll;
  background: var(--box-bg);
  margin-bottom: 1vh;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

#char-counter {
  position: absolute;
  right: 15px;
  bottom: 55px;
  color: var(--text-color);
  pointer-events: none;
  font-size: 0.9rem;
  opacity: 0.7;
}

.msg-row {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 4px 0;
    /* Fixes the "wrong" wrapping from the image */
    overflow-wrap: anywhere; 
}

.msg-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.msg-text {
    flex-grow: 1;
    overflow-wrap: anywhere;
}

.edit-link-btn, .delete-link-btn {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 0 0 10px !important;
    height: auto !important;
    width: auto !important;
    line-height: normal !important;
    
    color: #888;
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: underline;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

.delete-link-btn {
    color: #888 !important;
}

.edit-link-btn:hover {
    color: var(--link-color);
    background: none !important;
}

.delete-link-btn:hover {
    color: #ff0000 !important;
}

.back-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.back-link {
    text-decoration: none;
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.8;
}

.back-link:hover {
    opacity: 1;
    text-decoration: underline;
}
